Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
I am having trouble preparing an SQL statement within the following
4gl program. Can anyone tell me what I am doing wrong? Thanks!
----------------- % % cut here % % ------------------
database dcom
main
define mytab like systables.tabname,
myinfo char(100)
declare tblcurs cursor for
select tabname from systables
where tabname not like "sys%"
and tabname not like "stx%"
and tabname not like "pcd%"
and tabname not like "cg%"
foreach tblcurs into mytab
display "TABLE: ",mytab
display "======================="
let myinfo = "info columns for ", mytab clipped
prepare mysql from myinfo
execute mysql
display " "
display " "
end foreach
close tblcurs
end main
----------------- % % cut here % % ------------------
***** Here is the error I get when I run this *****
Program stopped at "listdb.4gl", line number 17.
SQL statement error number -201.
A syntax error has occurred.
***** Does anyone know what is wrong ?????
Dan Wooster
uunet!bjudev!dwooster
Z[?62;1;2;6;7;8;9c
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.