Subject: Problem with AGGREGATE FUNCTIONS in SQL SERVER 200
Posted By: vikiboye Post Date: 2/20/2006 1:13:14 AM

I created 3 AGGREGATE FUNCTIONS in SQL SERVER 2005. Also i used three of them in SPs. Except one, the other 2 throwing error like :
 
Msg 6522, Level 16, State 2, Procedure ADDPeerGroupLowerQuartileStatistics, Line 591
A .NET Framework error occurred during execution of user defined routine or aggregate
'LowerQuartile':
System.Data.SqlTypes.SqlTypeException: The buffer is insufficient. Read or write operation
failed.
System.Data.SqlTypes.SqlTypeException:
   at System.Data.SqlTypes.SqlBytes.Write(Int64 offset, Byte[] buffer, Int32 offsetInBuffer,
Int32 count)
   at System.Data.SqlTypes.StreamOnSqlBytes.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.BinaryWriter.Write(String value)
   at LowerQuartiles.Write(BinaryWriter w)


There is no much difference in three of the functions. Though im getting the error like above.
Anyone pls help me in this.
 
Thanks in Advance,
VikiBoye


Reply By: David_the_DBA Reply Date: 2/20/2006 11:07:08 AM
VikiBoye,

The group might be able to help better if you pasted your code. First the function that is not working and then one of the functions that is working. Use fc or some other tool to show the differences and then paste that result as well.

David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com

Go to topic 39394

Return to index page 365
Return to index page 364
Return to index page 363
Return to index page 362
Return to index page 361
Return to index page 360
Return to index page 359
Return to index page 358
Return to index page 357
Return to index page 356