sql - How to clean database table from garbage data after it is populated with a data from excel file? -
i have package dumps data .xls
file kind of staging table. need insert data main table.
i'm looking way write sql code rid off garbage data staging table.
this example of xls
file
when executing package, staging table looks this:
after that, run following code delete garbage data statging table:
delete stagingtable data null , data = 'date'
that takes care of garbage removal particular case.
but if data comes in so, xls
columns names different, delete
statement not work
is there work around problem?
i found answer. work if first column of staging table has date value:
select * statgingtable isdate(date) = 1
this return:
Comments
Post a Comment