Maybe I'm missing something, but wouldn't you just do NAME <> '';
No space inside. Then won't it look to see if the value you are comparing
to is empty(all blanks)? That is how I do it in my sql statements....
then again, our text fields don't usually start with a blank so maybe I
have potential bugs all over the place.
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
Alan Campin <alan0307d@xxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
04/08/2010 07:38 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
To
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
cc
Subject
Constraint comparing blanks.
When you are declare DDL for an SQL defined table we use a lot of stuff
like
this
NAME <> ' ';
I would have thought that this would expand to be compare say 10 char name
to 10 char blank but I saw today that is not true.
If you have the following in a field name the test will fail because it
only
looks at the first character.
<b>THOMAS<b><b><b> where <b> is a blank.
What is the correct way to declare this test? In RPG you have a *ALL' '
but
not in SQL.
You surely don't want to code
NAME <> ' '
I know there has to be a simple way to do it. Just can't think of it off
the
top of my head.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.