Use this query i am retriving all years OCt data from 01-10-2004 to 30-10-2007 i need to restrect this query to current date and current year [gosales_goretailers].[Orders].[Order month]between 01 and to_number(to_char(current_date,'MM'))and [gosales_goretailers].[Orders].[Order month]=to_number(to_char(current_date,'MM'))pass polar ID

Showing Answers 1 - 4 of 4 Answers

raju

  • Nov 23rd, 2005
 

You have a function called 'extract' in cognos.

Ex:- extract(month,the dte field). by giving like this you will get month. so you can keep a filter to restrict the rows only for october.

  Was this answer useful?  Yes

NagaShilpaV

  • May 20th, 2009
 

Using Current_Date function, you will get the current date. Then use the extract function to extract day, month and year. Then hardcode the filter in the query for day and year.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions