Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
fmazzarelli
Partner - Creator III
Partner - Creator III

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
Partner - Master
Partner - Master

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
Creator III
Creator III

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

fmazzarelli
Partner - Creator III
Partner - Creator III
Author

Hi,

odbc connection is ready.

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

maxgro
MVP
MVP

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
Specialist II
Specialist II

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"