You are here: constructing strings from table « MsSQL Server « IT news, forums, messages
constructing strings from table

Posted by Oonz on 05/22/07 15:36

Hi friends,
please help me in selecting values from the table

the record is as follows:
Id HomePhone WorkPhone Mobile Email
20 2323223 323232232 test@test.com

i have to select values as follows.

Id DeviceType DeviceInfo
20 HomePhone, Mobile, Email 2323223, 323232232, test@test.com


the one solution is:
select
'HomePhone, Mobile, Email' AS DeviceType
HomePhone + ',' + WorkPhone + ',' + MobilePhone + ',' + Email AS
DeviceInfo
from table where Id = 20

but here the work phone number is not available so that information
has to be truncated...

Thanks in Advance
Arunkumar.D

 

Navigation:

[Reply to this 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

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