title: Encountered the symbol "TABLE" when expecting one of the following: := . ( @ % ; The symbol ":= was inserted before "TABLE" to continue.
body: <p>I had written a function, looks like everything is fine but still I am getting the errors, </p>
  
  <p>Below is my function:</p>
  
  <pre><code>create or replace FUNCTION TRANSFERQTYBTNDATES 
  (
    v_startDate IN DATE,
    v_endDate IN DATE,
    v_storeid IN NUMBER,
    v_areaid IN NUMBER
  )
  RETURN TransferQtyBtnDates_pkg.tt_TransferQtyBtnDates_type PIPELINED
  AS
     v_temp SYS_REFCURSOR;
     v_temp_1 TT_TRANSFERQTYBTNDATES%ROWTYPE;
  
  BEGIN
     TRUNCATE TABLE tt_TransferQtyBtnDates;
  
     INSERT INTO tt_TransferQtyBtnDates
        SELECT isb.ItemId ,
               SUM(isb.Quantity) TransQty  ,
               isb.ExpiryDate TransExpDates  
          FROM Issues iss
                 JOIN IssuedBatches isb
                  ON iss.IssueRegisterId = isb.IssueRegisterId
          WHERE iss.IssueType = 'TRANSFER ACCOUNT'
                  AND iss.IssuedDate BETWEEN v_startDate AND v_endDate
                  AND iss.AreaId = v_areaid
                  AND iss.StoreId = v_storeid
          GROUP BY isb.ItemId,isb.Quantity,isb.ExpiryDate;
  
        OPEN v_temp FOR
        SELECT * 
          FROM tt_TransferQtyBtnDates;
  
     LOOP
        FETCH v_temp INTO v_temp_1;
        EXIT WHEN v_temp%NOTFOUND;
        PIPE ROW ( v_temp_1 );
     END LOOP;
  END;
  </code></pre>
  
  <p>and in this I am getting these errors</p>
  
  <pre><code>Error(14,13): PLS-00103: Encountered the symbol "TABLE" when expecting one of the following:     := . ( @ % ; The symbol ":= was inserted before "TABLE" to continue. 
  Error(21,16): PLS-00103: Encountered the symbol "JOIN" when expecting one of the following:     , ; return returning group having intersect minus start union    where connect 
  </code></pre>
  
  <p>please help me out...
  Thanks</p>