Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2013
    Posts
    23

    Unanswered: dynamic action sql

    I' m receiving this error when i enter this SQL for a dynamic action in APEX ...hwat am I doing wrong? :/

    •ORA-06550: line 5, column 1: PLS-00428: an INTO clause is expected in this SELECT statement

    UPDATE RE_EZPAY_AT_AGENCY_DAILY
    SET RE_EZPAY_AT_AGENCY_DAILY.STATUS ='H';
    SELECT RE_EZPAY_AT_AGENCY_DAILY.STATUS, RE_EZPAY_AT_AGENCY_DAILY.DEBT
    FROM RE_EZPAY_AT_AGENCY_DAILY
    WHERE RE_EZPAY_AT_AGENCY_DAILY.DEBT >250
    AND RE_EZPAY_AT_AGENCY_DAILY.STATUS ='O';

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Apex dynamic action is PL/SQL, which means that SELECT requires an INTO clause. Therefore, you'd need to select STATUS and DEBT into *something* (local variables? Apex items? I don't know, but you should).

    Besides, UPDATE you wrote updates the whole table, i.e. all records will have STATUS = 'H'. Is that what you want? Do you, perhaps, miss a WHERE clause?

  3. #3
    Join Date
    Sep 2013
    Posts
    23
    thanks, I've ammended to this and added the dynamic action to a button...when i click the button though the db just freezes :/

    UPDATE RE_EZPAY_AT_AGENCY_DAILY
    SET STATUS = 'H'
    WHERE DEBT >250
    AND STATUS = 'O';

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >when i click the button though the db just freezes :/
    I doubt that above is true.
    I bet that you can login into the DB from sqlplus or another client & issue queries.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Maybe the table is locked (someone - you, perhaps, in another session? - didn't commit or rollback changes he/she has made?) so your Apex application is waiting until it is released.

  6. #6
    Join Date
    Sep 2013
    Posts
    23
    thats exactly what it was, thankyou!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •