Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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

qlikview script for the SQL.

Hi All,

I am trying to convert below sql to Qlikview terms.

While fetching sourceOrderNumber in qlikview terms, should i use inner join. If so there are three tables, in which order should i load in qlikview.

select r.request_id,

          (select rpv.value_string from icareprd_cid_admin.request_param rp, icareprd_cid_admin.request_param_value rpv where rp.request_id = r.request_id and rp.param_id = 1144 and rp.value_id = rpv.value_id) as sourceOrderNumber,

          r.request_creation_date as orderDate

          from icareprd_cid_admin.request r

Please give me some idea to proceed..

Tags (4)
4 Replies

qlikview script for the SQL.

Hi,

I suggest you to use joins to get connected this tables and by the help of where clause like you use in SQL query or load the all tables and then create a resident table of that one like with the help of Where clause

And join the tables with your where condition like

Table1:

Load *

From Data

Table2:

Join(Table1)

Load *

From Data

where Table1.request_id = Table2.request_id and

param_id = 1144 and Table1.value_id = Table2.value_id;

Some think like this

Rgds

Anand

Not applicable

qlikview script for the SQL.

Hi Anand

Thanks for ur reply. But in where condition table1. field name will not work.

It is saying field name not found. any other idea ?

SunilChauhan
Esteemed Contributor

qlikview script for the SQL.

use

table1:

load * from

tab1

where cond if any;

inner join(table1)

load * from

tab2where cond if any;

inner join(table1)

load * from

tab1

where cond if any;

if get field not found ,

then check in ur table load weither field renamed using as Clause.

or check the name written correct .please follow case sensitive syntax

qlikview script for the SQL.

Hi,

Sorry make a resident table of the table after join and then use resident table use the where condition on that table

Table1:

Load *

From Data

with where condition

Join(Table1)

Load *

From Data

with where condition

load *

resident Table1

where Table1.request_id = Table2.request_id and

param_id = 1144 and Table1.value_id = Table2.value_id;

HTH

Rgds

Anand