BusinessObjects Board

Convert Year object from Numeric to Character Type

Hello, what is the syntax to convert a year object (YYYY) from Numeric to character? Am using SQL.

TIMEDIM_SO_BILLING_DATE.FISCAL_YEAR

Secondly, can anyone recommend sites to lookup SQL functions to define Universe objects? Somewhere simple without alot of verbage - Syntax, explanation and example. There’s a couple of really good sites, that don’t mince words. Microsoft’s site thus far, has been unhelpful.

Thank you,
Universe and Report Developer


Report Writer :us: (BOB member since 2002-09-25)

Hi,

Which database do you use?

And, this can help:


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

Hi,

SAP Sales and Distribution Module (db) of which the data is pulled into a BO Rapid Mart. The Universe connects to the Rapid Mart.

Hope this answers your question. Thanks for the link, I’ve bookmarked it.


Report Writer :us: (BOB member since 2002-09-25)

Which database - Oracle, MS SQL server, DB2, etc. - is the rapid mart hosted on?


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

If it’s SQL Server, this will work:

convert(char(4),TIMEDIM_SO_BILLING_DATE.FISCAL_YEAR)

In case of Oracle, try:

to_number(TIMEDIM_SO_BILLING_DATE.FISCAL_YEAR)

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

Read the question Marek…

Shouldn’t it be to_char? :wink:

Yes, my bad. Did not read it properly :slight_smile:

It should be to_char() instead of to_number() in this case.


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