Traditional web-based reporting with SAS BI tools

Oracle Date Data Type

Reply
Contributor
Posts: 22

Oracle Date Data Type

Hi,

I use Oracle database. The date data type in the oracle table is date with include the time. such as 1/29/2011 12:34:23.

When I tried to create a filter and prompt for it, SAS took it as a timestamp data type and it took in the date and time for the prompt. how do I eliminate the time part of the date string and use the data without the time.

Also, there is no option for me to change the timestamp data type to date when I created the prompt.

Thanks,
Bob Message was edited by: databobjr
SAS Super FREQ
Posts: 407

Re: Oracle Date Data Type

One workaround is to create a new data item in the information map and convert the Oracle date to a SAS date using the datepart() function. Then use the new data item in the prompt.
Frequent Contributor
Posts: 80

Re: Oracle Date Data Type

Be carefull though as if you use a datepart then SAS can;t pass the query to Oracle and will be forced to query the entire Oracle table into a temporary SAS dataset.

Will work but would be slow on large tables.

I havent test 9.2/4.3 to see if it is better at passing this query to Oracle though.
Valued Guide
Posts: 2,174

Re: Oracle Date Data Type

> Hi,
>
> I use Oracle database. The date data type in the
> oracle table is date with include the time. such as
> 1/29/2011 12:34:23.
>
> When I tried to create a filter and prompt for it,
> SAS took it as a timestamp data type and it took in
> the date and time for the prompt. how do I eliminate
> the time part of the date string and use the data
> without the time.
>

can you make or use the prompt as a range
between &date 0:0:0 and &date 24:0:0
Ask a Question
Discussion stats
  • 3 replies
  • 299 views
  • 0 likes
  • 4 in conversation