If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back  dBforums > Database Server Software > Informix > Define time periode based on hour

LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Registered User
Join Date: Dec 2012
Posts: 1
Define time periode based on hour

Why can I not use the Timep in my CASE?

select weekday(callstart) as weekday, week_of_year(callstart)+1 AS Ugenr, TO_CHAR(callstart , '%A %B %d, %Y %R'), callstart::datetime hour to hour AS Timep, callstart,
'Timeperiode' = case
when Timep >= 0 and Timep < 10 then 0
when Timep >= 10 and Timep < 16 then 1
when Timep >= 16 and Timep < 22 then 2
else 0
from callrecord where callstart > "2012-10-19 00:00:00.000" and callstart < "2012-11-26 00:00:00.000";
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On