Reply to Re: Joing Multiple Columns

Your name:

Reply:


Posted by Tom Moreau on 02/23/06 02:55

Try:

select
C1 + '#' + cast (C2 as varchar (10)) + '#' + convert (char (10), C3,
103) + '#' + cast (C4 as varchar (10))
from
MyTable

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Crumb" <rowan.ian@gmail.com> wrote in message
news:1140655591.245227.133490@f14g2000cwb.googlegroups.com...
Hi All,

Bit of a newbie question i'm afraid, so sorry if this is a really
stupid question,

I am not sure if I am trying to do this in the right place as I am sure
SQL Server has a far better way of doing this

What I am trying to do is join the contents of several columns and
present the entry into a new column. the entries of all the columns I
am trying to join are different types such as dates and numbers. I want
to join all columns as a text string. To make it just a even more
tricky I wish to insert a # between all fields.

Just in case my poor description has got you thinking What the F*&K
here is an example of what I am trying to do

C1 C2 C3 C4 C5
Ian 1234 22/02/2006 123456789 Ian#1234#22/02/2006#1234567890
I have been trying to do this in the Formula in the design veiw of the
table.

Any Advice would be fantastic.


Many Thank

Ian

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация