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 |
|
ckuo@kahluadesigns.com
Yak Posting Veteran
58 Posts |
Posted - 2005-04-22 : 17:08:08
|
| I have a udf that returns a varchar(2000)in the udf i goDeclare @Temp varchar(2000)SELECT @Temp = COALESCE(@Temp + ', ', '') + CONVERT(varchar,bleh.id) FROM bleh INNER JOIN blah ON bleh.a = blah.a WHERE bleh.id = @idreturn @tempNow when i run this in query analyzer and SELECT @temp, it gets chopped off at 255 chars, when i do PRINT @temp, it displays everything. How can I get this to work in a UDF? I tried to change the varibale to a text, but error says cant use TEXT for a local variable. Any ideas? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-04-22 : 17:09:57
|
| The chopping off at 255 chars has to do with Query Analyzer default settings. Go to tools..options..results tab. Change the maximum characters per column to 7000.Tara |
 |
|
|
ckuo@kahluadesigns.com
Yak Posting Veteran
58 Posts |
Posted - 2005-04-22 : 17:15:45
|
| Well, in my .net application, it gets chopped off at 255 chars. how would i enable that to accept more? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-04-22 : 17:17:27
|
| Your variable in your application must not be big enough then.Tara |
 |
|
|
|
|
|