Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rupaliqlik
Creator
Creator

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.

,kaushik.solanki stalwar1 

Thanks,

Rupali

Labels (1)
1 Reply
Brett_Bleess
Former Employee
Former Employee

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 do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.