No, that is currently not possible. If you only ever want the first index then just pass in the first index from your DAO. Not sure what you are trying to accomplish but it looks like it would be better handled in java and not the sqlmap. If you want to provide more information about the context of your decision we might be able to help in determining a good alternative. It may be possible to do this in the future with iB3. But, i don't see it happening in iB2.
Brandon On 9/18/07, Peter Martin <[EMAIL PROTECTED]> wrote: > > I want to pass in a List as a parameter class and select the first item > from the list. I know it is possible to use the <iterate> tag, but is it > possible to pull out a single item for a given index? For example, in the > following select I to get the item at position 0: > <select id="countPeopleWithSurname" parameterClass="java.util.List" > resultClass="int"> > SELECT count(*) FROM person WHERE per_last_name = <item 0> > </select> > > Likewise in an insert I may want to pull out the different items: > > <insert id="insertPerson" parameterClass="person"> > INSERT INTO PERSON (PER_ID, PER_FIRST_NAME, PER_LAST_NAME, > PER_BIRTH_DATE, PER_WEIGHT_KG, PER_HEIGHT_M) VALUES (<item 0>, > <item 1>, <item 2>, <item 3>, <item 4>, <item 5>) > </insert> > > Thanks > Peter > > > >