>lc_custno = [123] >lt_date = CTOT([07/01/2004]) &&watch strictdate for this sample or use {^2004-07-01 ::} > >TEXT to lc_SQL TEXTMERGE NOSHOW PRETEXT 3 && you may not have pretext option > SELECT * > FROM MyOracle.Sales Sales > WHERE Sales.customer = ?lc_custno > AND Sales.OrderDate = ?lt_date > ORDER BY Sales.OrderDate >ENDTEXT >*!* get rid of line returns [not needed in VFP9 BTW] >lc_SQL = STRTRAN(lc_SQL, CHR(13) + CHR(10), [ ]) >nresult = SQLEXEC(myhandle, lc_SQL, 'myresults') >>All the format casting etc seems to be taken care of when we do this against Oracle or any other backend for that matter.