By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,061 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Converting Text file that contains negative signs

P: 1
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.
Mar 21 '07 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534
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
Mar 21 '07 #2

Post your reply

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