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: 
Not applicable

Load from SAP: where clause on date selection

   Hello gurus!

I have an easy question which is driving me crazy!

The purpose is to load table AUFM from SAP.  The field BUDAT is a date in following notation:  20/11/2012.

I want to load only the records from 2011 & 2012, therefore I use a where clause, but no records are loaded.

What is wrong in the script:

[AUFM]:

Load
  
[MEINS] as [Base Unit_MEINS],
  
text([MATNR]) as [Material_MATNR],
  
[SHKZG] as [Debit/Credit_SHKZG],
  
[WERKS] as [Plant_WERKS],
  
[AUFNR] as [Order_AUFNR],
  
[MENGE] as [Quantity_MENGE],
  
[BUDAT] as [Posting Date_BUDAT],
  
[BWART] as [Movement Type_BWART];
SQL Select MEINS MATNR SHKZG AUFNR WERKS MENGE BUDAT BWART  from AUFM
where BUDAT > '31/12/2010'
;

Thank you for your help!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Toby,

Make sure that your DateFormat in your Qlikview script matches the format of your Date field.

So in your cause I guess it should be:

SET DateFormat='D/M/YYYY';

or

SET DateFormat='DD/MM/YYYY';

Give it a try.

Good Luck,

Dennis.

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hi Toby,

Make sure that your DateFormat in your Qlikview script matches the format of your Date field.

So in your cause I guess it should be:

SET DateFormat='D/M/YYYY';

or

SET DateFormat='DD/MM/YYYY';

Give it a try.

Good Luck,

Dennis.

Not applicable
Author

Hello Dennis!

Thank you for your help, this did the trick.