Forum Discussion
Matjo
Advocate I
8 years agoTransform multiple queries at once
Hi, I have 60 queries for different tables. I want to apply the function Table.FirstN to all of them. I tried selecting all and using the function Keep Rows but it only affected one query. Is...
- 8 years ago
Yes, trick is to get a "table-view" of all your DB-tables where you can add a column. See how this works for a SQL-DB here:
The code as a function you can find here: https://gist.github.com/ImkeF/7f4fca8f7a7334d7fe7fb1ec761711da
Anonymous
7 years agoNot applicable
what if there's no transformation? i.e. is there a way to bring all the tables from the db into different pquery queries?
ImkeF
Community Champion
7 years agoYes, if you import from SQL-Server for example, you will be presented a UI like this:
for every table or view you check here, a seperate query will be created.
- Anonymous7 years agoNot applicable
thanks ImkeF. what if i don't wanna select them manually? is there a way to write a script that'll do that for me?