community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

list top 20 * rows from all tables microsoft SQL database (high number of tables)

Meteor

Hi,

 

Is it possible to query sysobjects in alteryx e.g.

SELECT SCHEMA_NAME(schema_id)+'.'+name

AS SchemaTable

FROM sys.tables

 

save the results to a text file then

loop a select top 20 * from tablename (where tablename is on each row of the textfile)  ?

 

Thanks

Dave

 

 

Magnetar
Magnetar

Hi,

 

You can run your first step via an Input Data tool.


To do the second, you will probably need a batch macro, and you will probably want to write this data out to files, to avoid having a large number of columns specific to each dataset.

 

Take a look at this article and see if it helps: https://community.alteryx.com/t5/Alteryx-Knowledge-Base/CS-Macro-Dev-Reading-in-Multiple-Files-with-...

Meteor

Thanks

Labels