Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    2

    Exclamation Unanswered: Dynamic stock procedure

    Hello!
    I need to make a dynamic stock procedure, which return this
    TYPE record_report_dealer_search IS RECORD
    (policy_number POLICY.POLICY_NUMBER%TYPE,
    customer_name VARCHAR2(255),
    license_plate VEHICLE.LICENSE_PLATE%TYPE,
    vin VEHICLE.VIN%TYPE,
    name MODEL_FAMILY.NAME%TYPE,
    customer_id CUSTOMER.CUSTOMER_ID%TYPE,
    salesman DEALER_USER.LOGIN%TYPE);
    TYPE rc_type_find IS REF CURSOR RETURN record_report_dealer_search;

    My problem is that my request had to be completed by an order by on something that is passed in parameter:
    header:
    PROCEDURE sp_find_policy_number(
    ...
    in_rule_order IN rule_order%TYPE,
    ...);
    so my sql query is :
    select ...
    from table1, table2....
    Where ...
    ORDER BY in_rule_order;

    But pl/sql don't want to interprate "in_rule_order"....
    how to make this?
    thanks

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Wink

    Try dynamic SQL:

    open <<rc_type_find_cursor here>> for
    'select ...
    from table1, table2....
    Where ...
    ORDER BY '||in_rule_order;

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Aug 2003
    Posts
    2
    Originally posted by LKBrwn_DBA
    Try dynamic SQL:

    open <<rc_type_find_cursor here>> for
    'select ...
    from table1, table2....
    Where ...
    ORDER BY '||in_rule_order;

    Thanks,
    I'll try

Posting Permissions

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