cancel
Showing results for 
Search instead for 
Did you mean: 

Create a filter based on from date and to date in a view in Information Steward 4.0

Former Member
0 Kudos

Hello,

We have a requirement for which we are accessing SAP ECC 4.0 and creating views based on standard SAP tables CDHDR & CDPOS. Since these tables are huge tables, we have put the filter condition to select only a specific table and specific field and only for past 7 days. We were able to put this date filter using date_diff function. But now our requirement is to to filter the data for date range. We could filter the data for a single date by using condition as

UDATE = to_date('01/11/2012','mm/dd/yyyy')

but we are not able to put that for a date range. When we try to put the condition as

UDATE  between to_date('01/11/2012','mm/dd/yyyy') and to_date('01/18/2012','mm/dd/yyyy')

it is giving an error as "Syntax error at identifier" (COR-10611).

Please help at the earliest since we need to provide the resolution to the client.

Thanks in advance

Minakshi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Minakshi,

Why not use 2 filter conditions:

UDATE > to_date('01/11/2012','mm/dd/yyyy')

AND

UDATE < to_date('01/18/2012','mm/dd/yyyy')

Regards,

Marc

Former Member
0 Kudos

Thanks Marc.

It did work and this simple thing did not strike me.

Thanks once again for all your help.

Regards

Minakshi

Answers (1)

Answers (1)

vpawate
Explorer
0 Kudos

How would you write an expression that would filter data 2 months before system date (last two months) .. thought this was very simple but tried a few methods - none of them worked. 

Former Member
0 Kudos

date.field >= to_date(add_months(sysdate(),-2),'YYYY.MM.DD')

and

date.field <= sysdate()

vpawate
Explorer
0 Kudos

Thanks at ton, Dan,  Works perfectly !!

Wanted to give points but since the 'Correct Answer' is already set for this thread - I am unable to.

0 Kudos

Hi,

Im trying to do something similar where I want the sysdate to be 1 month before ERSDA (Created on date). This is my data:

Sysdate_30: I added this (add_months(sysdate(),-11) to make the sysdate 1 month before ERSDA (Created on date).

I tried this in my view but got this error:

Would really appreciate quick help on this! 🙂