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)
 Merge Coloumn

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-11-07 : 07:41:18
Payal Shah writes "Hello

I have question regarding merging table. I have Asset Number in one table and Asset Name in one table. Can i merge two coloumn and add as third coloumn in sql

No Name
001 Computer
002 Printer
003 Computer
004 Copier


I want to add third coloumn that shows like following

Asset
001- Computer
002- Printer
003- Computer
004- Copier

Any help would be appreciated.
Thanks
Payal Shah"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-07 : 07:42:42
Select cast(No as varchar)+' ~ '+Name from yourTable

Madhivanan

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

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2005-11-07 : 08:03:44
Also you can try

Select Convert(Varchar(10),No) + '-' + Name As Asset From <TableName>


Complicated things can be done by simple thinking
Go to Top of Page
   

- Advertisement -