Re: Quick SQL Question

"Booth, Bill" <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <[email protected]>
Is this MS SQL Server and what version? How are you executing the query?


-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:[email protected]] On Behalf Of
Steve Abaffy
Sent: Tuesday, May 15, 2007 14:59
To: [email protected]
Subject: [DOTNET-WINFORMS] Quick SQL Question

Hello,

        I am writing an application that looks up addresses. The data is
broken up into prestreetdirection, streetname, poststreetdirection,
suffix, lowaddress and highaddress. All these fields are char fields as
we have lowaddress "numbers" like 312B or 31-A etc...
I have a query that basically has in its where clause,
        Where @SuppliedHouseNumber between LowAddress and HighAddress

For the value of @SuppliedHouseNumber='700' the query returns the
following two records
1) LowAddress = 700 , highAddress = 700 which of course is expected,
2) LowAddress = 700 , highAddress = 718 which of course is NOT Expected
but I don't know why.

Any ideas and also how to get around the other problem of
SuppliedHouseAddress = 123 and returns like 1123?

Thanks

The information in this e-mail is confidential, may be legally privileged and is intended solely for the addressee. If you have received this e-mail in error, you are hereby notified that any use, distribution, or copying of this communication is strictly prohibited.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.