Server: Msg 1540, Level 16, State 1, Line 1

  • I am executing a query

    "Select Companyid from ExhibitorReport "

    from MS-Sql Server Query Analyzer and it works for many database but only for one database it gives following error

    Server: Msg 1540, Level 16, State 1, Line 1

    Cannot sort a row of size 8421, which is greater than the allowable maximum of 8094.

    Please Suggest what should I do

    Thanks

    Vijay Soni

     

  • Hi Vijay.....it does not mean that u have more that 8K rows...

    it means that ur some data for ur Companyid

    is exceeding its datatype size....itz a rule u cannot have more

    than 8K per row...

    Can you tell me wat datatype is this company id off...

    i alwayz suggest to have ids of type uniqueidentifier...

    pls chk the data with len command....

    hope it helps...

    Thanks

    Riyaz

  • Actually ExhibitorReport is a view and it selects lot many columns event if CompanyId is int type this view has other columns who have data more that 8 k. is there any way that my query even if its row selects data more tha 8 k insted of giving error at least executes.

    Thanks

    Vijay Soni

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply