stonemonolith
Programmer
- Jul 22, 2006
- 4
I'm writing an isql statement that will be used to query several different databases. I've used variable names for the user, password, server and, table name. But, it won't let me use a variable name for the dbname. I used the statement, "use $dbname" but it gives me an error message. It only works when I hard code the db name - Is there a different syntax for this?
Here is the isql statement:
count=`isql -U$user -P$pass -S$server << EOF
use pubs - used $dbname in place of pubs but, didn't work
go
select count(*) for $stable
go
EOF`
Any help would be appreciated - thank you
Here is the isql statement:
count=`isql -U$user -P$pass -S$server << EOF
use pubs - used $dbname in place of pubs but, didn't work
go
select count(*) for $stable
go
EOF`
Any help would be appreciated - thank you