Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
New Contributor III

Re:Sql

Hi all,

how sql queries are used while connecting to any database

Thanks

Vijay

1 Solution

Accepted Solutions
Highlighted
Honored Contributor

Re:Sql

First of all, you have to create the connection (use the panel below the script mode). Then, LOAD the attributes and you can do the SQL query. The structure is like this one:

OLEDB CONNECT32 TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=xxxx;Data Source=xxxx;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=xxx;Use Encryption for Data=False;Tag with column collation when possible=False];

ABC:

LOAD*;

SQL SELECT *

FROM "YOUR_TABLE";

Example 2:

OLEDB CONNECT TO [Provider=...........=""] (XPassword is XXXXXXXXXXXXXXXXXXXXXXXXXXXXX);

BCD:

Load *;

SQL SELECT NLFDSTATIONNR,

    SSTATIONBEZ

FROM QSYS.STATION;

Join

SQL SELECT

    NLFDSTATIONNR ,

    DTTSPROBE,

    SZUSINFO1

FROM QSYS.STICHPROBE

where SZUSINFO1='590129204B232P';

View solution in original post

1 Reply
Highlighted
Honored Contributor

Re:Sql

First of all, you have to create the connection (use the panel below the script mode). Then, LOAD the attributes and you can do the SQL query. The structure is like this one:

OLEDB CONNECT32 TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=xxxx;Data Source=xxxx;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=xxx;Use Encryption for Data=False;Tag with column collation when possible=False];

ABC:

LOAD*;

SQL SELECT *

FROM "YOUR_TABLE";

Example 2:

OLEDB CONNECT TO [Provider=...........=""] (XPassword is XXXXXXXXXXXXXXXXXXXXXXXXXXXXX);

BCD:

Load *;

SQL SELECT NLFDSTATIONNR,

    SSTATIONBEZ

FROM QSYS.STATION;

Join

SQL SELECT

    NLFDSTATIONNR ,

    DTTSPROBE,

    SZUSINFO1

FROM QSYS.STICHPROBE

where SZUSINFO1='590129204B232P';

View solution in original post