Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2014
    Posts
    1

    Thumbs down Unanswered: left join with select query

    LEFT JOIN WITH SELECT QUERY.

    inner join employee_details ed on wb.conductorId=ed.empId
    left join (select DUTY_DATE,CONDUCTOR_ID,ROUTE_NO,ifnull(BUS_NO,0) BUS_NO
    from CONDUCTOR_DUTY_HISTORY
    where DUTY_DATE between DATE_ADD(Date('".$resultdateDVR."') ,INTERVAL 1 DAY) AND DATE_SUB('".$toDate."',INTERVAL 1 DAY)
    and CONDUCTOR_ID>0
    group by DUTY_DATE,CONDUCTOR_ID,ROUTE_NO) cd on wb.dutyDate=cd.DUTY_DATE and cd.CONDUCTOR_ID=ed.empCode
    and trim(tkt.routeNo)=cd.ROUTE_NO


    I am getting meaning of above query left join with select
    what is that?
    any other way to write this query?

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Are you asking what the difference between an INNER and LEFT join is?
    George
    Home | Blog

Tags for this Thread

Posting Permissions

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