I've been having all kinds of fun today with trying to get the
proper syntax for a PREPARE statement.
This is being coded in 4GL.
I'm creating a WHERE clause from parameters given in an HTML
form. The resulting SELECT statement is a simple COUNT(*) of
records. Problem is, how do I get the returned value for COUNT(*)?
The following is my best try:
LET p_sql_stmt = "SELECT COUNT(*) FROM v3 WHERE ", p_where_clause
PREPARE pre_count FROM p_sql_stmt
EXECUTE pre_count INTO p_row_cnt
|_________________________^
|
| A grammatical error has been found on line 169, character 27.
| The construct is not understandable in its context.
| See error number -4373.
p_row_cnt has been declared as both INTEGER and CHAR(10) with the same
results.
.
.
. .
..
:.
.\\
__d , , , , , , , , ,
_ \\<,_-----><)>--><)>--><)>--><)>--><)>--><)>--><)>--><)>--><)>*
(_)/ (_) '' '' '' '' '' '' '' '' ''
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
barton@fau.edu -- Florida Atlantic University, Boca Raton, FL
http://www.fau.edu/barton/home.html