-
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
-
Write the final text of the query somewhere and execute it again from Sql+.
-
i am extremely sorry for not mentioning that i am using this in d2k.
how will i use there?
-
I'm sorry, no clue about d2k ...
-
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.