If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

need help with date interval sql

Started by vkraju, 24 Sep 2008 10:54:31 AM

Previous topic - Next topic

vkraju

Hi all i have a problem in writing a if statement
example is:

If code = '1'
then
(date1-date2)
else
if code='2'
then
(date2-date3)
else
(' ')

cognos is giving an error.
how do i write the sql for this kind of time interval using a code.

thanks
Kris

Suraj

what are you trying to filter? ???

May be this is what you need:
If code = '1'
then
([date column] between date1 and date2)
else
if code='2'
then
([date column] between date2 and date3)
else
(' ')