I have a target database with the below 2 fields. Field 1 has unique numbers.
E.g.
Field 1 Field 2
1 abc
2 def
3 ghi
I have a requirement wherin I need to insert records into this table.
I need to first look at the last number in field 1 and insert records starting from 4 onwards.
How do I achieve this?
Generate Unique No's
Moderators: chulett, rschirm, roy
Extract maximum Field1 from the table to a file.
Read maximum field1 from the input file and use it in below expression in your insert job to generate unique number
Read maximum field1 from the input file and use it in below expression in your insert job to generate unique number
Code: Select all
(@NUMPARTITIONS * ( @INROWNUM - 1)) + @PARTITIONNUM + Max_Field1
You are the creator of your destiny - Swami Vivekananda