repeat
  set query destination(into set;[table];"set name")  -- I think that 
is the syntax
  do your query with array - result is in the set
until - whatever termination condition

or

copy named selection([table[;"selection name")
do queries
use named selection("selection name")

or
SQL -- I think

$SQL_Query:="select <fields> from <table> where "

for (size of array)
 $SQL_Query:=$SQL_Query+"<field> = array element or "
end for
begin sql
execute immediate($SQL_Query)
end sql


I am not entirely sure about the "or" but that is the gist,
and '< >' are place holders for needed field or table info

Chip

On Wed, 18 Sep 2019 08:44:10 -0700, Randy Engle via 4D_Tech wrote:
> Hello SQL Afficionados!
> 
> I need to get a selection of records, based upon an array of ID numbers.
> (What I want is to end up the arrays... not the selection of records)
> 
> e.g.
> QUERY WITH ARRAY([Personnel]Personnel_ID;al_Personnel_ID)
> 
> The above works just great!
> 
> "Except", that it changes the current selection and current record.
> 
> Whereas, what I really want is to end up with a half dozen or so 
> arrays from the [Personnel] Table, without touching the current 
> selection/record.
> 
> I'm using 4D 16r6 (Windows)
> 
> Anyone know of a SQL function that does this?
> Or some other method.
> 
> "Execute on Server" attribute would work, except in many cases these 
> are single-user systems, not client/server.
> 
> Gracious thanks to all
> 
> Randy Engle
> 
> 
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to