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.
Richard Thomas — — source: Informix-list mailing list archive (1991-1998)
At 15:20 14/04/97 -0400, you wrote:
>Is it possible to create a SQL statement with HOST Variables within the
>script. Here is an example of something I am wanting to do:
>
> USER=TWRIGHT
> select xuser from xcp
> where xuser = '$USER';>
>I am running this script from the command line by doing:
>dbaccess -e database user.sql.>
>It appears to run but DBACCESS converts the host variable USER which is
>TWRIGHT into twright. The user is not in the system in lowercase but
>uppercase. Can someone give me a few pointers.
>
Hi Terron,
Save the script at the end of this message as a file, chmod it so that it's
executable, and run the script.
HTH,
Richard.
------------------CUT--HERE--------------------------
USER=TWRIGHT
dbaccess database << !
select xuser from xcp
where xuser = '$USER'!
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.