Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
rupaliqlik
Contributor

Convert qlik code to SQL

Hi,

I  want to test the data in sql but there is an issue in SQL query.Please help me to build this query.

Qlik Code: In Below code A.qvd is Master data which contain hostorical data so I just picked up only latest record.Can we convert this query in SQL as it is?

Load EMPLID,MAX(EFFDT) AS EFFDT FROM A.QVD(QVD);

LEFT JOIN
LOAD EMPLID,EFFDT,SERVICE_DT,EMPLNAME,REG_REGION FROM A.QVD(QVD);

LEFT JOIN

LOAD REG_REGION.REG_REGION_COUNTRY,STATE FROM B.QVD(QVD);

Please guide me.

sunny t,kaushik.solanki stalwar1 

Thanks,

Rupali

Labels (1)
1 Reply
Support
Support

Re: Convert qlik code to SQL

You are asking for something we cannot do, we have no knowledge of the DB table names or anything...  I would suggest you go to the DB vendor's site on this one and look for things there to help you sort out the SQL syntax for your query there, as given these load statements and QVD files as sources, there is literally no means for anyone in the Community to translate this for you, as we know nothing about the SQL DB and its tables and fields...  There is no way to be sure the QVD field names are the field names in the SQL DB, as many times those are aliased on the load from the DB...  Hopefully this is making sense.

If you have the SQL tools on your machine to connect to the database(s) in question, generally there is a means to look at the first x rows of a table to see what the fields are etc., that is about the best point in a direction I could give you here.  Your best bet is likely to get hold of a DBA and see if they can help you with things, as they will know the DBs and tables etc. and can likely put together a query for you quite quickly.  Once you have the SQL query, if you create a Connection string to the DB in our script, you can likely paste that query straight into our script editor and run things as well.

Here is a Help link that may be of a little use, you will have to go to some sub pages etc....

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/Scrip...

Regards,
Brett

To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.