Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
bazzaonline
Creator
Creator

Help using WHERE

Hello,  I have the below script and I want to add a WHERE in the script so it only pulls back data where the "D_Claim_Entered" is newer than 30/06/2014.  I can't get it to work.  The date is in the format 01/0/2015 00:00:00.

OLEDB CONNECT TO ...............................................xxx

LOAD   "N_CLAIM_NUMBER" AS "Claim Number",,

    "D_CLAIM_ENTERED",

    "T_SHRT_TXT";

SQL SELECT TOP 1000  "N_CLAIM_NUMBER",

    "D_CLAIM_ENTERED",

    "T_SHRT_TXT"

FROM clementine.dbo."Household_TPC_2013_Onwards_All";

STORE Notes Into Notes.qvd

1 Solution

Accepted Solutions
Not applicable

Try something like this:

OLEDB CONNECT TO ...............................................xxx

LOAD   "N_CLAIM_NUMBER" AS "Claim Number",,

    "D_CLAIM_ENTERED",

    "T_SHRT_TXT"

Where "D_CLAIM_ENTERED" > Date('30/06/2014', 'DD/MM/YYYY') ;

SQL SELECT TOP 1000  "N_CLAIM_NUMBER",

    "D_CLAIM_ENTERED",

    "T_SHRT_TXT"

FROM clementine.dbo."Household_TPC_2013_Onwards_All";

STORE Notes Into Notes.qvd

View solution in original post

4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try with

.....

SELECT "N_CLAIM_NUMBER",

    "D_CLAIM_ENTERED",

    "T_SHRT_TXT"

FROM clementine.dbo."Household_TPC_2013_Onwards_All"

Where N_CLAIM_NUMBER >= '20150101'

.....

let me know

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try

SQL SELECT TOP 1000  "N_CLAIM_NUMBER",

    "D_CLAIM_ENTERED",

    "T_SHRT_TXT"

FROM clementine.dbo."Household_TPC_2013_Onwards_All"

WHERE "D_CLAIM_ENTERED" > '30/06/2014' ;


talk is cheap, supply exceeds demand
Not applicable

Try something like this:

OLEDB CONNECT TO ...............................................xxx

LOAD   "N_CLAIM_NUMBER" AS "Claim Number",,

    "D_CLAIM_ENTERED",

    "T_SHRT_TXT"

Where "D_CLAIM_ENTERED" > Date('30/06/2014', 'DD/MM/YYYY') ;

SQL SELECT TOP 1000  "N_CLAIM_NUMBER",

    "D_CLAIM_ENTERED",

    "T_SHRT_TXT"

FROM clementine.dbo."Household_TPC_2013_Onwards_All";

STORE Notes Into Notes.qvd

PrashantSangle

Hi,

Use solution given above if not worked then try same logic with

to_Char() or to_Date() while comparing.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂