SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Sql Question

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Sql Question
Author Message
Jeff



Joined: 29 Apr 2002
Posts: 37

Post Sql Question Reply with quote

I am trying to issue 2 sql commands in the same job:

Truncate table table1

Insert into table1
Select *
From table2

The job fails when I put the 2 sql statements in the same job. It works fine if I separate them into 2 separate jobs. Is it just a syntax error? Thanks, Jeff

Wed Jul 13, 2005 9:31 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Sql Question Reply with quote

The correct syntax depends on your database version and must satisfy your database batch SQL syntax requirements, for example for Oracle this would be

BEGIN
EXECUTE IMMEDIATE 'Truncate table table1';
Insert into table1
Select *
From table2;
END;

: I am trying to issue 2 sql commands in the same job: Truncate table table1

: Insert into table1
: Select *
: From table2

: The job fails when I put the 2 sql statements in the same job. It works fine
: if I separate them into 2 separate jobs. Is it just a syntax error?
: Thanks, Jeff

Wed Jul 13, 2005 10:02 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.