Forum Discussion
Matjo
8 years agoAdvocate I
Transform 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
ImkeF
7 years agoCommunity Champion
Yes, 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.
Anonymous
7 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?