Link to home
Start Free TrialLog in
Avatar of rm103
rm103Flag for United States of America

asked on

extracting column3 value from 2 existing columns in sql 2008

Hello, newbie to SQL (SQL server 2008).

I need to extract the value in a column using the concatenation of 2 existing values in 2 different columns. for example:

Column 1 Column 2  Column3
Valuea       Valueb       Extract Val

Need to pull the value "extract val" by reading the key of concat of "valuea" and "valueb"

Is that possible via query?

Thanks,

rm103
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Give this a whirl and let us know if it works...
SELECT Column3
FROM YourTable
WHERE Column1 = 'Valuea' AND Column2 = 'Valueb'

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial