Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql with case and between
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00651902
Message ID:
00651926
Views:
23
This message has been marked as the solution to the initial question of the thread.
I don't think that you're going to be able to use the Simple CASE with between. Change your query to use the Searched verion
SELECT dbo.corooms.roomname,
	case 
	  when m.begintime between CONVERT(varchar(15),m.begintime, 110)+' 07:00:00' and CONVERT(varchar(15), m.begintime, 110)+' 14:59:00' then 1
	  else 0
	end as ShiftType1
...
-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform