SQL command not properly ended?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • superpong
    New Member
    • Apr 2008
    • 1

    SQL command not properly ended?

    SELECT MAX(NumOccurren ces)
    FROM ABSENCE_HISTORY
    Where AbsenceDate = Exists

    (select EmpID from ABSENCE_HISTORY
    Intersect
    Select EmpID from EMPLOYEE);

    (select EmpID,
    count(EmpID) as NumOfAbsence
    from ABSENCE_HISTORY
    group by EmpID
    order by NumOfAbsencedes c)

    got the same error too...
    can anyone please help .. > <"
    Thanks
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    try using this

    [code=oracle]
    SELECT MAX(NumOccurren ces)
    FROM ABSENCE_HISTORY
    Where AbsenceDate Exists

    (select EmpID from ABSENCE_HISTORY
    Intersect
    Select EmpID from EMPLOYEE);
    [/code]
    and this
    [code=oracle]
    select EmpID,
    count(EmpID) as NumOfAbsence
    from ABSENCE_HISTORY
    group by EmpID
    order by NumOfAbsence desc
    [/code]

    Comment

    Working...