Hi @Francisco Dominguez ,
Thankyou for using Microsoft Q&A platform and thanks for posting your query.
It looks like you are trying to run a SQL query in dataflow but it's throwing parsing related errors. Please let me know if my understanding is incorrect.
Kindly use the below expression :
"SELECT a.col1, col2, col3, col4 FROM Table1 a, Table2 b WHERE a.col1=b.col1 AND col3 >='"+ $last_year_date +"' and col2 in " + replace(replace(replace($ticker_groups,'[','('),']',')'),'\"','\'')
I tried to reproduce your scenario and was able to get through it.
- Here are the two tables -Stores and Items am trying to join based on Store_Id and Item_Store_ID
- Created two parameters : last_year_date and ticker_group
- In the source transformation, used this expression to achieve the above stated requirement:
"SELECT a.Store_ID, Store_Name, Item_Id, Item_Name, Item_Price, b.Item_Store_ID FROM dbo.stores a, dbo.items b WHERE a.Store_ID=b.Item_Store_ID and modifieddate>='"+ $last_year_date +"' and Item_Name in " + replace(replace(replace($ticker_group,'[','('),']',')'),'\"','\'')
- Got the expected result:
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on
or upvote
button whenever the information provided helps you.
Original posters help the community find answers faster by identifying the correct answer. Here is how - Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators