I am trying to run a timesten sql query on a remote server from my local machine. The query is inside a script, I am able to connect to the db but the problem is with the query field.
This is my script runttquery.sh
#!/bin/bash cmd=$1 ssh dba@rhost << "EOF" ttIsql "dsn=rhostdsn"; select * from table1 where id='$cmd'; EOF
When I run the above script by passing an argument "testid",
the $cmd in the sql query isn't getting replaced with the "testid" argument that I passed and I get 0 results from the remote server.
I just need to replace the id value in my sql query with the argument that I passed to the script.