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

SQL Query in Qlikview

Hi All

How to write this query in Qlikview:

select  ABC_AREACD, ABC_AREAFG,XYZ_DATETRAN, sum(XYZ_NEWTRAN), sum(XYZ_BAL) from fgh_bb_tran

inner join fgh_xx_inv on (ABC_ID = XYZ_ID  and XYZ_DATETRAN between '2016-07-01' and  '2016-07-20'

and XYZ_FLAGAA='MM' and XYZ_FLAGBB = 'JJ')

inner join Master on (XYZ_IDTRAN = MNO_IDTRAN)

where MNO_Val = 'KK'  and xyz_area = 'PP' and ABC_AREACD = 'XX' group by  ABC_AREAFG, XYZ_DATETRAN ;

Regards

Eric

7 Replies
Not applicable
Author

Any one....???

sreenivas
Creator III
Creator III

You can call directly the SQL Statement.

First add the connection string and then add the below query.

select  ABC_AREACD, ABC_AREAFG,XYZ_DATETRAN, sum(XYZ_NEWTRAN), sum(XYZ_BAL) from fgh_bb_tran

inner join fgh_xx_inv on (ABC_ID = XYZ_ID  and XYZ_DATETRAN between '2016-07-01' and  '2016-07-20'

and XYZ_FLAGAA='MM' and XYZ_FLAGBB = 'JJ')

inner join Master on (XYZ_IDTRAN = MNO_IDTRAN)

where MNO_Val = 'KK'  and xyz_area = 'PP' and ABC_AREACD = 'XX' group by  ABC_AREACD,ABC_AREAFG, XYZ_DATETRAN ;

Not applicable
Author

I dont want to use Connection String.

I have already fetched the Tables.

Now, I want to write code in Qlikview referring SQL Query.

Not applicable
Author

Need Help.

marjan_it
Creator III
Creator III

what do you mean you dont want to use connection string. how did you fetch data from database in to qlikview?!

saimahasan
Partner - Creator III
Partner - Creator III

If you have already fetched the data and stored in qvd then you need to convert your sql query into Qlikview code. Or else if you want to use SQL query then you need to have a connection string and then write your sql code directly

jonathandienst
Partner - Champion III
Partner - Champion III

Its hard to figure out from the information you provided because it is not clear which fields are in which tables. I suggest that you supply a small sample of the tables in an Excel or csv file. You may also want to do some of the filtering when loading the original tables from SQL to simplify and accelerate this operation.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein