Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

whitespace in fields

2 posts in General Discussion Last posting was on 2002-08-06 12:03:10.0Z
Chris_B Posted on 2002-08-06 12:01:25.0Z
From: chris_b
Date: Tue, 6 Aug 2002 08:01:25 -0400
Newsgroups: ianywhere.public.general
Subject: whitespace in fields
Message-ID: <58C69D75FF9D192400420C2D85256C0D.00420C4085256C0D@webforums>
Lines: 18
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:699
Article PK: 3229

Hi,

Now have a copy of Adaptive Server Anywhere 8 (have moved up from ver 7).

My query is about which settings or options I can change to eliminate the
"whitespace" (i.e. the 4 empty spaces trailing an 11 character string in a
15 character field).

This is affecting any queries I make, even in numeric fields. Is there some
way I must write my queries (i.e. using double single quotes, or calling a
function) to make a query such as

select * from some_table where some_field = 'this_text'

return the record I am looking for as apposed to returning no records
because it sees 'this_text ' as the value because of these place
holders.

Any help will be appreciated.


Rick Blythe Posted on 2002-08-06 12:03:10.0Z
From: "Rick Blythe" <rickb@ianywhere.com>
References: <58C69D75FF9D192400420C2D85256C0D.00420C4085256C0D@webforums>
Subject: Re: whitespace in fields
Date: Tue, 6 Aug 2002 08:03:10 -0400
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <7EGb5LUPCHA.197@forums.sybase.com>
Newsgroups: ianywhere.public.general
NNTP-Posting-Host: 172.31.141.78
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub ianywhere.public.general:698
Article PK: 2689

Ignore trailing blanks in comparisons
When building an Adaptive Server Enterprise-compatible database using
Adaptive Server Anywhere, choose the option to ignore trailing blanks in
comparisons.

a.. If you are using Sybase Central, this option is in the Create Database
wizard on the Choose the Database Attributes page.

b.. If you are using the dbinit command line utility, specify the -b
command-line switch.

When you choose this option, Adaptive Server Enterprise and Adaptive Server
Anywhere considers the following two strings equal:

'ignore the trailing blanks '
'ignore the trailing blanks'
If you do not choose this option, Adaptive Server Anywhere considers the two
strings above different.

A side effect of this choosing this option is that strings are padded with
blanks when fetched by a client application.

<chris_b> wrote in message
news:58C69D75FF9D192400420C2D85256C0D.00420C4085256C0D@webforums...
> Hi,
>
> Now have a copy of Adaptive Server Anywhere 8 (have moved up from ver 7).
>
> My query is about which settings or options I can change to eliminate the
> "whitespace" (i.e. the 4 empty spaces trailing an 11 character string in a
> 15 character field).
>
> This is affecting any queries I make, even in numeric fields. Is there
some
> way I must write my queries (i.e. using double single quotes, or calling a
> function) to make a query such as
>
> select * from some_table where some_field = 'this_text'
>
> return the record I am looking for as apposed to returning no records
> because it sees 'this_text ' as the value because of these place
> holders.
>
> Any help will be appreciated.