Ian,

I have seen this behavior before.

It seems that sometimes when you use excel even if you declare a field text
and you then enter a number into it excel will convert it to a number
instead!  Before I get flamed stating that this doesn't happen, it has
happened to me.  The easiest way to fix from your point of view should be
that when you call in the zip column add some code to check for the length
of the zip and if it is less than 5 characters long, keep adding zeros to
the beginning until it is 5 characters long.

If this were sql I could come up with some really slick code to do the
trick.  I usually don't do this kind of stuff directly from CF.  Normally I
would pull the data into my SQL server and work on it that way.

Steve

----- Original Message -----
From: "Ian Lurie" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 11:42 AM
Subject: Screwy Excel Query Result


> I'm querying an Excel spreadsheet that includes a ZIP column.
>
> For some reason the query drops all ZIP codes that start with 0. I'm using
> CF5, and my query is really simple:
>
> SELECT *
> FROM dealerinfo
>
> The ZIP column is TEXT format in the spreadsheet.
>
> I'd love to switch to CSV but I need this to be really, really simple for
my
> client - ideally they should be able to upload the .xls file and be done
> with it.
>
> Has anyone else seen this behavior?
>
> Ian
>
> --
> Portent Interactive
> Effective web sites through Conversation Marketing �
> http://www.portentinteractive.com
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to