Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2010
    Posts
    1

    Question Unanswered: errors when running a procedure

    first time posting here, i'm nervous!? ~"~
    anyways, the procedure searches the table testimonials that has testimonies that matches the search key.

    CREATE OR REPLACE Procedure searchTestimonies( searchee varchar2) IS
    v_searchee varchar2(50);


    BEGIN

    v_searchee:='%'|| searchee ||'%';

    EXECUTE IMMEDIATE

    'CREATE OR REPLACE VIEW search_view AS
    SELECT * FROM Testimonials

    WHERE Testimonies LIKE ' || v_searchee ||'
    OR Member_Number LIKE ' || v_searchee;


    END;
    /



    i don't know if i wrote the procedure wrong or what

    but when i do something like

    EXECUTE searchTestimonies('blah');

    i get the following:

    ERROR at line 1:
    ORA-00911: invalid character
    ORA-06512: at "SYSTEM.SEARCHTESTIMONIES", line 9
    ORA-06512: at line 1

    thanks a lot in advance
    Last edited by krispyCake; 11-17-10 at 06:05. Reason: rewording

  2. #2
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    Quote Originally Posted by krispyCake View Post
    first time posting here, i'm nervous!? ~"~
    anyways, the procedure searches the table testimonials that has testimonies that matches the search key.
    No, it doesn't

    It creates (or tries to create) a VIEW that will run the corresponding SELECT, but it will not run that SELECT statement.

    Please use [code] tags to format your code so that we have chance to see what line 9 really is.

Tags for this Thread

Posting Permissions

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