Unanswered: Need Help - UDF SQL 00 to Scalar SQL 05
I'm having trouble with the UDF's I had in SQL 2000 that were migrated to SQL 2005 under the SCALAR FUNCTION item. Before in 2000 you just created the UDF, named it and saved. IN SQL 2005 you create/modify and then have to save it as a .SQL file to a folder. First of all, what folder should it go to so that all can use and secondly, when I do this and run the functions it doesn't work... I need to modify the scalar function and
save it with out saving to a .SQL file. How do I do this or is this the new way to create/modify functions. Any help is much appreciated
The code I gave you creates a UDF in the database. As with any code you edit in Management Studio (or the old Query Analyzer), when you exit the program it prompts you whether you want to save your code to a file. Whether you want a copy of the script on your hard drive is up to you, and has nothing to do with the operation of the database.
To edit a function, right click on the function in Management Studio and select Modify. When you are through editing the code, run the script to execute it.
If it's not practically useful, then it's practically useless.
Go to Management Studio
Select Database Engine
Select DB working with
Right pane select function
Tab pops up in right pane named ....SQLquery4.SQL
Right click it asks to save I say Yes, goes to dialog asks for name
I then close. When I open the function again, change wasn't made.
What am I doing wrong.