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
 Transact-SQL (2000)
 update table after concatenating in Sql Server2000

Author  Topic 

saidev
Posting Yak Master

101 Posts

Posted - 2006-09-20 : 14:59:51
Hi Guys,

I have a table called "tblimport" and i have three fields called
"Agency" , "Agency1" , and "Agency2". I want to Concatenate the data from "Agency1" and "Agency2" and put it it "Agency".
can you guys help me with the Update Query. Appreciate your help
Thanks,

jhocutt
Constraint Violating Yak Guru

385 Posts

Posted - 2006-09-20 : 15:18:46
update tblimport set Agency = IsNull(Agency1, '') + IsNull(Agency2, '');


"God does not play dice" -- Albert Einstein
"Not only does God play dice, but he sometimes throws them where they cannot be seen."
-- Stephen Hawking
Go to Top of Page

saidev
Posting Yak Master

101 Posts

Posted - 2006-09-20 : 18:02:39
Hi,

Thanks for your help, also i want 25 characters space between "agency1" and "agency2" after concatenating.
can you guys help me. appreciate that
Thanks
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-09-20 : 18:27:28
[code]isnull(Agency1, '') + space(25) + isnull(Agency2, '')[/code]


KH

Go to Top of Page
   

- Advertisement -