Have you tried surrounding the variable coming in with a Trim statement IE:
Where zipcode =
-Original Message-
From: Douglas Brown [mailto:mistobr...@gmail.com]
Sent: Thursday, October 22, 2009 2:12 PM
To: cf-talk
Subject: OT database problem
I have a zipcode table that is driving me
Yeah, an nvarchar(5) with a '81416' in the WHERE clause should work just
fine! Glad you've found a working path.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mai
> I have a zipcode table that is driving me nuts...
>
> If I open query analyzer and say
>
> SELECT * FROM zip WHERE zipcode = 'valid zipcode' I get nothing back
>
> but if I say
>
> SELECT zipcode from zip I get all the zips back and the valid zipcode
> from the first query is listed in ther
Ah yes... makes sense
>>> Charlie Griefer 10/22/2009 2:34 PM >>>
Integer fields for zip codes can be problematic in the case of a zip code
like 08817 (tends to strip off the leading zero).
On Thu, Oct 22, 2009 at 11:35 AM, Timothy Laureska <
tlaure...@dhmh.state.md.us> wrote:
>
> Is there any
Integer fields for zip codes can be problematic in the case of a zip code
like 08817 (tends to strip off the leading zero).
On Thu, Oct 22, 2009 at 11:35 AM, Timothy Laureska <
tlaure...@dhmh.state.md.us> wrote:
>
> Is there any reason you're not using an integer field type of some sort?
>
>
> >
Is there any reason you're not using an integer field type of some sort?
>>> Douglas Brown 10/22/2009 2:24 PM >>>
>I'd need to see the datatype of the zipcode column as well as the content
>of the 'valid zipcode' variable before I could answer the question, but my
>guess would be that there'
>I'd need to see the datatype of the zipcode column as well as the content
>of the 'valid zipcode' variable before I could answer the question, but my
>guess would be that there's a discrepancy in datatype: '#validZipCode#'
>when it should be #validZipCode# or something like that.
The dataty
What is the field type of the zip code field
>>> Douglas Brown 10/22/2009 2:12 PM >>>
I have a zipcode table that is driving me nuts...
If I open query analyzer and say
SELECT * FROM zip WHERE zipcode = 'valid zipcode' I get nothing back
but if I say
SELECT zipcode from zip I get all the zi
I'd need to see the datatype of the zipcode column as well as the content
of the 'valid zipcode' variable before I could answer the question, but my
guess would be that there's a discrepancy in datatype: '#validZipCode#'
when it should be #validZipCode# or something like that.
~~~
9 matches
Mail list logo