Re: query
- From: "Arnie Rowland" <arnie@xxxxxxxx>
- Date: Sun, 29 Oct 2006 19:09:36 -0800
Hi 'Tiffany',
It's considered a bad idea to take over another person's thread. You should start you own. Folks may not look it your problem since they will consider it a continuation of the previous thread and you may not get help.
You could try something like:
SELECT
Model,
NewColumn = CASE
WHEN Model LIKE 'EXTREME%' THEN 'High'
WHEN Model LIKE 'ULTRA%' THEN 'High'
ELSE 'Std'
END
FROM MyTable
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the top yourself.
- H. Norman Schwarzkopf
"Tiffany" <Tiffany@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:4DF539CC-CD49-49EE-9E6B-B7084EF0B602@xxxxxxxxxxxxxxxx
Hi,
i have a model column and has all sort of names.
E.g.
Model names
CRUZERCROSSFIRE00512
EXTREME512MBCF
EXTREMECF00256
EXTREMEIIISECUREDIGITAL
ULTRAIIMAGICGATEMP00512
ULTRAIIMAGICGATEMP01024
X00512
I have a new column and this new column is to differentiate the model
belongs to High or Std. Any model name that starts with Extreme or Ultra will
be High and others will be Std
e.g.
Model New Column
CRUZERCROSSFIRE00512 Std
EXTREME512MBCF High
EXTREMECF00256 High
ULTRAIIMAGICGATEMP01024 High
ULTRAIIMAGICGATEMP00512 High
X00512 Std
I am not sure how to write a query to populate the data in the new column.
Kindly advise.
Thank you
Relevant Pages
|
|