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)
 Easy question

Author  Topic 

David Lopez
Starting Member

19 Posts

Posted - 2005-06-30 : 02:59:43
Is there a way to mis two COlumns from an old table to ONE column from a new table?

I believe it is something with "&" stuff, but canñt find any syntax on it.

Also, anybody can recommend me a good book on SQL Server 2003, with explenation of the server + SQL course.

Many thx,

David

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-06-30 : 03:10:18
Do you want to concatenate two columns from one table and store it as one column in other table?

Insert into NewTable(column) Select col1+','+col2 from OldTable
Make sure you are using correct datatype to hold the result

Madhivanan

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

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-06-30 : 03:10:22
huh? do you mean concatenate? try the + operator.



-ec
Go to Top of Page

David Lopez
Starting Member

19 Posts

Posted - 2005-06-30 : 07:15:40
Thx you all. It worked well.


Go to Top of Page
   

- Advertisement -