thanks heaps for the reply. Just a bit confused on the syntax "Else 'Error'
"Warren Brunk" wrote:
> You can use a case statement to replace values on any cloumn in your select
> statement. You can also use a case on more than one column. Lets Pretend
> that ContactExtensionBase.New_ReferralPoints1is the column points in your
> example.
>
> SELECT
> Case ContactExtensionBase.New_ReferralPoints1 When 1 then 'Web' When 2 then
> 'Phone' Else 'Error' End as Points,
> ContactBase.FirstName,
> ContactBase.LastName,
> ContactExtensionBase.New_ReferralMethod1,
> ContactExtensionBase.New_ReferralMethod2.,
> ContactExtensionBase.New_ReferralPoints2
> FROM
> ContactBase
> INNER JOIN
> ContactExtensionBase
> ON ContactBase.ContactId = ContactExtensionBase.ContactId
>
> --
> /*
> Warren Brunk - MCITP - SQL 2005, MCDBA
>
www.techintsolutions.com > */
>
>
> "Ridhima Sood" <RidhimaSood@discussions.microsoft.com> wrote in message
> news:D8A01F4C-931B-453E-9806-F3486166981B@microsoft.com...
> > Waren i am kinda lost
> > below is the sql statement
> > SELECT ContactExtensionBase.New_ReferralPoints1,
> > ContactBase.FirstName,
> > ContactBase.LastName, ContactExtensionBase.New_ReferralMethod1,
> > ContactExtensionBase.New_ReferralMethod2.,
> > ContactExtensionBase.New_ReferralPoints2
> > FROM ContactBase INNER JOIN
> > ContactExtensionBase ON ContactBase.ContactId =
> > ContactExtensionBase.ContactId
> >
> > the result is for example
> > method first name last name points
> > 2 Barbara Johnston 1
> > However i know that 1= web , 2=phone etc and for points
> > 1=10,2=20 etc...but i cant get SQl to display the field value...
> >
> > i hope u get what i mean now..
> >
> > "Ridhima Sood" wrote:
> >
> >> hi
> >>
> >> I am keen to know the sql command to display picklist values rather than
> >> unique numbers.
> >>
> >> for example, title is 1=mr and 2 = mrs
> >> if i say select title from contact sql returns 1 and 2 but i want it to
> >> return mr and mrs..any advice on this please
>
>