|
I want to convert nvarchar to ascii value, So I want to create udf function, but i don't know to execute the function. please anyone know, give me the solutions
(comments are locked)
|
|
A scalar function is basically an expression. You use it in a query just as you would a column name, variable, or formula. Obviously you have to pass parameters to it in the query.
Although this is outside the scope of your question, a scalar function should not be confused with a table-valued function. A scalar function produces a single result value, while a table-valued function can produce a set of rows and is used either like a table, or in conjunction with APPLY. Inline table-valued functions are treated much like views by the optimizer and can produce performance benefits over scalar functions when applied to a large number of rows.
(comments are locked)
|
|
Say you have created that UDF - then you would call it with
So you might say
However, in this case, you would be well advised to use the ASC built in function. Thanks for sorting out my formatting Mel! :)
Oct 26 '09 at 06:33 AM
Matt Whitfield ♦♦
(comments are locked)
|

