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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ReportNet Tabular SQL - accept variable/function?

Status
Not open for further replies.

bunwong

IS-IT--Management
Mar 15, 2004
13
HK
Hi all,

Did you have any experience embedding variable/function in ReportNet Tabular SQL? e.g. can I use something like today() function in my Tabular SQL? I need to have constant string date of today in the SQL. (Due to other limitation, today() function in the RDBMS side won't work)

I know that a prompt can be used in tabular SQL by using the syntax #prompt("xxx")#. But seems that this is the only possible varible/function people have mentioned in the Web.


Thanks,

Bun
 
Hi,

If you are using Cognos SQL in your Tabular SQL object, you can simply refer to current_date as a column.

eg. select
Order_header.ORDER_DATE as Order_date,
current_date as Todays_Date
from
gosales...ORDER_HEADER Order_header

If you are using Native SQL, then I'm afraid your database would have to be generating the date for you using something like the current_timestamp function for SQL Server.

Regards,

MF.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top