>>>Maybe computed column is what I am looking for. Because in VFP the MyDateFunc is a computed column (I just didn't remember this term). I will have to look into how to create those. Thank you.
>>
>>This is very simple in both table designer or a script.
>>
>
>Computed column didn't work. The syntax of the SQL Select that is generated by SF Query is as following (simplified):
>
>
>select * from MyTable where MyDateFunc( Date1, Date2) > 3
>
>
>I added computed column MyDateFunc to the SQL database table. But I suppose the computed column does not accept parameters. So the error message I get is
>
>"MyDateFunc is not recognized built-in function name"
>
>I suppose if I change the name of the computed field in my VFP database not to have parameters, it could possibly work. And I will also try the function approach.
I think Doug may be the best person to answer in regards to SF, but from the SQL Server perspective, as I already said, having scalar function in the query usually lead to performance problems (unless it's CLR function). Inline table functions are much better. So, I suggest to re-think the approach rather than trying to put the same logic as in VFP (where I think UDFs in where clause don't perform well also).
If it's not broken, fix it until it is.
My Blog