Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

getting error "SQL command not properly ended" when trying to use limit clause while bulk into a nes

3752786Jul 9 2019 — edited Jul 9 2019

Oracle version - 12c

sql developer

Hi,

I am trying to bulk collect into a pl/sql table(nested table) and i want to use Limit clause.

<CODE>

with cte1 as

(

select row_number() over(ORDER by transaction_date desc,posting_date desc)+1,

to_char(TRANSACTION_DATE,'dd-MON-yyyy'),

PARTICULARS,

REFERENCE_OR_PO_NUMBER,

INVOICE_NUMBER_OR_BANK_NAME,

VOUCHER_TYPE_ID,   

DEBIT_AMOUNT,

CREDIT_AMOUNT,

BALANCE_AMOUNT

from accdlrlgr

where accdlrlgr.customer_id=p_customer_id

and accdlrlgr.dealer_id=p_dealer_id

and accdlrlgr.transaction_date between to_date(p_from_date,'dd-MON-yyyy') and to_date(p_to_date,'dd-MON-yyyy')

)

select *

bulk collect into

DlrLgrTab LIMIT 100  ---------- When i the limit clause ,i  get error

from cte1;

/CODE>

i am getting error

PL/SQL: ORA-00933: SQL command not properly ended

Comments
Post Details
Added on Jul 9 2019
2 comments
787 views