Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Costin17068271
Partner - Contributor
Partner - Contributor

tDBInput_1 (JDBC) SQL Builder Where with Global Variable date type

Hi,

It is a simple SCD Dim Population, with last date modified from source > max

I've created GlobalVar to get max(last date updated) in dwh layer, so data type is Datetime2 19 positions "yyyy-MM-dd HH:mm:ss"

i am using this syntax in tMap with no problems :

((Date) globalMap.get("max_date"))

The value is 2021-02-10 05:49:57 same pattern as SQL Server : GETDATE()

2021-02-10 05:51:12

This Query Works Fine in SQL Builder : 

SELECT 

 "ACCOUNTS"."ACCOUNT_ID", 

 "ACCOUNTS"."DATE_LAST_MODIFIED", 

 "ACCOUNTS"."PARENT_ID", 

FROM "ACCOUNTS"

where "ACCOUNTS"."DATE_LAST_MODIFIED">GETDATE()

I tried all sorts of quotes and double quotes plus sign etc... I saw on Web , I need please an answer from some one that achieved it

my problem is with this where

SELECT 

 "ACCOUNTS"."ACCOUNT_ID", 

 "ACCOUNTS"."DATE_LAST_MODIFIED", 

 "ACCOUNTS"."PARENT_ID", 

FROM "ACCOUNTS"

where "ACCOUNTS"."DATE_LAST_MODIFIED">((Date) globalMap.get("max_date"))

Thank you Very Much

Labels (4)
1 Reply
Costin17068271
Partner - Contributor
Partner - Contributor
Author

Really?? no one knows? ... shocking !