I've searched the archives, it doesn't look like this has come up before.  This 
is an oracle example:

    <select id="fetchNextInSequence" resultClass="java.util.HashMap">
        Select #sequenceName#.nextval from dual
    </select>

in a nutshell, we want to pass the name of the sequence into the query and get 
the result back.
For instance, if I execute the query with an sequenceName = "APPLICATION_SEQ", 
we would want the following SQL to be executed:

Select APPLICATION_SEQ.nextval from dual

It looks like the sql being executed is something along the lines of

       select '#sequenceName#' nextval from dual

what comes back in the map is a key-value pair of nextVal->APPLICATION_SEQ

Can I use this approach?  If not, is there another approach to give me the same 
result (not having to code an individual query for each sequence)?

thanks,

t




Reply via email to