Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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,

Tags (3)
1 Solution

Accepted Solutions
pljsoftware
Not applicable

Re: How can I convert a SQL to QV Script?

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

3 Replies
Not applicable

Re: How can I convert a SQL to QV Script?


> QVD1. CD nor QVD2. CD are not.

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

pljsoftware
Not applicable

Re: How can I convert a SQL to QV Script?

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

Re: How can I convert a SQL to QV Script?

Hi Panetta,

Thank you very much for your prompt answer!

Yes, it seems ok.

Thanks again!

Regards,