Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Routine for loading database tables

Hi Guys,

I'm searching in a database for fields in curtain tables but I can't find want I'am looking for.

Therefor I want to load all tables in a QV document starting with a character (like 'CAQ' )using a routine function. Does anyone as an example for it? Thanks in advance.

Best regards,

Robert

2 Replies
bbi_mba_76
Partner - Specialist
Partner - Specialist

Hi,

maybe you could use some of similar

Tmp:

//sql server db

SELECT name FROM sys.Tables

//oracle db

//select Table_name as name from user_tables

where name like 'D_%'

;

qualify *;

LET v_rowTemp = NoOfRows('Tmp');

for i=1 to $(v_rowTemp)

    LET v_tabname = peek('name',$(i)-1,'Tmp');

    sql select * from $(v_tabname);

next

Anonymous
Not applicable
Author

thanks,

This works fine

Regards,

Robert

Robert Waterval

ICT

Koninklijke Mosa bv

Meerssenerweg 358

P.O. Box 1026

NL-6201 BA Maastricht

T +31 (0)43 368 8803

F +31 (0)43 363 11 77

robert.waterval@mosa.nl

www.mosa.nl<http://www.mosa.nl/>

<http://www.facebook.com/mosatiles> <http://www.linkedin.com/company/royal-mosa>

Van: Michele Barini

Verzonden: donderdag 5 juni 2014 10:54

Aan: Robert Waterval

Onderwerp: Re: - Routine for loading database tables

Qlik Community<http://community.qlik.com/>

Routine for loading database tables

reply from Michele Barini<http://community.qlik.com/people/BBI_MBA_76?et=watches.email.thread> in Scripting - View the full discussion<http://community.qlik.com/message/542404?et=watches.email.thread#542404>