Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Load Data From SQL

OLEDB CONNECT32 TO ******

LOAD BRCODE,
     
DECDDT,     //This is Timestamp in format ‘YYYY-MM-DD 00:00:00 000’
     
DECDTIME,
     
ORDNO,
     
IVNO,
     
IVDT,
     
SR,          //Supplier
     
PNO,         
     
PURQTY,
     
PURAMT,
     
CURR,
     
CREAID,
     
REFERENCE,
     
BRNO,
     
ORDTYPE;
SQL SELECT *
FROM PPMSDB1.dbo."PMS_PURCHASE";

1) How to write below SQL code in QlikView Script?

Select BRCODE, SR, SUM(PURAMT) From PMS_PURCHASE

Where (BRCODE = '123') and (DECDDT >= '2013-11-01')

Group By SR, BRCODE

Order By SUM(PURAMT) DESC

2) How can I convert DECDDT in ‘DD/MM/YYYY’

1 Reply

Re: Load Data From SQL

Try date(date#(left(DECDDT,10),'YYYY_MM_DD'),'DD/MM/YYYY')


talk is cheap, supply exceeds demand
Community Browser