Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 07 Dec 2000 @ 15:11:18 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Loops in BTEQ?
 
From:   Julie Sorrell

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.


Regards,

Julie Sorrell



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016