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 2000 Forums
 SQL Server Development (2000)
 convert big to nvarchar?????????

Author  Topic 

sachingovekar
Posting Yak Master

101 Posts

Posted - 2010-02-25 : 04:47:17
Hi ,

create table #temp22
(appid bigint, relid bigint)


insert into #temp22 values(234556,67688989)
insert into #temp22 values(234234324325556,6768354353538989)
insert into #temp22 values(2345123213156,67623412488989)

select convert(nvarchar(100),appid+'_'+relid) from #temp22
gives error: Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to bigint.
how to convert bigint datatype to varchar or nvarchar.

Regards,
Sachin

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2010-02-25 : 04:52:14
select cast(appid,nvarchar(100))+'_'+cast(relid,nvarchar(100)) from #temp22

Senthil.C
------------------------------------------------------
[Microsoft][ODBC SQL Server Driver]Operation canceled

http://senthilnagore.blogspot.com/
Go to Top of Page
   

- Advertisement -