Archives of the TeradataForum
Message Posted: Thu, 07 Dec 2000 @ 15:11:18 GMT
Righto, at Dave's request, here's what we're using to do a sort of loop (this is very basic, no error handling or anything, but you can see the gist):
/* MAINBTEQFILE */ /* Example of when this is useful, update that needs running until no more records are updated i.e. resolving chains */ .logon tdp/username,password; .Run file = "c:\temp\TERASQL.txt" .quit /* TERASQL.txt */ UPDATE Resolve_Chains SET Customer_Card_no = SECONDARY_MATCH.Customer_Card_no WHERE Resolve_Chains.Customer_Card_no = SECONDARY_MATCH.new_card_no ; .if activitycount <> 0 then .goto resolve_ch .quit .label resolve_ch .RUN FILE "c:\temp\TeraSQL.txt" .quit
Hope this helps some of you out there.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|