SQL Query - TechRepublic
Question
December 2, 2008 at 04:10 PM
gregg.veinpel

SQL Query

by gregg.veinpel . Updated 17 years, 6 months ago

I am querying data that is housed in two tables.

The first table is a day of the week table
consisting of two columns as follows

ID Symbol
1 Sunday
2 Monday
etc.

The second table contains six columns
id Symbol Day1 Day2 Day3 Day4 Day5
1 order1 1 3 5 6 7

and so on

I want to be able to write a query that allows me to pull back the actual days of the week that are referenced in the columns day1, day2, day3, etc. while using a Where clause to select orders based on their symbol

so what i wnat from the query is

Order1 Sunday Tuesday Thurday Friday Saturday

Thanks, Gregg

This discussion is locked

All Comments