>>Does MSSQL have VFP's equivalent to pViews or do I use Prepared SQL Statements with parameter markers or should I just execute dynamic-SQL?
>
>The closest equivelent would be a stored procedure...
>
>CREATE STORED PROCEDURE
>
>(@startdate datetime
>,@enddate datetime
>)
>
>AS
>
>SELECT * from MyTable where invoicedate is between @startdate and @enddate
>
>RETURN
>*******
>Then you can call this will SPT in VFP and it will return a result set.
>
>BOb
But I can not use this SP as function in SQL query? Or I can?
For example:
SELECT ;
ID,
MySP(Date) AS kkk
FROM Table
Giedrius
Giedrius