Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
WF Software — — source: Informix-list mailing list archive (1991-1998)
In article <uo9sqi359GA.398@upnetnews03>, kirt_t@email.msn.com (Kirt)
wrote:
> I am trying to pass a variable array for my table names following a
> "from"
> and passing a variable in the middle of a wildcard like or matches
> statement
> i.e.. where description like "%variable%"
>
> when I try to pass the array $table_array[r] I get an unrecognized
> character
> message
> as for the where like I get no rows found when I replace the variables
> with
> constant the statement work fine if anyone can help please do
>
> thanks in advance
>
>
>
Something like this should work
dbaccess database <<-EOF
select *
from table
where col1 like "%${table_array[${r}]}%"
EOF
Paul Watson # I don't suffer from
WF Software Ltd. # stress, I'm just
Tel. (+44) 1436 674729 # a carrier
Fax. (+44) 1436 678693 #
www.wfsoftware.co.uk
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.