BusinessObjects Board

What is the correct syntax of "Today-1" object?

Hello,

I would need to schedule a report on BO 5. For this purpose I would need an object to create in BO designer to reference to it in the query.

Each day I would need to get information from previous day. I plan to limit the date to object with “Today-1” date value. So I created an object:

Name:
Today-1

Select:
Dateadd(dd,-1,Getdate())

But it is not correct as clicking on parse gives “Incorrect syntaxt near From”

Could you please help me to write the correct commands?
Any info is highly appreciated.

Thanks a lot!

Ondrej


ovyhnal (BOB member since 2007-08-13)

Hi,

Here i have attached screenshot for your clarification

Regards,

Tamil
today-1.doc (38.0 KB)


Tamil :india: (BOB member since 2007-07-11)

Hi Ondrej,

all objects based on Getdate() (or for instance Sysdate for Oracle) don’t parse because they do not reference any table.

However, these objects work just fine when you combine them in the query with any other universe objects. Try and see :wink:

[Moderator Note: And I am moving the topic from BusinessObjects Classic forum to Semantic Layer when Designer and universe related issues are discussed.]


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Thanks a lot Marek,

I just figured out that I have to create condition (yellow) object with this definition and it works then.

dbo.Jobseeker.DateDeleted* = dateadd(dd,-1,getdate())

That’s the object I need to limit to Today-1

Thanks a lot!
Ondrej


ovyhnal (BOB member since 2007-08-13)

You certainly can create predefined conditions like that, and they should parse. However I believe there is some benefit to having “generic” objects for Yesterday, Today, Start of this Week, and so on. The fact that these objects do not parse should not be a concern.

It is covered in our faq:

In our database faq:

And in a series of posts on my blog as well. The first post in the series talked about setting up Today and Yesterday, and why you would want to create predefined conditions (as you showed) but also reasons why that might not be a great idea. :slight_smile:


Dave Rathbun :us: (BOB member since 2002-06-06)

Thanks a lot Dave! Extemely useful information!!!

Ondrej


ovyhnal (BOB member since 2007-08-13)