DDL operation in OLE DB Command
Hi, Can we do the DDL operation in OLE DB Command transformation. like Declare variable etc Regards Tom
December 29th, 2010 2:41am

declare variable is not DDL operation as I know, but you can put any script(contains declaration as many as variables you need) that you want in a stored procedure and then execute it with OLEDB Command , but for detailed help we need to know what exactly you want to do? and Note that every statement you write in OLEDB Command will execute FOR EACH ROW IN DATA STREAM, and usually you don't want to do an ALTER command ( DDL operation ) for every row, so If you want to do DDL operations I think it's better to use Execute sql task which can execute a statement regardless of rows .http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
December 29th, 2010 2:49am

thanks Reza, i found out the problem , I dindt give ";" after the declaration block. but when I Set some value to variables I declared as input parameter(i'm doing this because i have to input this multiple statement) i get error sample of sql given below Declare @input1,@input2; Set @input1=? SET @input2=?
December 29th, 2010 5:29am

your declare statement is not correct, it should be: declare @input1 int declare @input2 varchar(30) set @input1=? set @input2=? note that you should use your desired data types instead of int and varchar.http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
December 29th, 2010 5:33am

sorry for the confusion I did correctly in SSIS, while writing here I did wrong. I have done exactly as you said, but still i get the error
December 29th, 2010 5:42am

what is error message exactly? did you mapped input columns in oledb command? http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
December 29th, 2010 5:56am

Error is syntax error,permission violation,or other non specific error. yeah i have mapped the columns
December 29th, 2010 6:27am

put whole statement in a stored procedure and then just use exec mySP ? , ? in oledb commandhttp://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
December 29th, 2010 6:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics