Hi,
I'm trying to write a k shell script that will prompt the user for a location, and then pass that value to a stand alone sql that the script will call. I've done this with Oracle before, but the same method isn't working. This is the way I've approached it so far:
echo " Enter location "
read LOC
export LOC
/opt/informix/bin/dbaccess dbname /invctrl/freeze_cnt.sql
the sql is:
SELECT
count(*) from itemloc
where
location='&LOC' and
freeze_fl='Y'
I've tried different variations on the location, and as it is now dbaccess is taking it as a literal, not a variable. Any help is appreciated.
I'm trying to write a k shell script that will prompt the user for a location, and then pass that value to a stand alone sql that the script will call. I've done this with Oracle before, but the same method isn't working. This is the way I've approached it so far:
echo " Enter location "
read LOC
export LOC
/opt/informix/bin/dbaccess dbname /invctrl/freeze_cnt.sql
the sql is:
SELECT
count(*) from itemloc
where
location='&LOC' and
freeze_fl='Y'
I've tried different variations on the location, and as it is now dbaccess is taking it as a literal, not a variable. Any help is appreciated.