Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Partner
Partner

sql

Hi Community,

only a question

If I create a sql script and I run it on Windows platform (sql management studio) implementation goes smoothly.

I copy/paste the script to the editor qlik, I run but the execution is not successful.

Question:

Is there a difference in the writing of commands between Windows and sql sql  "" qlik ?

Example:

I need to creat a view

sql

with

viag ( a, b, c, d, e, f)

as (

     select a, b, c, d, e, f

            from as400.library."xxxxxxx"

            where

            (a <> b or c <> d or e <> f)

union all

     select a, b, c, d, e, f

      from as400.library."xxxxxxx"

)    

5 Replies
ahaahaaha
Honored Contributor

Re: sql

Expression SQL SELECT by programm Qlik  is interpreted by the ODBC or OLE DB driver, so depending on the capabilities of ODBC or OLE DB driver may arise from deviation in common SQL syntax.

satheshreddy
Contributor III

Re: sql

Hi Fabio,

Before writing a script You should take a connection with Database.

and one more thing  some functions Syntax Is Different In Qlikview.

Try to use concatenate  key word in between two query.

Regards

Sathish

Highlighted
Partner
Partner

Re: sql

Hi,

odbc connection is ready.

I'm using it normally but if I try to add a view, it doesn't work

MVP
MVP

Re: sql

I think you miss the select statement at the end

This is an example I tried on a sql server db from Qlikview script and it works

SQL

with cte (id_data, dat_data)

as

(

SELECT id_data, dat_data FROM "sisim_stat".."d003_date"

union all

SELECT id_data, dat_data FROM "sisim_stat".."d003_date"

)

select * from cte;

lakshmikandh
Valued Contributor II

Re: sql

directly try this

SQL select a, b, c, d, e, f

            from as400.library."xxxxxxx"

            where

            (a <> b or c <> d or e <> f)

union all

     select a, b, c, d, e, f

      from as400.library."xxxxxxx"