November 16, 2005 at 11:35 am
how can i use one variable into OLEDDB component in the select/where cluse ?
November 17, 2005 at 2:15 am
Your OLE DB Source component can take its SQL statement from a variable (AccessMode="SQL From a variable").
-Jamie
Jamie Thomson
http://sqlblog.com/blogs/jamie_thomson
November 17, 2005 at 10:25 am
Thanks, for your answer but it didn't works for me. I am trying to obtain data from a table which i have filter for date, so i wish to set date a variable and execute the OLEDB source to execute the query for obtain the results in another table. But i am trying and the OLE DB Source can not recognize:
"select * from tableA where fieldDate=@inputDate" or
"select * from tableA where fieldDate=?inputDate"
where inputDate is a variable with date and scope correct.
November 17, 2005 at 2:32 pm
November 17, 2005 at 2:49 pm
i get it, thanks for a lot...
November 18, 2005 at 1:24 pm
Note if I were you I would get intothe habit of usinng the method I suggested. It will always work whereas using parameterised queries lays you open to the vagaries of different syntaxes for different providers.
-Jamie
Jamie Thomson
http://sqlblog.com/blogs/jamie_thomson
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply