I have a function in VFP 9 code that goes something like this:
FUNCTION DaysToComplete
LPARAMETERS tdDateClos, tdDateOpen
RETURN (MAX(tdDateClos-tdDateOpen,0))
This function is used in SQL Server select that the program would send to the SQL Server. And of course it fails with error that SQL Server does not recognize DaysToComplete() function.
Do I need to create a Function is SQL Server database? And since I have never created a SQL function, what would it look like?
TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham