Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I convert a SQL to QV Script?

Hello.

Now I'm working for a project to convert an application built in MS Excel to QlikView.

I understand these two are based on different concepts, however, because the result of the applicaiton should be the same, some codes are needed to be converted simply...

What I'm in stuck is this.

There are two qvd files and I want to manage this function in qv script.

-----------------------------------------------------

SELECT *

FROM QVD1, QVD2

WHERE QVD1.CD = QVD2.CD

AND QVD1.DATE >= QVD2.RANGE_FROM

AND QVD1.DATE < QVD2.RANGE_TO

-----------------------------------------------------

QVD1. CD nor QVD2. CD are not.

Does any body have any ideas or solution?

Thank you very much.

Regards,

1 Solution

Accepted Solutions
pljsoftware
Creator III
Creator III

Hi Seiko,

to do these select you can make

qualify *;

unqualify CD;

T:

LOAD *

FROM QVD1.qvd (qvd);

inner join (T)

LOAD

     *

FROM QVD2.qvd (qvd);

unqualify *;

T_Result:

NoConcatenate

Load

     *

Resident T

where

T.DATE >= T.RANGE_FROM

AND T.DATE < T.RANGE_TO;

drop table T;

After the first two load check the names of colums in table T, I think they start with T.

So in the table T_Result you must to insert the correct name in where.

Regards

Luca Jonathan Panetta

PLJ Software

View solution in original post

3 Replies
Not applicable
Author


> QVD1. CD nor QVD2. CD are not.

Sorry I meant "QVD1. CD nor QVD2. CD are not unique"

pljsoftware
Creator III
Creator III

Hi Seiko,

to do these select you can make

qualify *;

unqualify CD;

T:

LOAD *

FROM QVD1.qvd (qvd);

inner join (T)

LOAD

     *

FROM QVD2.qvd (qvd);

unqualify *;

T_Result:

NoConcatenate

Load

     *

Resident T

where

T.DATE >= T.RANGE_FROM

AND T.DATE < T.RANGE_TO;

drop table T;

After the first two load check the names of colums in table T, I think they start with T.

So in the table T_Result you must to insert the correct name in where.

Regards

Luca Jonathan Panetta

PLJ Software

Not applicable
Author

Hi Panetta,

Thank you very much for your prompt answer!

Yes, it seems ok.

Thanks again!

Regards,