How to merge two columns ?

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2008
Posts: 136
Reputation: cVz is an unknown quantity at this point 
Solved Threads: 7
cVz's Avatar
cVz cVz is offline Offline
Junior Poster

How to merge two columns ?

 
0
  #1
Dec 10th, 2008
Hi , I have 2 columns named

1. Tel_H
2. Tel_H_Code

How can i merge these two columns to make them one ??

I am clueless here...The best i can do is to view them as one

  1. SELECT Tel_H_Code + Tel_H AS 'Tel_H'
  2. FROM Detailed_List
Delphi & C# programmer deluxe...
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 1
Reputation: emircan1986 is an unknown quantity at this point 
Solved Threads: 0
emircan1986 emircan1986 is offline Offline
Newbie Poster

Re: How to merge two columns ?

 
0
  #2
Dec 11th, 2008
maybe you can use select into statement, with it you merge two colums and take it another table like that
  1. SELECT Tel_H_Code + Tel_H AS 'Tel_H' INTO Table1
  2. FROM Detailed_List
so you can use it
select Tel_H from Table1
Last edited by peter_budo; Dec 12th, 2008 at 7:04 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 144
Reputation: sierrainfo is an unknown quantity at this point 
Solved Threads: 9
sierrainfo sierrainfo is offline Offline
Junior Poster

Re: How to merge two columns ?

 
0
  #3
Dec 11th, 2008
try this

  1. SELECT Tel_H_Code + ' ' + Tel_H AS Tel_H
  2. FROM Detailed_List
Last edited by peter_budo; Dec 12th, 2008 at 7:05 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MS SQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC