dbTalk Databases Forums  

Re: How to add 2 columns together

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Re: How to add 2 columns together in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Greg
 
Posts: n/a

Default Re: How to add 2 columns together - 04-06-2005 , 10:17 PM






Hi,

Feedback below..

SELECT MAX(DATALENGTH(mymemo)) FROM mytable
-- If the above is < 8000
UPDATE MYTABLE
SET MYMEMO = RTRIM(LTRIM(STR(PERCENTAGE,7)))+' '+
CONVERT(VARCHAR(8000), MYMEMO)
GO
-- If it isn't < 8000 lookup UPDATETEXT clause in SQL Server BOL

Greg


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.