Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2007
    Posts
    84

    Unanswered: Bind variable needed in a SQL View?

    I have this Oracle SQL View written, but I need a parameter to select the Trx ID, otherwise it runs way too slow. When putting a bind variable in the SQL View and try to run, it returns this error:
    ORA-00900 invalid SQL statement

    I added the Bind Variable of TRX_ID so the user could enter the
    TRX ID when running:

    CREATE OR REPLACE VIEW VIEWNAME_V
    AS
    SELECT E.ENTITY_NO,
    ...
    FROM ...
    WHERE
    AND E.ENTITY_NO =:TRX_ID


    Could anyone assist me or do you have any suggestions?

    CC

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    A view is simply a store select. When you use it all you would have to do is

    select * from viewname_v where entity_no = :trk_id;
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Feb 2007
    Posts
    84
    This Oracle SQL view will be used in Access 2003, so I could just write a query similiar to above with the select statement including the bind variable?

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    You'd better ask this question on the Access forum.

  5. #5
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    That should work.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

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