cancel
Showing results for 
Search instead for 
Did you mean: 

CurrentDate as object in Universe Design

Former Member
0 Kudos

Create object with Getdate() function in universe Design. I had tried, but no result.

I find two sites,

http://forumtopics.org/busobj/viewtopic.php?t=91514&sid=382f382c24ed3c4b29362a4d87747fdf

http://forumtopics.org/busobj/viewtopic.php?p=284562&sid=7ebc50041d51f5e65d58f17d3d71a8ed

for this but no use.

Can any one please help me to solve this problem in universe.

Thanks & Regards,

Madhu...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Madhu,

What data source is it? Is it a BW query, a SQL Server database for example?

If it is SQL Server and you want current date, use:

cast(convert(char(10),getdate(),23) as datetime)

This object will not parse because it is not associated with a table, but you will be fine when you include it in a query with any object that references a table.

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

Thanks for quick reply, I am using SQL Server2008, and BO XI 3.1.

But this answer is not solved my problem and showing the error in

Universe is: The Query does not reference a table.

Web I Rich: The query does not reference any table when attempting to build the WHERE clause. (Error: WIS 00022)

Former Member
0 Kudos

As I said, it will not parse until you use it with an object that is derived from a table.

As such, it will not parse in Designer and won't parse in Rich Client if you select just that object.

Regards,

Mark

Former Member
0 Kudos

Madhavi,

You object is not referencing a table. double click the object and u will find " tables" beside the parse option. click on it and assign to any table .click Ok. now your object should parse. Let me know if it doesn't work.

Thanks,

Karthik

Former Member
0 Kudos

Madhavi,

You object is not referencing a table. double click the object and u will find " tables" beside the parse option. click on it and assign to any table .click Ok. now your object should parse. Let me know if it doesn't work.

Thanks,

Karthik

Absolutely DO NOT do this!!!!

Karthik,

Please explain why you recommend this. It is completely the wrong approach to take.

You will potentially introduce cartesian products and all sorts of other issues.

Relative date objects never parse but always work when used with objects that are built from tables.

Regards,

Mark

Former Member
0 Kudos

Me Map,

I have seen / used in multiple universes where they refer the sysdate objects created in the universe to a table. Mostly they assign to a time dimension table.And we haven't really faced cartesian product issues. Or may be we haven't gone to the extent where we would face an issue with that. My statement might be wrong when I asked Madhavi to assign the date object to ANY table. When this object is used in combination with other objects coming other tables it might / would cause problems.

Looks like its not a good practice. Thank you for sharing the info.

Thanks,

Karthik

Former Member
0 Kudos

It's a risk that you don't need to take.

As for creating relative date objects, I've created this thread that should help people in the future:

http://www.forumtopics.com/busobj/viewtopic.php?t=152613

Regards,

Mark

Former Member
0 Kudos

>

> Thanks for quick reply, I am using SQL Server2008, and BO XI 3.1.

> But this answer is not solved my problem and showing the error in

> Universe is: The Query does not reference a table.

>

Don't worry for that message. It is normal.

You can use getdate().

Now, for WebI, I guess you want to use it with any other table don't you? You can add this CurrentDate object in any query you want instead of using it in an empty query.

If you don't like this approach then use WebI's CurrentDate function.

=CurrentDate()

Edited by: PadawanGirl on Jun 23, 2011 6:48 PM

Answers (0)