Hello friends,
Can anyone fill me in on the general principle involved in the following code failure (so I don't lose a lot of hair-pulling time trying to figure it out, as I did on this one)?
The following code fails to compile, giving an error message: "Command contains unrecognized phrase/keyword"
whereas this (seemingly equivalent) one works just fine...
I would have thought these two statements are syntactically identical.
Any thoughts?
Thanks.
Bill V
Rochester, Michigan
Can anyone fill me in on the general principle involved in the following code failure (so I don't lose a lot of hair-pulling time trying to figure it out, as I did on this one)?
The following code fails to compile, giving an error message: "Command contains unrecognized phrase/keyword"
Code:
cCmdStr = "SELECT date, ctgname, SPACE(8) as specctg, descr, amt, shortnm, chknum ;
FROM checkreg, acctlist INTO dbf temptbl ;
WHERE checkreg.acctidn = acctlist.acctidn ;
AND LOWER(cSrchVar) $ LOWER(descr) ;
and BETWEEN(YEAR(date), thisform.nYear1, thisform.nYear2) ;
ORDER BY date"
&cCmdStr
whereas this (seemingly equivalent) one works just fine...
Code:
WITH thisform
cCmdStr = "SELECT date, ctgname, SPACE(8) as specctg, descr, amt, shortnm, chknum ;
FROM checkreg, acctlist INTO dbf temptbl ;
WHERE checkreg.acctidn = acctlist.acctidn ;
AND LOWER(cSrchVar) $ LOWER(descr) ;
and BETWEEN(YEAR(date), .nYear1, .nYear2) ;
ORDER BY date"
&cmdStr
ENDWITH
I would have thought these two statements are syntactically identical.
Any thoughts?
Thanks.
Bill V
Rochester, Michigan