On 2008-02-12 07:30, Ken Johanson wrote:
I OFTEN use a cast of CHAR to get just the first character. b) all the other databases chose to not follow the spec in the context of cast and char with implicit length. I doubt that: http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db2.doc.sqlref/castsp.htm http://msdn2.microsoft.com/en-us/library/aa258242(SQL.80).aspx Your specific example is covered here: http://vista.intersystems.com/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_cast and here: http://answers.yahoo.com/question/index?qid=20071017084134AA4mCJC
What is wrong with using VARCHAR for your purpose???????????????????????????? If you want the string auto-sized, that is what VARCHAR is for. CHAR is, BY DEFINITION, a DECLARED fixed length. |