SolveErrors
Microsoft SQL Server

Converting from weekday to nymber in sql

4 views

Hi,

I have a day field in my table one which store monday ,tuesday and its property.

And another table which have one start date . I have to check these two tables.

The condition is i have holidays tables which stores the holidays in a company like 25/12/2009 is X'mas.

And there is another table name working days whichs fields are days and flag. if flag is 1 its not a working day.

The way i stored is monday 0,tuesday 0,sunday 1

The thing now i need is i want to select all holidays which are in working days.

How can i convert this monday to 2,tuesday to 3 like?