Hi Luis,
Do you know the value of the parameter?, if you do you can do this:
lcSQL = "SELECT CusCod, CusName FROM customer WHERE CusCod IN " +;
"(SELECT CusCod FROM sales WHERE SalesDate = '" + DTOC(ldParameter) + "')"
lnRtnVal = SQLEXEC(lnConnection,lcSQL,"MyCursorName")
HTH
>I have a report whose data comes from SQL-Server. This report has some parameters. The data should come from a SQL-SELECT statement like:
>
>
>SELECT CusCod, CusName FROM customer
>WHERE CusCod IN (SELECT CusCod FROM sales WHERE SalesDate = ?param)
>
>
>I'm using VFP7 and CR9 Is there a way to do this? I would like to avoid to create a stored procedure in SQL Server for this report.
>
>TIA
>
>Luis
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould