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 |
|
kapilarya
Yak Posting Veteran
86 Posts |
Posted - 2005-08-29 : 09:29:13
|
declare @sql varchar(8000)Select @sql=COALESCE(@sql + ',', '') + EmpNameE from Employeeselect @sqlsee this query cannot go beyound 8000 but i need more ...yeh dil mange more.... Kapil Arya |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-08-29 : 09:42:39
|
| >>yeh dil mange more....????Can you save some space by using IDs instead of names?One option is to "chunk" the call. ie: make as many calls as necessary in <8000 char chunks. Another option is to add as many parameters/variables as necessary to handle the largest load.Without more details can't offer much more...Be One with the OptimizerTG |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-29 : 09:53:53
|
Limit the selectionSomething likedeclare @sql1 varchar(8000)declare @sql2 varchar(8000)Select @sql1=COALESCE(@sql1 + ',', '') + EmpNameE from Employee where EmpId between 1 and 100Select @sql2=COALESCE(@sql2 + ',', '') + EmpNameE from Employee where EmpId between 101 and 200select @sql1+','+@sql2>>yeh dil mange more....I think he needs more MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|