Hi.... I'm new to SSIS packages....
I'm facing a issue..... I've to modified a existing package and in that package in "Data Flow Task" in "OLE DB Source Editor" their is sql query already existing and working fine but in order to modify it in need to add new condition based on a newly created variable which will hold either 'T' or 'F' and on the basis of this variable I need to execute the query as if 'T' then the existing query and if 'F' then I've one more query which I need to add. Can any one suggest how should I implement this.
below is the query.
IF
(VAR1 = 'T')
BEGIN
SELECT .....
FROM TABLE1
WHERE COL1= ?
END
ELSE
BEGIN
SELECT
COL1,
COL2....
COUNT(*) AS COUNTER
FROM TABLE2 T2, TABLE5 T5
WHERE T1.COL = T5.COLWHERE T2.COL = ?
GROUP BY
T2
,COL1
T2.COL2
END
If true the already existing query should be executed and the false one I need to add...but giving below error...
Parameters cannot be extracted from the SQL command. The provider might not help to parse parameter information from the command. In that case, use the "SQL command from variable" access mode, in which the entire SQL command is stored in a variable.
ADDITIONAL INFORMATION: Syntx error, Permission Voilation, or other nonspecific error (Microsoft SQL Native Client)
Thanks in Advance.