All Forums Tools
CarlosAL 512 posts Joined 04/08
27 Aug 2008
File record number in mload

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.

j355ga 100 posts Joined 12/05
27 Aug 2008

Use an IDENTITY column:http://www.teradataforum.com/teradata/20040526_023940.htm

Jeff

CarlosAL 512 posts Joined 04/08
28 Aug 2008

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.

j355ga 100 posts Joined 12/05
28 Aug 2008

This was not a wise guy answer. Thanks for the wonderful feed back.

Jeff

idontknow 25 posts Joined 07/07
28 Aug 2008

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.

CarlosAL 512 posts Joined 04/08
29 Aug 2008

>>"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.

You must sign in to leave a comment.