Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-12-30 : 12:08:00
|
| mukunda writes "I have a problem with a UDF i have written. This UDF is to stip a string of HTML tags. It takes a string and a number acting as the length of the output string as parameteres. For eg: select dbo.strip_html('<font face=verdana size=1>Strip this for me...</font>',100)returns me the string "Strip this for me."..This is working perfectly fine in queries, but when i use the same function in a stored procedure the function is not at all functioning. The column on which i'm using this has a text datatype. This is puzzling me since this works perfectly for general queries on the same column. The execution plan also shows that the function is being called. please throw some light." |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2003-12-30 : 12:18:39
|
| CONVERT() the text datatype to a varchar(8000) first, and then pass it to the function.In your function, you probably declared you want a varchar() as a parmater, so that is what you must pass in not a TEXT datatype.- Jeff |
 |
|
|
|
|
|