Page 1 of 1

Close Command & Open Command

Posted: Wed Sep 15, 2010 5:49 am
by jpraveen
HI

i had multiple SQls to be executed in my job,
when i use Close/Open command can i write multiple SQls ,

my reqiurement is i had DELETE and UPDATE SQLs that should be executed before or after,but can i write many SQLs In a single OPEN or CLOSE command.

i.e.,
1) UPDATE TABLE_NAME------set---------
2)DELETE TABLE_NAME -----------
3)UPDATE TABLE_NAME------set-----(Condition)

i had another Doubt that the DELETE/UPDATE Statement Condition should be with in the the table or out side the Table(like JOIN on OTHER TABLE)

i am using ODBC stage and my SQL is goven below
DELETE Table_Name1.StateCode, Table_Name2.StateCode
FROM Table_Name1 LEFT JOIN Table_Name2 ON
( Table_Name1.HOSP_NUM = Table_Name2.Prvdr_Fac) AND
( Table_Name1.HOSP_GRP_NUM = Table_Name2.Prvdr_Grp) AND
( Table_Name1.PROBASE_PRODUCT_TYPE = Table_Name2.PlanCode) AND
( Table_Name1.StateCode = Table_Name2.StateCode)
WHERE ((( Table_Name1.StateCode) In ('TX','OK')) AND (( Table_Name2.StateCode) Is Null));

Posted: Fri Jul 22, 2011 6:59 am
by major
I am facing the same problem in the V8.1 parallel job. Did you find any solution for the same

Posted: Fri Jul 22, 2011 9:15 am
by chulett
Start your own post, give us the gory details of your problem.