Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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!
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!