RE: OT database problem

2009-10-23 Thread Scott Stewart
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

Re: OT database problem

2009-10-22 Thread Jason Fisher
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

Re: OT database problem

2009-10-22 Thread Douglas Brown
> 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

Re: OT database problem

2009-10-22 Thread Timothy Laureska
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

Re: OT database problem

2009-10-22 Thread Charlie Griefer
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? > > > >

Re: OT database problem

2009-10-22 Thread Timothy Laureska
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'

Re: OT database problem

2009-10-22 Thread Douglas Brown
>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

Re: OT database problem

2009-10-22 Thread Timothy Laureska
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

re: OT database problem

2009-10-22 Thread Jason Fisher
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. ~~~

OT database problem

2009-10-22 Thread Douglas Brown
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 there. Why cannot I not