system
November 13, 2017, 7:45am
#1
Hi there,
I have a requirement to create a dimension in IDT that contains an independent date say, “Reporting Date” not derived from any table.
The reports are going to use this as base date.
I have tried using to_date or even sysdate but it returns an error “The query does not reference any table when attempting to build the WHERE clause. (IES 00022)”
Can anyone plz help me out.
M a bit new to this.
Thanks in advance… :o [/b]
Nilesh Mishra (BOB member since 2017-07-11)
system
November 13, 2017, 7:57am
#2
Do you want to display the current date or some other date?
surya_sudheer (BOB member since 2006-11-01)
system
November 13, 2017, 8:40am
#3
I want to display other date e.g 15 NOV 2015
Nilesh Mishra (BOB member since 2017-07-11)
MarkP
November 13, 2017, 9:14am
#4
It’s an old topic but a good one:
As per this topic on Oracle relative dates, here’s the same set of dates in SQL Server.
Please note that some may not work on SQL Server 2000, but all definitely work in 2005/8.
Yesterday
cast(convert(char(10),dateadd(d,-1,getdate()),23) as datetime)
Today
cast(convert(char(10),getdate(),23) as datetime)
The following also works for today:
dateadd(dd, datediff(dd,0,getdate()), 0)
Start of Current Month
cast(convert(char(7),getdate(),23)+'-01' as datetime)
End of Current Month
dateadd(d,-1…
system
November 13, 2017, 9:25am
#5
You can use an irrelevant database field, and input the date as a prompt with a condition that would always be satisfied.
mikeil (BOB member since 2015-02-18)
system
November 14, 2017, 12:14pm
#6
Create a prompt in the universe. It won’t validate (parse), but that’s OK
jemstar (BOB member since 2006-03-30)