Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report studio using sysdate

Status
Not open for further replies.

patrickjinan

Programmer
Apr 25, 2008
9
CA
Hi,
In report studio, I try to create a SQL query,
-----------------------------------
select week_code from date_dim
where date_code> To_char({sysdate}-28,'yyyymmdd')
-----------------------------------
in the properties, if I set "SQL SYNTAX" to Cognos
it gived me error mesg
----------------------------------------------
"an error occurred while performing operation 'sqlPrepareWithOptions' status='-16',
UDA-SQL-0358 Line 2 Syntax error near "-28".....
----------------------------------------------
somehow, I cannot use native sql, anybody knows how to
use Sysdate in cognos sql?

thanks a lot!


 
_add_days(current_date,-28)

is Cognos SQL

If you want to use Oracle SQL set the type to 'native'

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top