Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can I use Inner Join SQL into Qlikview Script?

Hi everyone!

I want to use a SQL Query with INNER JOIN into QlikView because I don't want to load all data from the DataBase,

* I don't want to use Qlikview Joins

I´m trying this...

Invent1:

LOAD

  INV.AUFNR AS [ODM],

  MTO.SWERK AS [EP],

  MTO.AUART AS [Tipo de Movimiento],

  MTO.EQFNR AS Sistema,

  num#(INV.MENGE,'#,##0.00','.',',') AS [#CantidadDeIngresos];

SELECT DISTINCT

  INV.MENGE,

  INV.AUFNR,

  MTO.SWERK,

  MTO.AUART,

  MTO.EQFNR

FROM

  ZTMM_ANT_INVENT1 INV INNER JOIN ZTMM_ORD_MANTTO MTO

  ON (INV.AUFNR = MTO.AUFNR)

... doesn't work

7 Replies
sunny_talwar

It seems you are still doing the Inner join in the SQL. Inner join in QlikView would be like this:

Table1:

LOAD *

FROM Source1;

Inner Join(Table1)

LOAD *

FROM Source2;

swuehl
MVP
MVP

What do you mean with 'doesn't work'?

The SQL part of your script will be sent to the SQL driver as is and executed outside of QV, so if it doesn't work, you need to look into your SQL code / driver.

Not applicable
Author

I want to filter the data before.

I must not create a load on the DB engine

Not applicable
Author

that query doesn't work for me.

another queries run wel, only in this part the script doesn't work.

asas.PNG

Not applicable
Author

sorry, i found the problem...

I had to remove the Alias in the Load

Invent1:

LOAD

       AUFNR AS [ODM],

       SWERK AS [EP],

       AUART AS [Tipo de Movimiento],

       EQFNR AS Sistema,

       num#(MENGE,'#,##0.00','.',',') AS [#CantidadDeIngresos];

SQL SELECT

       INV.MENGE,

       INV.AUFNR,

       MTO.SWERK,

       MTO.AUART,

       MTO.EQFNR

FROM

  ZTMM_ANT_INVENT1 INV INNER JOIN ZTMM_ORD_MANTTO MTO

  ON INV.AUFNR = MTO.AUFNR

swuehl
MVP
MVP

It says something like 'field not found'.

Try something like

Invent1:

LOAD

  AUFNR AS [ODM],

  SWERK AS [EP],

  AUART AS [Tipo de Movimiento],

  EQFNR AS Sistema,

  num#(MENGE,'#,##0.00','.',',') AS [#CantidadDeIngresos];

SELECT DISTINCT

  INV.MENGE.

  INV.AUFNR,

  MTO.SWERK,

  MTO.AUART,

  MTO.EQFNR

FROM

  ZTMM_ANT_INVENT1 INV INNER JOIN ZTMM_ORD_MANTTO MTO

  ON (INV.AUFNR = MTO.AUFNR)

sunny_talwar

Great, If you found what you wanted, please close this thread by marking your own answer as correct