Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

Script to delete the today's data in target table

$
0
0

Hi All,

 

I loaded the below data to a table by adding a new column LOAD_DATE.

 

How to write the script to delete the data if same day loaded?

For example, loaded the data on today and I want to rerun this job today. Today's data should be deleted and load the data again.

What is the script for this.

Thanks in advance.


This is the source data.

EMPNOENAMEJOBMGRHIREDATESALCOMMDEPTNO
1001SMITHCLERK790217-Dec-80800NULL20
1002ALLENSALESMAN769820-Feb-81160030030
1003WARDSALESMAN769822-Feb-81125050030
1004JONESMANAGER783902-Apr-812975NULL20
1005MARTINSALESMAN769828-Sep-811250140030
1006BLAKEMANAGER783901-May-812850NULL30
1007CLARKMANAGER783909-Jun-812450NULL10
1008SCOTTANALYST756609-Dec-823000NULL20
1009KINGPRESIDENTNULL17-Nov-815000NULL10
1010TURNERSALESMAN769808-Sep-811500030
1011ADAMSCLERK778812-Jan-831100NULL20
1012JAMESCLERK769803-Dec-81950NULL30
1013FORDANALYST756603-Dec-813000NULL20
1014MILLERCLERK778223-Jan-821300NULL10

Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>