I need help with my table. When I import my text file, some of my records contain the negative symbol, indicating a negative number. If I change my import spec to number, these records get deleted. So, I am trying to write either an if/then statement or some other statement so that I can convert my text fields to appropriate numbers. Here is an example of my data:
00-1, 0-10, -100, 0001, 0010, 0100, 1000. In any of these cases, I need to return or update the field so that my end result is -1, -10, -100, 1, 10, 100, or 1000. The max field length is 4. Thanks for listening.
1 1772
I need help with my table. When I import my text file, some of my records contain the negative symbol, indicating a negative number. If I change my import spec to number, these records get deleted. So, I am trying to write either an if/then statement or some other statement so that I can convert my text fields to appropriate numbers. Here is an example of my data:
00-1, 0-10, -100, 0001, 0010, 0100, 1000. In any of these cases, I need to return or update the field so that my end result is -1, -10, -100, 1, 10, 100, or 1000. The max field length is 4. Thanks for listening.
I wouldn't try to do this on the import spec. I would import as text to a temporary table and use an append query to append the the data to the table.
Mary
Sign in to post your reply or Sign up for a free account.
Similar topics
by: SB |
last post by:
Hello. I have an input file which is laid out in the following manner...
Name
Day 1
am time 1
am time 2
appointment
pm time 1
pm time 2
appointment
Day 2
|
by: Jus! |
last post by:
Hi.
I am reading bits(1's & 0's) from a file and i wa wondering what is the most
efficient method of converting these strings to individual int's?
eg. File contains:
110001
010011
etc......
|
by: Lenard Gunda |
last post by:
hi!
I have the following problem. I need to read data from a TXT file our
company receives.
I would use StreamReader, and process it line by line using ReadLine,
however, the following problem...
|
by: Lelle |
last post by:
Hello !
how can i insert text containg code examples from a textbox into a database
using SQL insert statment.
i have no problem to just add text that dont contains code and script
examples...
|
by: MPF |
last post by:
Alas, I surrender...
In a file from a COBOL dump, which is in ASCII, one of the fields is defined
as S9(9) V99 Value +0.
The value in this location is 0000018922D, which according to the author...
|
by: allthecoolkidshaveone |
last post by:
I want to convert a string representation of a number ("1234") to an
int, with overflow and underflow checking. Essentially, I'm looking
for a strtol() that converts int instead of long. The...
|
by: JosAH |
last post by:
Greetings,
Introduction
This week we start building Query objects. A query can retrieve portions of text
from a Library. I don't want users to build queries by themselves, because users
make...
|
by: STEPHENSS |
last post by:
Hi,
New to SQL.
I need to reverse the signs, for example I have an amount of -1,500.00 and I need to change the the Amount to 1,500.00 and all positives amount to a negative amount also.
...
|
by: kronecker |
last post by:
I am trying to delete multiple lines in a text file using the
following
Private Sub Read_TextFile()
Dim objReader As StreamReader
Dim strfull, strContents, strContentsold, strContentsnew As...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |