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.
I have a query database that is extremely large, and I want to know if it's possible to have a separate spreadsheet with categories and a specific number of those categories that will dictate what is pulled from the database.
For example, I want to pull X amount of records from the school program COLGUDS, Z from COLRAD, and Y from COLDUS.
You could build a file with two fields - one for your "Select TOP 100", one for your "COLGUDS" - and use a Dynamic Input>Modify SQL Query>Replace a Specific String. You will need to do this twice to select each component of the query you want to replace
For instance ...
Example text input file ("|" denotes new cell)
SELECT TOP 100 | COLGUDS
Select * from GenericTable
After Dynamic Input, query becomes:
SELECT TOP 100 From COLGUDS
Just lather, rinse, repeat for the other selections and tables. Queries may vary from what I listed depending on the database you are pulling from (Oracle, MySQL, NoSQL, etc)