You are here: Re: query... « MsSQL Server « IT news, forums, messages
Re: query...

Posted by Anith Sen on 10/01/65 11:42

You can concatenate character compatible column values using the + operator.
In this case you will have to convert the numeric columns to VARCHAR or CHAR
do the concatenation like:

SELECT Name,
CAST( English AS VARCHAR(3) ) + SPACE( 1 ) + Name,
CAST( french AS VARCHAR(3) ) + SPACE( 1 ) + Name,
...
FROM tbl ;

As a side note, depending on your business model, it might be better to
represent language identifiers in a single column. It is more logical,
allows easier enforcement of constraints, offers better flexibility in
general querying and allows you to add more language identifiers in the
table without altering the schema.

--
Anith

 

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

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