Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function or Stored Procedure?
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01527340
Message ID:
01527391
Views:
46
>>>>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).

When you are saying, "inline table function" do you mean computed column?

Also, when you are saying the "performance" problem, do you mean that if I include a scalar function in a SQL Select query, the performance of such query is relatively bad? That is, if I don't use the function, performance of the SQL Select is ok? Thank you.
"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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform