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

enter image description here

when executing package, staging table looks this:

enter image description here

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:

enter image description here


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -