Parameters in a DTS Transformation
I hope someone can help, as this has been driving me crazy for the last 2 days.
I have written script, which joins a Composite PK to the FK to speed up and reduce the amount of data loaded (30K rows reduces to around 2K).
Select
Table1.*
from
Table1
Inner Join (Select
Column1, --Char
Column2 --Bigint
from
Table2
where
Column2 between ? and ?
and Column3 in ('Q','Z')) Join1 on
Join1.Column1=Table1.Column1
Join1.Column2=Table1.Column2
The problem is that when i try and assign the parameters, i get the following error :
Error source Microsoft OLE DB Provider For SQL Server, syntax error or access violation.
Followed by :
an Error occured while parsing the sql statement.
The transformation is from SQL server to SQL Server so there should be no problems with the query, I could understand it if the source was through ODBC.
If i remove the paramerts and put actual numbers in or move the parameters to the main select it works.
any Ideas?
Thanks in advance for all help.
|