Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2013
    Posts
    1

    Unanswered: exclude sunday's and time should start from 8.00Am to 6.00PM in mysql query

    I have query problem for the below point, So can some help us on this, as we are trying this one for the past 2 weeks.

    exclude sunday's and time should start from 8.00Am to 6.00PM in mysql query

    And The query we have is

    SELECT B.ProblemID, A.problemID,A.EnclID as A_ENCLID,
    B.EnclID as B_EnclID, B.EnclSubmittedTime,
    (SPLIT_STR(B.enclname,"_", 1)),
    B.EnclComment,B.EnclSubmittedTime,
    COALESCE((TIMEDIFF(A.EnclSubmittedTime, B.EnclSubmittedTime))) AS Time_DIFF
    FROM TABLE B
    LEFT JOIN TABLE A ON B.EnclID < A.EnclID
    AND A.problemID = B.ProblemID
    and A.enclname not like 'Enclosure%'
    where B.enclname not like 'Enclosure%'
    and A.EnclSubmittedTime not in (
    Give_Me_Dates_Days(1, B.EnclSubmittedTime, A.EnclSubmittedTime)
    )
    Group by B.ProblemID, B.EnclID
    order by B.ProblemID ASC

    If any quries, please reply to this, we will response you.

    Thanks In Advance.
    Last edited by jegans; 04-02-13 at 01:10.

  2. #2
    Join Date
    Dec 2012
    Location
    Logan, Utah
    Posts
    163
    Can you post DDL for tables A and B? You have columns which imply they contain only the time.

Posting Permissions

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