I'm looking to return a numeric value within the "count" variable from my SQL I wrote. Unfortunately I am just getting an Ingres error message. Any ideas what I am doing wrong?
See shell script code below:
#!/bin/ksh
###############
count=$(sql db_name -s -N "SELECT COUNT(*) FROM temp_table;")
echo "Table count = $count"
See Ingres error below:
Table count = INGRES TERMINAL MONITOR Copyright 2008 Ingres Corporation
E_US0022 Either the flag format or one of the flags is incorrect,
or the parameters are not in proper order.
Expected outcome:
Table count = 8