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 |
|
PeterG
Posting Yak Master
156 Posts |
Posted - 2002-05-13 : 15:44:13
|
This is my code: set @profID = 1declare @allowall bitdeclare @text varchar(25)set @text = ''Set @sql = 'SELECT E2.txtCostCenter, E2.txtDescription FROM CodeDpndCol2 CDINNER JOIN Element' + @acctLevel + '_Codes E1 ON CD.lngCodeDependID = E1.lngIndexINNER JOIN Element2_Codes E2 INNER JOIN CodePfMulti2 CP ON E2.lngIndex = CP.lngCodeIDON CD.lngCodeSourceID = E2.lngIndex WHERE (E1.txtCostCenter = N''' + @array_value + ''')AND (CP.lngProfID = ' + @profID + ') AND ((E2.txtCostCenter like N''' + @text + '%' + ''')OR (E2.txtDescription Like N''' + @text + '%' + '''))'--exec ( @sql )select @sql This is what I get when I do a select @sql on this query in query analyzer I only get a partial sql statement. Why?"SELECT E2.txtCostCenter, E2.txtDescription FROM CodeDpndCol2 CDINNER JOIN Element1_Codes E1 ON CD.lngCodeDependID = E1.lngIndexINNER JOIN Element2_Codes E2 INNER JOIN CodePfMulti2 CP ON E2.lngIndex = CP.lngCodeIDON CD.lngCodeSourceID = E2.lngIndex WH( row(s) affected)" |
|
|
PeterG
Posting Yak Master
156 Posts |
Posted - 2002-05-13 : 15:52:59
|
| Pls ignore this post. I found my error. A dumb mistake really! |
 |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-05-13 : 15:53:12
|
| cause your max character per column for the current session is set to 256 . . .<O> |
 |
|
|
|
|
|