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)
 Cognos to SQL conversion

Author  Topic 

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2009-10-01 : 07:54:57
Dear All,

I am having the query of Cognos i do need to convert these queries to SQL server 2005.Can somebody pls assist me in this.

(ltrim((rtrim((cast_numberToString(cast_integer(T1."Group_Number"))))))) || '-' || (ltrim((rtrim((cast_numberToString(cast_integer(T1."Id102"))))))) || '-' || (ltrim((rtrim((cast_numberToString(cast_integer(T1."Id202"))))))) || '-' || (ltrim((rtrim((cast_numberToString(cast_integer(T1."Id3"))))))) as c12,

sanoj_av
Posting Yak Master

118 Posts

Posted - 2009-10-01 : 08:12:24
Select
(ltrim((rtrim((cast(cast(T1."Group_Number" as Int)AS VARCHAR(100))))))) + '-' +
(ltrim((rtrim((cast(cast(T1."Id102" as Int)AS VARCHAR(100))))))) + '-' +
(ltrim((rtrim((cast(cast(T1."Id202" as Int)AS VARCHAR(100))))))) + '-' +
(ltrim((rtrim((cast(cast(T1."Id3" as Int)AS VARCHAR(100))))))) as c12
from
T1
Go to Top of Page
   

- Advertisement -