|
Archives of the TeradataForumMessage Posted: Thu, 27 Dec 2001 @ 17:11:45 GMT
Charles, When you refer to 'sequencs' are you meaning sequence numbers? You can apply a unique number to each row in an answer set (i.e. result of a SELECT statement) using the CSUM function, e.g.; Select This will provide a unique, sequential value to each row in the answer set. 'Col1,col2' are used for sorting the rows such that the row with the lowest value of 'col1,col2' will have a sequence number of 1, the row with the next lowest value of 'col1,col2' will have a sequence number of 2 etc etc. You can have multiple columns used to sort the rows (I'm not sure of the actual limit - probably 16). Even if two or more rows have the same sort key, using the CSUM function will assign them different values. Obviously this function cannot be used as part of a fastload or multiload script, you'd need to use something like an access module or inmod for that. Hope that helps, Dave Ward Analytics Ltd: Information in motion (www.ward-analytics.com)
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||