3 Replies Latest reply on Oct 12, 2012 7:43 AM by 955649

    How to execute this query correctly?

      Hi sir,

      i am using one query which i converted from sql to oracle but getting error.

      Error(4,3): PLS-00428: an INTO clause is expected in this SELECT statement

      here is my query:

      SELECT distinct pa.id Code, pa.Empcode Emp_ID, E.Emp_FirstName || ' ' || E.Emp_LastName Emp_Name, pa.WorkDate Date1 , pa.InPunch In_Punch , pa.OutPunch Out_Punch , pa.approve , ls.Leave_Status_text StatusText , NVL(pt.punchtype, 'Updated') punchtype FROM PunchForApproval pa JOIN Employee E ON e.Emp_ID = pa.Empcode LEFT JOIN Leave_status ls ON ls.Leave_Status_id = pa.approve LEFT JOIN punchtype pt ON pt.id = pa.STATUS
      WHERE E.Emp_ID IN ( SELECT Emp_id FROM employees)ORDER BY pa.id DESC ;