Re: LENGTH function and trailing spaces
Posted in 1995
Topics: Data Types & Schema Design
Kirk Bradley - Mainframe and Integration Technologies (kbradley@130.35.1.6) wrote: : I now see what I was saying wrong. I kept saying CHAR and I meant : VARCHAR. According to the Guide to SQL: Reference manual (pg 3-18 Data types) : : "The database server does NOT strip a VARCHAR object of any : user-entered trailing blanks, nor does the database server : pad the VARCHAR to the full length of the column." : ok.. so the question is: if I do this: : CREATE TABLE KIRK (VC VARCHAR(100)) : INSERT INTO KIRK VALUES ('KIRK AND 2 TRAILING BLANKS ') : then how do I find out (in a SQL stmt (no 3-GL code)) that : the length stored for that INSERT is 28 cause LENGTH(VC) : will surely return 26 won't it? Hey Kirk, You wouldn't be working on that Informix to Oracle conversion tool project I keep hearing about ??? Just wondering. :-) Mike Teachworth CodeGen Software, Inc 800-598-8649 504-456-1260 fax work email: miket@codegen.com