Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

define set of values (numbers) in PL/SQL

Saad NayefSep 14 2013 — edited Sep 16 2013

Hi,

I'm writing a query within a stored procedure (inside a package), the following condition is part of the query

WHERE dept_id IN (1,2,3)

I want to define the set (1,2,3) in the declaration part so it's used later by many places in the package.

The question is that, what's the simplest solution -if any- to implement that...

something in pseudo code like:

CONSTANT DEPT_SET = (1,2,3);

..................

.................

WHERE dept_id IN DEPT_SET

Thanks

This post has been answered by Solomon Yakobson on Sep 14 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 14 2013
Added on Sep 14 2013
2 comments
265 views