DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: urgent please proper pl/sql....

  1. #1
    Join Date
    Mar 2001
    Posts
    19
    hi,
    i have a table called rule

    the column in it is varchar2(1000) and the value is
    RELIGION = 'HIN' AND NATIONALITY = 'QTY'

    I HAVE another table details.

    which has columns like
    employee_no,religion,nationality


    i write following pl/sql

    select rule
    into x_rule
    from rule;

    next is

    select count(*)
    into x_cnt
    from details
    where employee_no = '29' ||' and '|| x_rule

    can i use the x_rule with concationation.
    it doesn't give proper results event though the conditions are existing.
    is there any alternate for this?

    please expalin


  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Write the final text of the query somewhere and execute it again from Sql+.
    Ales
    The whole difference between a little boy and an adult man is the price of toys

  3. #3
    Join Date
    Mar 2001
    Posts
    19
    i am extremely sorry for not mentioning that i am using this in d2k.

    how will i use there?

  4. #4
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    I'm sorry, no clue about d2k ...
    Ales
    The whole difference between a little boy and an adult man is the price of toys

  5. #5
    Join Date
    May 2002
    Posts
    2,645
    First of all, let's start with writing the correct SQL statement(s), then we'll come back to PL/SQL. Your description of the rule table doesn't make any sense. The query "select rule (which is your table name) into x_rule from rule" is nonsensical. Does rule have one column (varchar2) in it that is supposed to contain a quoted string? How can employee_no equal two things at the same time? Please provide more info about your tables and what you are trying to do, then you will probably get more help.

Posting Permissions

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


Click Here to Expand Forum to Full Width