Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2003
    Posts
    42

    Unanswered: procedure not working

    hi,

    i am facing a problem, with a procedure.

    here iam getting a date value as input parameter, i need to cehck whether the value is stored in table or not. it there will be more than one record then how can i check.

    create or replace procedure sss(data in date, xx out boolean)
    as
    flag boolean;
    begin
    select queueid from queuetable where date=data;
    flag :=true;
    exception
    when no_data_found then
    flag:=false;
    end;

    if there are more tha n one record matching the same criteria then how can i write the query. can any one help me in this one.

    thanking you

  2. #2
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467
    You have got it there. Just put the SQL in place.
    NOTE: Please disregard the label "Senior Member".

  3. #3
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467
    Do you want this procedure to return the flag (i.e. it will be a function and not a procedure? I you do want a function just put your return (flag) statements in place of your assignment functions.

    Good job!
    NOTE: Please disregard the label "Senior Member".

  4. #4
    Join Date
    Dec 2003
    Posts
    42
    Thank you very much..

  5. #5
    Join Date
    Nov 2003
    Location
    Bangalore,India
    Posts
    51

    Re: procedure not working

    just use
    select count(queueid) into iRecCtr from queuetable where date=data;
    Cheers
    Keep things simple as world is already complex

Posting Permissions

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