This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hi @Santy to get a better context on what you are looking to achieve, are you looking to build something where you have some values in excel file (say ID's) that need to be passed into a SQL's WHERE clause? If yes, then the approach would look something like what I have included in the attached solution. Note: I haven't included any database connections in it, so you will have to connect it with your environment.
I have included two different approaches addressing different scenario
Scenario 1: if you are using an Oracle database and have more than 1000 ID's, you will have to pass ID's in batches of 1000 (this is an Oracle limitation)
Scenario 2: if you are using simple SQL for a small universe of ID's, a simple Dynamic Input tool will get you results.
Please let us know if this isn't what you were looking for.
Thanks. To give you more specifics, I have an output excel which has a list of values in one column. I have 2 options here. Either pick one row at a time and parse the values in a where clause of SQL or combine all of these values with a separator and parse it in where clause of SQL.
I feel combining them would be more appropriate. Is there a way I can transpose/concatenate all the rows into one single cell value and use it as an input for the where clause in SQL? Let me know.
In the meantime, Let me look at your solution in detail.
Hi @Santy, I concur with your thought. Transpose/Concatenate is a more efficient way of fetching data in this case.
Summarize tool allows you to transpose and concatenate columns and lets you define the delimiters. Going back to the sample solution I previously posted, the summarize tool concatenates the ID's with comma as a delimiter. I have included a screenshot of the Summarize configuration below: