mardi 15 décembre 2015

i Want Every Day Report Like Below

enter image description here

Querry.

select 
Sum(Case when fld_event_subject='Cold Call' THEN 1 ELSE 0 END) AS ColdCall,
Sum(Case when fld_event_subject='Referral Call' THEN 1 ELSE 0 END) As ReferalCall,
Sum(Case when fld_event_subject='Email Sent & Fax Sent' THEN 1 ELSE 0 END) As [Email Sent & Fax Sent]
 from tbl_event WHERE (fld_event_created_on >= '12/15/2015 12:00:00 AM' AND fld_event_created_on <= '12/16/2015 3:53:04 AM')

Question:

  • How to Display Timings Column in {i Will Take From Hour , to Hour}
  • How to Add start Hour(in From Hour Field) As 5:30PM?
  • How To Get End Hour(in to Hour Field) As 6:30PM?
  • How To increase Hours in Table Automatically

For example:

5:30PM to 6:30PM
6:30PM to 7:30PM
::
::
4:30AM to 5:30 AM

Aucun commentaire:

Enregistrer un commentaire