Thanks for the hint. It made me to think about a stored procedure and it
"Allan Mitchell" wrote:
> It could just be that the statement is too complicated for the driver to
> recognise. i would try using a property expression instead to uild the
> statement.
>
> For all things to do with the ExecuteSQL task have a look here.
>
> The ExecuteSQL Task
> (
http://www.sqlis.com/default.aspx?58)
>
> --
>
>
> Allan Mitchell
> Konesans Ltd
> T +44 7966 476 572
> F +44 2071 008 479
>
http://www.konesans.com >
>
>
> "Maria" <Maria@discussions.microsoft.com> wrote in message
> news:B4E0D656-AF16-4A32-8286-0FB655E7441E@microsoft.com...
> >I am passing multiple variables from Dataflow into a SQL Task in Control
> > Flow. In SQLTask I have an insert statment, joining multiple tables and
> > also
> > using variables.
> >
> > For example
> >
> > Insert into Table1
> > (Col1,Col2,Col3,Col4)
> > SELECT
> > ?,
> > ?,
> > empID,
> > getdate()
> > from blah1
> > where blah1.col3=99
> >
> > Col1,Col2 are the parameters coming from the DataFlow.
> >
> > If I do not use the another table(blah1) then parameters are recognized
> > and
> > inserted properly but whenever I have another table in the insert
> > statement,
> > then it is not working. And the error is like this
> >
> > [Execute SQL Task] Error: Executing the query "Insert into Table1
> > (Col1,Col2,Col3,Col4)
> > SELECT
> > ?,
> > ?,
> > empID,
> > getdate()
> > from blah1
> > where blah1.col3=99
> > " failed with the following error: "Syntax error, permission violation, or
> > other nonspecific error". Possible failure reasons: Problems with the
> > query,
> > "ResultSet" property not set correctly, parameters not set correctly, or
> > connection not established correctly.
> >
> >
> > Thanks for any help
> >
> >
>
>