Variable in select "IN" clause (merged) [message #359213] |
Fri, 14 November 2008 03:01 |
visva
Messages: 3 Registered: November 2008 Location: Malaysia
|
Junior Member |
|
|
I have a scenario like the one below.
BEGIN
OPEN cv_1 FOR
SELECT Cal1, col2 col3
FROM Employee
where
EmployeeType In (Select TypeID from Table);
END
I want to change the "Select TypeID from Table" into a variable like "ABC". How do I write it in procedure?
The "Select TypeID from Table" will return multiple rows
|
|
|
|
|
|
|
Re: Variable in select "IN" clause (merged) [message #359230 is a reply to message #359223] |
Fri, 14 November 2008 04:23 |
|
Michel Cadot
Messages: 68645 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Why don't you want to keep your first query?
Note that usual way to use a variable in string list is to convert it to a table. If you comes from a table there is no benefit to convert it to a string list.
Regards
Michel
|
|
|