Note that there are some explanatory texts on larger screens.

plurals
  1. POPL/SQL ORA-00933: SQL COMMAND NOT PROPERLY ENDED
    text
    copied!<p>Referring to this <a href="https://stackoverflow.com/questions/9811711/sql-command-not-properly-ended">Post</a> 'AS' is not supported, what would be the substitution syntax to implement my with SQL command?</p> <pre><code>CREATE OR REPLACE PROCEDURE "LCAccountSP" ( xReceiptType IN VARCHAR2, xManual IN VARCHAR2, xRCO IN VARCHAR2, xMuncID IN VA) AS BEGIN CASE WHEN xReceiptType = 'ROR' THEN SELECT xAccount, xCount, xAmount FROM ( SELECT b.ACCT_CODE AS xAccount, COUNT(*) AS xCount, SUM(b.ROR_TOTAL_PAID) as xAmount FROM tbl_tax_payment aa INNER JOIN tbl_revenue_official_receipt b ON aa.TPAY_RECEIPT_NO = b.TPAY_RECEIPT_NO WHERE aa.RECEIPT_TYPE = xReceiptType AND aa.RECEIPT_MODE = xManual AND aa.LOC_NO IS NULL AND aa.RCO_CODE = xRCO AND aa.MUNC_ID = xMuncID GROUP BY xAccount ) AS xAccount; WHEN xReceiptType = 'OR' THEN SELECT xAccount, xCount, xAmount FROM ( SELECT b.ACCT_CODE AS xAccount, COUNT(*) AS xCount, SUM(b.OR_TOTAL_PAID) as xAmount FROM tbl_tax_payment aa INNER JOIN tbl_official_receipt b ON aa.TPAY_RECEIPT_NO = b.TPAY_RECEIPT_NO WHERE aa.RECEIPT_TYPE = xReceiptType AND aa.RECEIPT_MODE = xManual AND aa.LOC_NO IS NULL AND aa.RCO_CODE = xRCO AND aa.MUNC_ID = xMuncID GROUP BY xAccount ) AS xAccount; WHEN xReceiptType = 'AR' THEN SELECT xAccount, xCount, xAmount FROM ( SELECT b.ACCT_CODE AS xAccount, COUNT(*) AS xCount, SUM(b.AR_TOTAL_PAID) as xAmount FROM tbl_tax_payment aa INNER JOIN tbl_ack_receipt b ON aa.TPAY_RECEIPT_NO = b.TPAY_RECEIPT_NO WHERE aa.RECEIPT_TYPE = xReceiptType AND aa.RECEIPT_MODE = xManual AND aa.LOC_NO IS NULL AND aa.RCO_CODE = xRCO AND aa.MUNC_ID = xMuncID GROUP BY xAccount ) AS xAccount; END CASE; END; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload