Hello Marc,

what do you want to achieve?

Possibly: SELECT col1 FROM dba.table2 WHERE col2 IN (SELECT id from dba.table) ?

Why do you want to make all this work by yourself, instead letting it being done
by the database?

Regards

Alexander Schr�der
SAP DB, SAP Labs Berlin 

> -----Original Message-----
> From: Marc-Olivier Meunier [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 25, 2003 3:06 PM
> To: Sapdb. General
> Subject: Using arrays as variable
> 
> 
> Hi all
> 
> I'd like to know if it is possible to use arrays in dbproc
> For example, i'd like to put the result of a query in an 
> array in order
> to use it in my where clause of the next query
> 
> This is my array -> @array
> SELECT id FROM dba.table ;
> Fetch-array INTO @array ;
> SELECT col1 FROM dba.table2 WHERE col2 IN @array
> 
> Can i do that ? Or do i have to build a dynamic query with a 
> while loop
> to create my WHERE clause ?
> 
> Thanx for your help !
> 
> --
> Marc-Olivier Meunier
> Ing�nieur Projet BKLINK
> MVH-IRIS
> 14, rue Rougemont
> 75009 Paris
> 
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
> 
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to