Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SqlServer 6.5 Select on Char columns

2 views
Skip to first unread message

Ricardo Javier Puga

unread,
Aug 28, 1998, 3:00:00 AM8/28/98
to
You can use RTRIM( col_name).

The spaces not appear if the column allows null value.

Meusburger Eduard

unread,
Aug 28, 1998, 3:00:00 AM8/28/98
to
We are converting our application from SQLBase to SQLServer and found,
that a select statement on char columns on the SQLServer returns the
value of the field plus spaces after the value until the length of the
char column.
Is the a way to turn off the retrieveal of the right spaces?

Thanks in advance
--
Eduard Meusburger
Infogate AG

e-mail: info...@bluewin.ch
www: www.infogate.ch

Ulrich Kaemmerer

unread,
Aug 30, 1998, 3:00:00 AM8/30/98
to
That is correct !
In SQL-Databases a char-Field is filled up with spaces. ( Only in SQLBase
char and varchar is the same type )
You have to use varchar (varchar2 for Oracle) instead of char .


U.Kaemmerer
Creon IT Consult

Meusburger Eduard schrieb in Nachricht ...

Tuncay Karaca

unread,
Aug 31, 1998, 3:00:00 AM8/31/98
to
Hi,

Okay, we encountered the same problem while using IBM DB2 UDB 5.0.... and
we used VARCHAR type on DB2 UDB instead of CHAR type and problem is solved.

You should convert all CHAR types to VARCHAR types....

Tuncay KARACA
tka...@ibimsa.com

0 new messages