cancel
Showing results for 
Search instead for 
Did you mean: 

Universe repointed to Netezza Database is not working correctly

former_member211289
Participant
0 Kudos

Hi All,

In the universe ,I need to convert the SYSDATE in Oracle Function to a similar function in Netezza.

When I try using now(), current_date or current_timestamp (netezza function), I got the message showed in the screenshot.

Kindly check the attached image and do the need full.

Thanks

Ram

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The object SQL should simply be CURRENT_DATE

It will not parse but it will work fine when you use it with other objects that are based on tables.

former_member211289
Participant
0 Kudos

Hi Mark,

Do you want me to use any one of the below syntaxes ?

1.SELECT
date(current_Date) from dual;

2.select add_months(current_date,0) from dual;

3.SELECT Current_Date AS ANSI_Date


or else simply current_date,

-------------------------------------------------------------

My customer used previous syntax i.e., SELECT


date(current_Date) from dual; and
is working fine in db level .


When he tried date(current_Date) from dual; in universe it will not parse ,even though do I continue in report with this object?

Former Member
0 Kudos

Just use CURRENT_DATE in the data object. It doesn't need DUAL - that's an Oracle concept, not Netezza.

former_member211289
Participant
0 Kudos

Mark

My customer already used current_date in select box ,but it is not parsing

Former Member
0 Kudos

As I said yesterday, it won't parse. Just use it with table-based objects. The parser is expecting a table (e.g. SALES_FACT.SALES_VALUE) but system functions work differently and where no input is required, such as CURRENT_DATE, you won't parse them. Don't associate a table with it to get it parsed because then you'll include that table in every query, whether you need it or not and will potentially get wrong results.

Answers (1)

Answers (1)

former_member198519
Active Contributor
0 Kudos

Try this sql for netezza, if you only need the current date or if you are fetching it from any table use the table name instead of dual:

Select date(Current_date) from dual

former_member211289
Participant
0 Kudos

Kuldeep,

When we use this syntax in in Netezza DB,it is working fine .

But When we use this syntax in Universe it is throwing an error .

Kindly give your output.

former_member198519
Active Contributor
0 Kudos

Can you try:

add_months(current_date,0)

former_member211289
Participant
0 Kudos

kuldeep,

previous syntax i.e., SELECT
date(current_Date) from dual;
is working fine in db level but not in universe.

Is it connection issue between universe and db ?If yes

Kindly let me know the reason.

former_member198519
Active Contributor
0 Kudos

i guess the date() function is specific to Netezza. The function is not present in Universe designer, that might be the reason you are facing this issue

amitrathi239
Active Contributor
0 Kudos

what is the equivalent function of currentdate in your Netazza based universe.

use that one while creating object.it will not parse but use in the report it will work..

if it will not work then share your object screen ****

former_member211289
Participant
0 Kudos

Amit,

Kindly check the attached one.

former_member211289
Participant
0 Kudos

Amit,

I searched in google about this issue ,different syntax mentioned for current date in Netezza DB.

1.SELECT
date(current_Date) from dual;

2.select add_months(current_date,0) from dual;

3.SELECT Current_Date AS ANSI_Date

Kindly check these amit and let me know which one do I prefer.

amitrathi239
Active Contributor
0 Kudos

This is fine what you have mentioned in the select. can you try to include this object in report and see if it is working or not.

former_member198519
Active Contributor
0 Kudos

Try not parsing the object, just create it and test the objects in a webi report. See if it is fetching the current date or not?