One of the developers here at my company get the
following when attempting to compile a 4gl script
based on what he thought the manual was telling
him:
Example from manual:
PREPARE up_sel FROM
"SELECT * FROM customer ",
"WHERE customer_num between ? and ? ",
"FOR UPDATE"
Error from Compiler:
prepare stmt1 from
"select prop_name",
|______________________^
|
| A grammatical error has been found on line
23, character 24. The
| construct is not understandable in its context.
See error number
| -4373.
"from property",
"where prop = ?"
Not having wrote any statements myself for
quite a while, I was hoping there was a 4gl guru
out there that could point us in the right
direction.
Thanks,
#######
John Hibner
Choice Hotels Int.
sending to informix-list
↪ replying to John Hibner
John Hibner wrote:
> One of the developers here at my company get the
> following when attempting to compile a 4gl script
> based on what he thought the manual was telling
> him:
>
> Example from manual:
> PREPARE up_sel FROM
> "SELECT * FROM customer ",
> "WHERE customer_num between ? and ? ",
> "FOR UPDATE"
Try that:
define str_variable char(200)
let str_variable = "select * from customer where ",
"customer_num between ? and ? for update"
prepare up_sel from str_variable
I think that PREPARE is confused by multiple strings separated by a
comma and is not trying to do concatenation.
HTH
Michael
>
> Error from Compiler:
>
> prepare stmt1 from
> "select prop_name",
> |______________________^
> |
> | A grammatical error has been found on line
> 23, character 24. The
> | construct is not understandable in its context.
> See error number
> | -4373.
> "from property",
> "where prop = ?"
>
> Not having wrote any statements myself for
> quite a while, I was hoping there was a 4gl guru
> out there that could point us in the right
> direction.
>
> Thanks,
> #######
> John Hibner
> Choice Hotels Int.
>
> sending to informix-list