Hi,
Currently i have a filter in my web intelligence report. This filter will allow me to display all the data within the current month i run the report.
The filter is define in the universe, it is called current_month
Sales_date in the teradata table is in yyyy-mm-dd format. So the substr function is use to get yyyy-mm.
Let says i run the report today 2009-09-10, so the filter should give me 2009-09 data. When i run the report, the message given is “There is no data corresponding to this query.”
But when i copy the SQL from webi to my teradata SQL assistant, it give me the data that i want!
I doubt the substr(current_date,1,7) is not match with the substr(sales.sales_date,1,7)…Should i format the current_date to yyyy-mm-dd?
I’m no teradata sql specialist, but I’m pretty sure that when you use substr() the result will be of data type character.
current_date is the date function of teradata sql?
As CurrentDate() is the one of oracle?
So if you create a current date object, create it as just
current_date
and set the type to date.
Does that parse?
( In this case the message should be the query does not reference a table, since you are not referencing a table, any other message indicates a real error)
Try a query with this object and some other object (from a small table) in your universe,
and see visually if it pulls back the current date.
If you create a ‘current month’ version, try
substr(current_date)
and set the type to character.
Does that parse?
Try a query with this object and some other object (from a small table) in your universe,
and see visually if it pulls back the current month as string in the format yyyy-mm.
You should be able to work out where it goes wrong…
May be your sql tool allows some functions or variable references that are not pure sql…