473,503 Members | 12,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Finding non numeric records

55 New Member
I have a table that was imported with all text fields. Most of them should be dollar values, but I keep getting conversion errors(wouldn't be a problem, but there are about 1000 records or so that come up with wrong conversions) The data types of the fields are text and I need to change to currency or even number.

So anyway to find using vba or a query or combination of the two to find those records that that don't contain just numbers?

Thanks!
Jan 27 '08 #1
5 5871
ADezii
8,834 Recognized Expert Expert
I have a table that was imported with all text fields. Most of them should be dollar values, but I keep getting conversion errors(wouldn't be a problem, but there are about 1000 records or so that come up with wrong conversions) The data types of the fields are text and I need to change to currency or even number.

So anyway to find using vba or a query or combination of the two to find those records that that don't contain just numbers?

Thanks!
That should be a relatively simple matter. Post the Table Name, the name of the Field (TEXT) containing the dollar values, the Primary Key Field (if any) in the Table, and any other relevant information. Also, post some sample data indicating the type of vales stored in this Field.
Jan 28 '08 #2
barmatt80
55 New Member
thanks adezii,

Table Name: PERSONAL_2007_MAIN(text)
Primary Key: UNIQUE_FIELD_2(text)
Field with numerics and characters: DES_VALUE_1_2(text)

The (text) is the data type of the field. DES_VALUE_1_2 is suppose to be the dollar value. My database was a text file that was parsed into access, when I try to export it and reimport it with the correct data type, but I get some import errors, and as I find those records were probably parsed wrong. The values with the DES_VALUE_1_2 field can have as much as 9 spaces(999999999), but some of the fields have 345HJ. I am needing to find those fields that don't have just numeric data.

Anything else I need to include? I do greatly appreciate it.

THanks.
Jan 28 '08 #3
ADezii
8,834 Recognized Expert Expert
thanks adezii,

Table Name: PERSONAL_2007_MAIN(text)
Primary Key: UNIQUE_FIELD_2(text)
Field with numerics and characters: DES_VALUE_1_2(text)

The (text) is the data type of the field. DES_VALUE_1_2 is suppose to be the dollar value. My database was a text file that was parsed into access, when I try to export it and reimport it with the correct data type, but I get some import errors, and as I find those records were probably parsed wrong. The values with the DES_VALUE_1_2 field can have as much as 9 spaces(999999999), but some of the fields have 345HJ. I am needing to find those fields that don't have just numeric data.

Anything else I need to include? I do greatly appreciate it.

THanks.
The following Query should do the trick:
Expand|Select|Wrap|Line Numbers
  1. SELECT PERSONAL_2007_MAIN.UNIQUE_FIELD_2, PERSONAL_2007_MAIN.DES_VALUE_1_2, IIf(IsNumeric([DES_VALUE_1_2]),"Yes","No") AS Is_Field_Numeric
  2. FROM PERSONAL_2007_MAIN;
SAMPLE Data and OUTPUT:
Expand|Select|Wrap|Line Numbers
  1. UNIQUE_FIELD_2        DES_VALUE_1_2          Is_Field_Numeric
  2. A                    $234569             Yes
  3. B                        345678             Yes
  4. C                    99812356             Yes
  5. D                    765G134             No
  6. E                    Help Me             No
  7. F                    987.44                 Yes
  8.  
Now, it becomes a simple matter of setting the specific Criteria in the [Is_Field_Numeric] Field to either "Yes" (Numeric) or "No" (not Numeric).
Jan 28 '08 #4
barmatt80
55 New Member
my oh my, you make it seem so simple. Why didn't I think of that? I guess I need to work harder! Thanks much appreciated.
Jan 29 '08 #5
ADezii
8,834 Recognized Expert Expert
my oh my, you make it seem so simple. Why didn't I think of that? I guess I need to work harder! Thanks much appreciated.
You are quite welcome.
Jan 29 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
15524
by: Mac | last post by:
I have imported some data to sql2k from my old system. Somehow, it imported invoice amount to char type. I just created another column called invamt2 type NUMERIC so I can copy or convert...
2
7114
by: Antitax | last post by:
I have a database with more than 800 adress records Some of the are similar because some letters in the street adress for example are not identical, altough they point to the same adress. Does...
2
8664
by: Robert McEuen | last post by:
Using Access 97, Windows XP I'm receiving a Numeric Field Overflow error during text import that I did not receive before I split my database. Another thread I found suggested that the cause of...
1
3367
by: S. van Beek | last post by:
Dear reader, How can I filter a numeric field with Like as criteria in a query. To filter a numeric field with <10 as criteria this will com back with the result of those records for which...
2
2835
by: ElkGroveR | last post by:
Hi there! I'm using PHP to create a simple, dynamic MySQL SELECT query. The user chooses a selection from a HTML Form SELECT element's many options and submits the form via a POST action. ...
1
2237
by: pchadha20 | last post by:
How to single numeric values from a field in a table which has multiple numeric value in a field of a table.And that table contains thousands of records. Suppose we have a table customer having...
0
3209
by: naorem ranjan | last post by:
I have one problem regarding format of mixed data columns in excel. I am using ADO.NET to retrieve data from excel sheet. Connection String used is: ...
3
2351
by: tembil | last post by:
Hi, How do I select numeric records from a table in MySQL I need to select ID's the length must be 13 and it must be numeric, I have already selected the length in my where clause and I'm stuck...
1
1164
by: Deepmala26 | last post by:
Hi, I m doing a project in VB.NET. I've created form and database connectivity is done. I've displayed data in Datagrid through which user can sort and find records. for finding...
0
7212
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7296
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5604
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
405
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.