SQL Error - #511
Posted on 2007-11-21
I am getting an error while executing a query in Sybase. What I have noticed is there is a convert of char data type is happening to varchar. The size defined os 4000. So when I bring down the size from 4000 to 1000, the error vanishes and executes the query successfully.
Since I am new to Sybase and also Database, I wonder what happens when we use convert(4000), is there any temprory table getting used. Even if this is the scenario 4000 bytes is a very small number then why do we have this error comming up.
Finally when I convert a char to varchar, as a best practice, what and how do I know what is the size to be given?
Thanks a Lot