Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

Re: Can I use Inner Join SQL into Qlikview Script?

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;

Highlighted
MVP
MVP

Re: Can I use Inner Join SQL into Qlikview Script?

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.

Highlighted
Not applicable

Re: Can I use Inner Join SQL into Qlikview Script?

I want to filter the data before.

I must not create a load on the DB engine

Highlighted
Not applicable

Re: Can I use Inner Join SQL into Qlikview Script?

that query doesn't work for me.

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

asas.PNG

Highlighted
Not applicable

Re: Can I use Inner Join SQL into Qlikview Script?

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

Highlighted
MVP
MVP

Re: Can I use Inner Join SQL into Qlikview Script?

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)

Highlighted

Re: Can I use Inner Join SQL into Qlikview Script?

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