Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SQL Equvalent query for Cognos Function

Author  Topic 

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2009-10-06 : 02:27:08
Dear All,

Can anybody help me in solving this problem.
This is Cognos query i need to convert into SQL 2005.

Select xyz=((YMDINT_EXTRACT(DATETIME_TO_YMDINT((CDATETIME(LASTDAY(CDATE(T1."INVOICE_CREATE_PERIOD_DT_IH"))))),4))) from T1


pls help me in this regard.

Thanks,
Gangadhar

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-06 : 03:07:17
quote:
Originally posted by gangadhara.ms

Dear All,

Can anybody help me in solving this problem.
This is Cognos query i need to convert into SQL 2005.

Select xyz=((YMDINT_EXTRACT(DATETIME_TO_YMDINT((CDATETIME(LASTDAY(CDATE(T1."INVOICE_CREATE_PERIOD_DT_IH"))))),4))) from T1


pls help me in this regard.

Thanks,
Gangadhar


What does this do?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2009-10-06 : 03:10:37
I don't know thats y i asked ?
I think if some one knows cognos they might know this.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-06 : 03:13:44
quote:
Originally posted by gangadhara.ms

I don't know thats y i asked ?
I think if some one knows cognos they might know this.



You should post your question at cognos forum
Well. Google for these functions and see if you get any help

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2009-10-06 : 04:32:10
If you don't know what it does then how can you verify that whatever we give you is correct? It would be a lot easier for us to help you if you post what is put in to the function and what you get out...

- Lumbago
http://xkcd.com/327/
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-10-06 : 04:43:07
[code]SELECT DATEADD(MONTH, DATEDIFF(MONTH, -1, t1.[INVOICE_CREATE_PERIOD_DT_IH]), -1) AS xyz
FROM t1[/code]


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -