Archives of the TeradataForum
Message Posted: Mon, 29 Oct 2007 @ 15:49:13 GMT
I have a table with fields acct_id, fd1, fd2, fd3.
I want a unique id generated for each unique combination of fd1, fd2, fd3. Acct_id is not considered for generating the unique id. I have millions of rows in my table, hence when I was using sum() over ....., I was getting spool space error.(May be due to sorting on the huge no. of rows involved.)
Plz let me know the best approach to get a unique_id , need not be based on any sorting criterion, considering that there are millions of rows in the table.
Desired unique_id's somethng like this:
acct_id fd1 fd2 fd3 uniq_id 100 a b c 1 200 a b c 1 300 a b b 2 400 a a b 3
Just that uniq_id should not take acct_id in consideration... and query should avoid sort on the rows.(Neways there is no desired sequence for the unique_ids)
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|