|
|
|
Junior Member
      
Group: Forum Members
Last Login: 12/1/2008 11:52:28 AM
Posts: 12,
Visits: 171
|
|
Hi all.
I'm trying to find a way to get the record number (recno) of a record in the INFILE and use it as an insert value, but I've not been able to sort it out.
I've tried &SYSRCDCNT in several ways, but still no avail.
TIA.
Cheers.
Carlos.
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 11/25/2008 1:20:39 PM
Posts: 91,
Visits: 119
|
|
Use an IDENTITY column:
http://www.teradataforum.com/teradata/20040526_023940.htm
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 12/1/2008 11:52:28 AM
Posts: 12,
Visits: 171
|
|
Jeff:
If I wanted to use an IDENTITY column, I would have used it.
My requirement -and I think I expressed it specifically- is to use the file record number.
If there is a way in multiload to access the record number, and you know it, and you are so kind to provide it, OK.
Otherwise, don't throw 'wise guy' answers.
Cheers.
Carlos.
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 11/25/2008 1:20:39 PM
Posts: 91,
Visits: 119
|
|
|
This was not a wise guy answer. Thanks for the wonderful feed back.
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 2 days ago @ 2:48:50 PM
Posts: 24,
Visits: 80
|
|
To my knowledge neither FastLoad or MultiLoad have a mechanism to allow you to perform this task.
Your two options are (as previously, correctly suggested) firstly to use an Identity column (although record numbering will not be sequential), or secondly to develop an INMOD/Batch script (Unix shell script is an alternative) to modify the data file before the load takes place.
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 12/1/2008 11:52:28 AM
Posts: 12,
Visits: 171
|
|
>>"To my knowledge neither FastLoad or MultiLoad have a mechanism to allow you to perform this task."
OK. Many Thanks. This was the answer that I was looking for.
>>"Your two options are (as previously, correctly suggested) firstly to use an Identity column (although record numbering will not be sequential),"
Wrong. Identity column was not 'correctly suggested' since my requirement demands a relationship between the file record number and one attribute (column) in the table.
>>" or secondly to develop an INMOD/Batch script (Unix shell script is an alternative) to modify the data file before the load takes place."
Yup. The shell scripting was the way I took...
Thanks.
Cheers.
Carlos.
|
|
|
|