Re: Alternative command using i4gl instead of isql
Posted in 1994
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration
In article <2m7svj$83g@gagme.wwa.com> john@gagme.wwa.com (John T. Fontanilla) writes:
>Hello there,
>
>I'm having a problem determining the right command to use in place of isql.
>Right now, I'm using this:
>
>$ isql dbase-name file.sql>
>file.sql contains the following line:
>select * from table-name where column1 = 1>
>Is there another way of doing this command via i4gl from the command
>prompt instead of going thru the menu selecting 'Q'uery-language,
>selecting the database, selecting 'N'ew? What I need is something similar to:
>
>$ i4gl ??????>
>We have the I-SQL and the STANDARD ENGINE version 4.00. (C-compiler version)
John,
Its going to be tough using i4gl if you don't have it ;)
Since you have a '$' prompt, I'm assuming you are on a UNIX system. In which
case, you could create a shell script to handle your query:
:
#!/bin/sh
#(#) myfile
echo "Enter a value to search for > \\c"
read VALUE
isql database_name - 2>/tmp/trash <<EOF
select *
from table_name
where column_name = "$VALUE";EOF
You mention a C compiler version. If you have ESQL/C, then you could also
use your own c routines.
Bob
>
>Pls. email me if you know the answer! Thanks.
>--
>John Fontanilla | Work: (203) 790-9921 AOH: (203) 350-3841
>Transportation Data |E-mail: john@gagme.wwa.com
>100 Mill Plain Rd. | Views expressed does not reflect that of my employers.
>Danbury, CT 08611 | Maligayang bati sa inyo!!! :)
--
-------------------------------------------------------------------
* Bob Beaulieu (bobb@netcom.com) eztravel@netcom.com *
* Tel: 408-978-0808 Fax: 408-978-7024 *
* Corporate Travel Services *
-------------------------------------------------------------------