Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sorting based on order of retrieval argument numeric array

13 views
Skip to first unread message

paulhu...@gmail.com

unread,
May 15, 2013, 9:05:13 AM5/15/13
to
I have an Infomaker report that takes a 'numeric array' as an input (retrieval argument) and uses that to pull data from an Oracle database using a SQL select statement. My Issue is that I can hardcode an order, what I really want is to keep the order of the numeric array.

This pseudo SQL statement works, but returns using a fixed order (if my numeric array is called 'numericarray')

select ID, NAME
from NAMES
where ID IN (:numericarray)

I tried to do this

select ID, NAME, INSTR(:numericarray, ID,1,1) as Order
from Names
where ID IN (:numericarray)

but I get an error from the INSTR function.

Any clues ??

Paul.
0 new messages