Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 19 Nov 2008 @ 17:13:10 GMT


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


Subj:   Converting bteq query to Sql server integration
 
From:   Parija, Soumya

Hi All,

Solution Needed for:

I have to delete a table. If that table doesn�t exist it will crate that table otherwise it will process other statements.

I know how to achieve it through bteq like

     DELETE FROM TBL1 ALL;

     .IF ERRORCODE = 0 THEN .GOTO *OK*

     CREATE TABLE TBL1 (col1 datataype);

     .LABEL OK

     INSERT INTO TBL1 sel *  from TBL2;

     .IF ACTIVITYCOUNT > 0 THEN .GOTO Continue

     .QUIT

     .LABEL Continue

The problem is am using Sql server integration service. The queries are fired from Sql server integration service ( etl tool of sql server ) to Teradata RDBMS.

Can anybody help me how to write above queries in sql server integration service so that Teradata can understand.

Or can we write a stored procedure to achieve it.

I have used above bteq query but it's giving error.


Thanks,

Soumya



     
  <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: 15 Jun 2023