Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Script QVW

How could I convert script SQL to QVW


SQL :


from [dbo].[Vente] t

    INNER join [dbo].tempOCMPX r

on t.[Date Time] between r.[DATE DEBUT] and r.[DATE FIN]

Script QVW:

LEFT JOIN (Vente)

LOAD

    code4 ,

     datecol,

   [Code Site],

     Comp;

SQL SELECT [Date Time] as datecol

      ,[Code Site]

      ,[Code Rayon] as code4

      ,[comp] as Comp

  FROM [QlikDataWarehouse].[dbo].tempCOMP

3 Replies
swuehl
MVP
MVP

You don't need to convert because you can use your SQL in the QV script as well.

Everything after SQL SELECT is sent to and executed by your DBMS.

Anonymous
Not applicable
Author

You can just do this:

Table:

SQL SELECT [Date Time] as datecol

      ,[Code Site]

      ,[Code Rayon] as code4

      ,[comp] as Comp

  FROM [QlikDataWarehouse].[dbo].tempCOMP;

left join (Table)

SQL SELECT *

     FROM [QlikDataWarehouse].[dbo].tempOCMPX


Be careful of not creating syn keys

SreeniJD
Specialist
Specialist

As suggested by Thabang..

Use the suggested script.. and also use Qualify statement to avoid syn keys

Sreeni