Using a variable in data flow task
Hi Guys, Ok so basically i have access to a external MySQL Database i need to ETL data into our Internal SQL Warehouse but i only want to get data that is greater then the last record in our warehouse(ie new data) ... So i want something like this in the ADO.net Source Select * FROM Table Where ID > Global_Variable_ID Is this possible ?
November 14th, 2012 4:25am

Hello Curt GLR , See this below similar thread with the detailed solution for this http://social.msdn.microsoft.com/Forums/zh/sqlintegrationservices/thread/b55edd69-0a2c-4f61-bbd9-061f15d1f93e Best Regards Sorna
Free Windows Admin Tool Kit Click here and download it now
November 14th, 2012 4:32am

Hi there problem is im using a Ado.net Source it doesnt have that parameters tab ?
November 14th, 2012 4:35am

Hello Curt GLR , See this below similar thread with the detailed solution for this http://social.msdn.microsoft.com/Forums/zh/sqlintegrationservices/thread/b55edd69-0a2c-4f61-bbd9-061f15d1f93e Best Regards Sorna This method is correct for OLE DB sources, but be aware that the question mark placeholder is only used for OLE DB connections. For the ADO.NET source, there is a small work around: How do I use parameters in an SSIS ADO NET source? Edit: I've done some more research and you can use the parameter mapping in the ADO.NET source. You need to specify the parameter name instead of the question mark placeholder: http://stackoverflow.com/questions/9010147/error-in-ssis-execute-sql-task (last reply) MCSA SQL Server 2012 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
November 14th, 2012 4:36am

Hi thanks for some reason i cant get my expression to evaluate im sure its because of the double quotes SELECT * FROM table1 ac INNER JOIN table2 a ON ac.`a` = a.`b` INNER JOIN table3 s ON CONCAT(" + "\"ac.\""+",ac.`c`) = s.`c` WHERE ac.ID >" + @[User::LastRecordID] any ideas ?
November 15th, 2012 6:28am

double the double quotes :)Senior BI Consultant & PM @ Bicentrix If it is, Please dont forget to mark as answered or at least vote as helpful if the post helps you in any ways.
Free Windows Admin Tool Kit Click here and download it now
November 15th, 2012 7:12am

Which ones the query passed to MySQl should basically bei have tried tons of different multi quotes SELECT * FROM table1 t1 INNER JOIN table2 a ON t1.`a` = a.`b` INNER JOIN table3 s ON CONCAT("ac.,t1.`c`) = s.`c` WHERE t1.ID >" + @[User::LastRecordID]
November 15th, 2012 7:16am

"SELECT * FROM table1 t1 INNER JOIN table2 a ON t1.`a` = a.`b` INNER JOIN table3 s ON CONCAT("ac.,t1.`c`) = s.`c` WHERE t1.ID >" + (DT_WSTR,10) @[User::LastRecordID] 1. There wasn't a quote at the beginning of the statement. 2. CONCAT("ac.,t1.`c`) --> why is there a double quote here? Why is there a dot before the comma? 3. @[User::LastRecordID] --> if this is an integer you need to cast it to string first, MCSA SQL Server 2012 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
November 15th, 2012 2:57pm

"SELECT * FROM table1 t1 INNER JOIN table2 a ON t1.`a` = a.`b` INNER JOIN table3 s ON CONCAT("ac.,t1.`c`) = s.`c` WHERE t1.ID >" + (DT_WSTR,10) @[User::LastRecordID] 1. There wasn't a quote at the beginning of the statement. 2. CONCAT("ac.,t1.`c`) --> why is there a double quote here? Why is there a dot before the comma? 3. @[User::LastRecordID] --> if this is an integer you need to cast it to string first, MCSA SQL Server 2012 - Please mark posts as answered where appropriate. Hi 1. it defaults a double quote in the expression editor must i put another one there ? 2. sorry that statement was meant to be CONCAT("ac.",t1.`c`) so the field im joining on would be like Name in the other table it would be ac.Name. 3. yip is interger thanks will change this now. so its just including the double quotes im still not sure about !
November 16th, 2012 2:34am

1. I'm not sure what you mean with the default double quote, so I'll pass on this one :) 2. Use \" instead of " to display a double quote in a string.MCSA SQL Server 2012 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
November 16th, 2012 2:51am

You sir are my hero thansk got it working !
November 16th, 2012 2:54am

You sir are my hero thansk got it working ! Allright, glad that you got it going.MCSA SQL Server 2012 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
November 16th, 2012 2:55am

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

Other recent topics Other recent topics