At 14:00 -0900 2/15/03, Tim Johnson wrote:
Hello All:
(using MYSQL Ver 11.15 Distrib 3.23.41
for redhat-linux-gnu (i386) (RH 7.2))
I am importing text data (but in a numeric format).
The customers wants 'N/A' in an empty field.
Additionally:
The customer wishes that if a field = '9999'
the default value of 'N/A' be substituted.
Is this possible to do in MySQL?
Sure, but not with LOAD DATA. You can either preprocess the data file
beforehand, or do this after import:
UPDATE TABLE t SET col = 'N/A' IF col = '' OR col = '9999';
Documentation?
Regards
--
Tim Johnson <[EMAIL PROTECTED]>
http://www.alaska-internet-solutions.com
http://www.johnsons-web.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php