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!
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.
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.
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: -
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
-
FROM PERSONAL_2007_MAIN;
SAMPLE Data and OUTPUT: -
UNIQUE_FIELD_2 DES_VALUE_1_2 Is_Field_Numeric
-
A $234569 Yes
-
B 345678 Yes
-
C 99812356 Yes
-
D 765G134 No
-
E Help Me No
-
F 987.44 Yes
-
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).
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.
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.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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...
|
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...
|
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...
|
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.
...
| |
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...
|
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:
...
|
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...
|
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...
|
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,...
|
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...
| |
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,...
|
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...
|
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...
|
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,...
|
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 ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |