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

Multiple LOAD tables from single SQL

Is it possible to create multiple table from a single SQL statement? I Have a need to join the master calendar table to more than one date fields in the same table & I am thinking of loading the same table again and again & join to different date columns.

Thoughts?

Thanks,

Dinesh.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Dinesh,

Instead of doing several loads, unless specifically necessary, I'd load just once, renaming the date field, using field length for example

Table: Field1, Field2, If(Len(DateField1) > 0, DateField1, If(Len(DateField2) > 0, DateField2)) as DateField


depending on your data source, of course. Anyway, QlikView concatenates implicitly if all fields are named alike, so you can concatenate under the same table label as many sql/load statements as you want, provided they return always the same number of fields with the same name.

Nevertheless, you can use CONCATENATE keyword before the LOAD to force QlikView concatenate several sql/load statements, but you will have to take care on date field names, as you want all of them to link to the master calendar.

Hope this helps!

View solution in original post

1 Reply
Miguel_Angel_Baeyens

Hello Dinesh,

Instead of doing several loads, unless specifically necessary, I'd load just once, renaming the date field, using field length for example

Table: Field1, Field2, If(Len(DateField1) > 0, DateField1, If(Len(DateField2) > 0, DateField2)) as DateField


depending on your data source, of course. Anyway, QlikView concatenates implicitly if all fields are named alike, so you can concatenate under the same table label as many sql/load statements as you want, provided they return always the same number of fields with the same name.

Nevertheless, you can use CONCATENATE keyword before the LOAD to force QlikView concatenate several sql/load statements, but you will have to take care on date field names, as you want all of them to link to the master calendar.

Hope this helps!