House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Access 2000 and leading 0's

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

Access 2000 and leading 0's

----- Excess quoted text cut - see Original Post for more ----- Tangorre, Michael 04/30/2004 10:35 AM
Yes - you should always use a character field for zips. there is no reason to Mark A. Kruger - CFG 04/30/2004 10:27 AM
try something like this.... =text(foo.goo, "00000")  Id you are using Douglas.Knudsen 04/30/2004 09:51 AM
Jeremy, Greg Luce 04/29/2004 11:53 AM
----- Excess quoted text cut - see Original Post for more ----- Tangorre, Michael 04/29/2004 11:47 AM
Well that's interesting I wil keep that in mind next time. I just got Jeremy 04/29/2004 11:33 AM
> Hello I have a field in access 2000 holding zip codes, and Tangorre, Michael 04/29/2004 10:04 AM
----- Excess quoted text cut - see Original Post for more ----- Philip Arnold 04/29/2004 09:58 AM
Always use (var)chars for zip code. Some countries even have Pascal Peters 04/29/2004 09:39 AM
Since you can have leading zeros, I would use a varchar field Adkins, Randy 04/29/2004 09:38 AM
I'd use char or varchar... a 0 at the beginning of an integer has no Katz, Dov B (IT) 04/29/2004 09:37 AM
Hello I have a field in access 2000 holding zip codes, and new england Jeremy 04/29/2004 09:35 AM

04/30/2004 10:35 AM
Author: Tangorre, Michael Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32224#161769 ----- Excess quoted text cut - see Original Post for more ----- In addition, you always calculate distances and radius from zip and such using latitutde and longitude, so again char fields should be used. I was merely showing that in Access you could store a number with leading zeros. Mike
04/30/2004 10:27 AM
Author: Mark A. Kruger - CFG Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32224#161766 Yes - you should always use a character field for zips. there is no reason to use math functions on them - so char is the way to go. Plus, different countries and areas have different conventions. For example, in some parts of the country they use a dash for zip + box, as in  85838-3003.  If f you tried to store this as an int would subtract the two and store the total - ending up with 82835 - and your mail would end up in North Dakota.  This would confuse the post man because no one actually lives in North Dakota (although there have been rumors). -Mark   try something like this.... =text(foo.goo, "00000")  Id you are using HTML tables to generate your xls file, something like this then  <td>=text(#foo.goo#, "00000")</td>   Doug   Hello I have a field in access 2000 holding zip codes, and new england   zips start with 0. I know it is a db thing as when i type in the zip   directly in the db it cuts off the zero. The field type I am using now   is long integer. What could be causign this? Should I use something   other than long int. Is there a default in access? Thanks alot   Jeremy     _____
04/30/2004 09:51 AM
Author: Douglas.Knudsen Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32224#161763 try something like this.... =text(foo.goo, "00000")  Id you are using HTML tables to generate your xls file, something like this then  <td>=text(#foo.goo#, "00000")</td> Doug Hello I have a field in access 2000 holding zip codes, and new england zips start with 0. I know it is a db thing as when i type in the zip directly in the db it cuts off the zero. The field type I am using now is long integer. What could be causign this? Should I use something other than long int. Is there a default in access? Thanks alot Jeremy   _____  
04/29/2004 11:53 AM
Author: Greg Luce Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32224#161713 Jeremy,   Depends on your business rules. Canada has alpha chars in their postal codes. Most of my experience has been with applications that have to work with other users outside of just US users. I think the only thing to be gained by using numeric is the ability to do math on the column. Greg Well that's interesting I wil keep that in mind next time. I just got done changing them all to text feilds. thanks Jeremy > Hello I have a field in access 2000 holding zip codes, and > new england zips start with 0. I know it is a db thing as > when i type in the zip directly in the db it cuts off the > zero. The field type I am using now is long integer. What > could be causign this? Should I use something other than long > int. Is there a default in access? Thanks a lot In Access 2003, I have a zipcode field as well with the following attributes: Data Type: Number Field Size: Long Integer Format: 00000 That allows me to have zipcodes beginning with 0, as found in the US (New Hampshire) and Puerto Rico, etc.. HTH, Mike   _____  
04/29/2004 11:47 AM
Author: Tangorre, Michael Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32224#161712 ----- Excess quoted text cut - see Original Post for more ----- You are better off using text anyways, since some foreign "zipcodes" contain non alphanumeric characters. Good luck. Mike
04/29/2004 11:33 AM
Author: Jeremy Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32224#161711 Well that's interesting I wil keep that in mind next time. I just got done changing them all to text feilds. thanks Jeremy > Hello I have a field in access 2000 holding zip codes, and > new england zips start with 0. I know it is a db thing as > when i type in the zip directly in the db it cuts off the > zero. The field type I am using now is long integer. What > could be causign this? Should I use something other than long > int. Is there a default in access? Thanks a lot In Access 2003, I have a zipcode field as well with the following attributes: Data Type: Number Field Size: Long Integer Format: 00000 That allows me to have zipcodes beginning with 0, as found in the US (New Hampshire) and Puerto Rico, etc.. HTH, Mike   _____  
04/29/2004 10:04 AM
Author: Tangorre, Michael Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32224#161709 > Hello I have a field in access 2000 holding zip codes, and > new england zips start with 0. I know it is a db thing as > when i type in the zip directly in the db it cuts off the > zero. The field type I am using now is long integer. What > could be causign this? Should I use something other than long > int. Is there a default in access? Thanks a lot In Access 2003, I have a zipcode field as well with the following attributes: Data Type: Number Field Size: Long Integer Format: 00000 That allows me to have zipcodes beginning with 0, as found in the US (New Hampshire) and Puerto Rico, etc.. HTH, Mike
04/29/2004 09:58 AM
Author: Philip Arnold Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32224#161708 ----- Excess quoted text cut - see Original Post for more ----- Any kind of Int field will always trim off the leading zeros, because it stored it as the number itself, so 00001 will always be 1 Use some kind of text based field Especially if people use the "long" version of their zip (with the extra digits after a hyphen)
04/29/2004 09:39 AM
Author: Pascal Peters Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32224#161707 Always use (var)chars for zip code. Some countries even have non-numerical characters in them. Pascal ----- Excess quoted text cut - see Original Post for more -----
04/29/2004 09:38 AM
Author: Adkins, Randy Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32224#161706 Since you can have leading zeros, I would use a varchar field Hello I have a field in access 2000 holding zip codes, and new england zips start with 0. I know it is a db thing as when i type in the zip directly in the db it cuts off the zero. The field type I am using now is long integer. What could be causign this? Should I use something other than long int. Is there a default in access? Thanks alot Jeremy   _____  
04/29/2004 09:37 AM
Author: Katz, Dov B (IT) Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32224#161705 I'd use char or varchar... a 0 at the beginning of an integer has no impact on the value stored, and is thus ignored by the db. -dov   _____ Sent: Thursday, April 29, 2004 9:30 AM To: CF-Talk Subject: Access 2000 and leading 0's Hello I have a field in access 2000 holding zip codes, and new england zips start with 0. I know it is a db thing as when i type in the zip directly in the db it cuts off the zero. The field type I am using now is long integer. What could be causign this? Should I use something other than long int. Is there a default in access? Thanks alot Jeremy   _____  
04/29/2004 09:35 AM
Author: Jeremy Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32224#161704 Hello I have a field in access 2000 holding zip codes, and new england zips start with 0. I know it is a db thing as when i type in the zip directly in the db it cuts off the zero. The field type I am using now is long integer. What could be causign this? Should I use something other than long int. Is there a default in access? Thanks alot Jeremy
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference