Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

ngreddy1982
New Contributor

QVD help - sql

I am trying to join 4QVDs ,

1 : table I have internet orders and reason code for return ,

2 : I have internet orders and delivery company used ,

3 I have order number and country shipped to

4 I have order number and weight.

Can you please help me to get them all to one table .

1 Solution

Accepted Solutions
ganeshsvm
Contributor

Re: Query help please - sql

Hi, You may try like this,

Table1:

LOAD Field1,

           Field2,.......

FROM (filepath);

Join(Table1)

Table2:

LOAD Field1,

           Field2,.......

FROM (filepath);

Join(Table1)

Table3:

LOAD Field1,

           Field2,.......

FROM (filepath);

Join(Table1)

Table4:

LOAD Field1,

           Field2,.......

FROM (filepath);

Note: Based on the logic for your table relationship, you have to use joins(LEFT, RIGHT, INNER, OUTER)

Follow these links for more info about joins in QlikView

Hope this helps,

-Ganesh

7 Replies

Re: Query help please - sql


please don't post the same question multiple times:

Query help please


some sample lines from each of your tables and your expected result might help to find a solution.


thanks


regards


Marco

ngreddy1982
New Contributor

Re: Query help please - sql

Sorry , but no one had answered , I was looking for help.

shrikantpatil
New Contributor

Re: Query help please - sql

you need SQL query with join or Qlik load statements?

select orderID, reason, delivery_company, country_shipped , weight from Table 1 a inner join table 2 b

on  a.orderid=b.orderid inner join table 3 on a.orderid=c.orderid  inner join table 4 d on a.orderid=d.orderid

vijayptcs
New Contributor III

Re: Query help please - sql

Can you please share some screen shot ....

sumit_ranjan_pa
Contributor

Re: Query help please - sql

Hi Giridhar,

QlikView by default uses associative  model to connect data . That means if two table have similar similar data and field name they will be associated and selection in one table will be reflected in another.  Explicit join is not something used really often when not needed or if you have really large data model. 

Please provide some more details on the query required.

Thanks and regards,

Sumit

stonecold111
Contributor

Re: Query help please - sql

Use join condition based on common columns

they all come in one table

ganeshsvm
Contributor

Re: Query help please - sql

Hi, You may try like this,

Table1:

LOAD Field1,

           Field2,.......

FROM (filepath);

Join(Table1)

Table2:

LOAD Field1,

           Field2,.......

FROM (filepath);

Join(Table1)

Table3:

LOAD Field1,

           Field2,.......

FROM (filepath);

Join(Table1)

Table4:

LOAD Field1,

           Field2,.......

FROM (filepath);

Note: Based on the logic for your table relationship, you have to use joins(LEFT, RIGHT, INNER, OUTER)

Follow these links for more info about joins in QlikView

Hope this helps,

-Ganesh