Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17

Thread: Need Query Help

  1. #16
    Join Date
    Feb 2004
    Posts
    64
    Oh ok that make sence. Thanks.

  2. #17
    Join Date
    Mar 2004
    Posts
    1
    Are you looking for records created between '2-23-04 10:00 pm' and '2-28-04 02:00 am' ?
    If so try this ...
    Select z.State,d.Affiliate,count(*)
    From Call_Center_Data c ,Zip_PZA z, DNIS d
    where c.zip_code = z.zip_code
    and c.dnis_code = d.dnis
    and c.Response_Date between '2-23-04 22:00:00' and '2-28-04 02:00:00'
    group by z.state,d.Affiliate

    OR
    Are you looking for records created between '10:00 pm' and '02:00 am' everyday during '2-23-04' to '2-28-04' ?
    If so try this ...

    try this..
    Select z.State,d.Affiliate,count(*)
    From Call_Center_Data c ,Zip_PZA z, DNIS d
    where c.zip_code = z.zip_code
    and c.dnis_code = d.dnis
    and c.Response_Date between '2-23-04' and '2-28-04'
    and (CONVERT(char(12), c.Response_Date,8) between '22:00:00' and '23:59:00'
    or CONVERT(char(12), c.Response_Date,8) between '00:00:00' and '02:00:00'
    )
    group by z.state,d.Affiliate

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •