Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Help:Pl/SQL Pass variable for sequence into SQL Select
I'm somewhat of a beginner trying to write a fairly simple sequence generator in PL/SQL. The user selects a client name and based on that client name it returns the next sequence for that client.
Let's say there are three clients, 0021, 0022, and 0023. Each time a user
selects a client number, it will get the .NEXTVAL for it's sequence. I've
named the sequences according to clients. Sequences entitled s0021,
s0022, and s0023. So, let's say:
vClient = 0021;
In a select statement I want to get: 's'||vClient||'.NEXTVAL' which I
cannot seem to do.. Here is part of my code:
Gary
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Wed Jul 09 1997 - 00:00:00 CDT