Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2005
    Location
    Kuala Lumpur, MY
    Posts
    108

    Unanswered: single row subquery returns more than one row

    i have a problem here and i cant seem to solve it
    have attached the data and the code ive used

    pls help !
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Why did you complicate basically simple query? I'd say you don't need all those subselects, as the whole thing could be done easier, such as
    Code:
    insert into trap_ra_k2_ain_balance
    (date_loaded, week_no, reload_date, msisdn, 
     new_balance, 
     reload_amount
    )
    (select date_loaded, week_no, reload_date, msisdn,
       to_number(substr(new_balance  , instr(new_balance  , '=') + 1)) / 100,
       to_number(substr(reload_amount, instr(reload_amount, '=') + 1)) / 100
     from trap_stage_k2_ain_balance
    );
    MINUS (in your original query) means that some data already exists in the target table? If it is empty, you don't need that.

  3. #3
    Join Date
    Aug 2005
    Location
    Kuala Lumpur, MY
    Posts
    108
    thanks little foot
    its working fine and yes minus exactly does what you say

Posting Permissions

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