I am trying to load a very wide file into a Teradata table using BTEQ and unfortunately the records do not have a unique identifier other than record number which is implied by their location in the file (ie. not an explicite record number field). I would like to generate a number on insert that matches the order the records are inserted. I tried using CSUM(1,1) but it gives me an error, invalid reference of table data. Identity columns won't help unless I use that to then build the record numbers based on order after the load but that is messy. Is there anyway to just generate a sequential record or row number on insert using BTEQ?
Forums: