You are here: Re: MS SQL compare columns to generate display name « MsSQL Server « IT news, forums, messages
Re: MS SQL compare columns to generate display name

Posted by Roy Harvey on 09/17/07 20:15

Something is probably possible. Transact-SQL has very basic string
manipulation capability, and the CASE expression allows resolving to
different values depending on testable conditions. If you posted
CREATE TABLE and INSERTs for a variety of test data, along with
expected output, you might get a more specific response.

How confident are you that the email name matches the name in the
three name columns?

Roy Harvey
Beacon Falls, CT

On Mon, 17 Sep 2007 12:53:15 -0700, Yas <yasar1@gmail.com> wrote:

>On 17 Sep, 13:32, Yas <yas...@gmail.com> wrote:
>> Hello, I have the following table with 4 columns....
>>
>> firstname, lastname1, lastname2, EMAIL
>>
>> Table has user names and email, I would like to generate a 5th column
>> called DisplayName.
>> The email Id is sometimes firstname.lastname1.lastname2@ and others
>> just firstname.lastname1@
>>
>> I would like to generate the display name exactly like the email eg
>> firstname.lastname1.lastname2@ displayName = firstname lastname1
>> lastname2......so for james.smith display name = James Smith and for
>> james.earl.smith displayName = James Earl Smith etc etc
>>
>> Is there a way that I can check/compare email Id (before the @ part)
>> with firstname, lastname1 and lastname2 and generate a display name
>> based on what was used for the email address?
>
>
>By the way is this even possible in MS SQL? :-)
>
>Cheers
>Yas

 

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

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