Tim,

> 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? 
>   Documentation?

AFAIK there's no way to convert data at the time you import them.
Afterwards, you can convert them as much as you like, or - as an
alternative - leave them as they are, but convert them at display
time. Just to give you an idea (suppose "col" is your "field"):

SELECT IF(col='9999','N/A',col) /* conversion at display time */;

You could also use CASE / WHEN / THEN / ELSE.

Documentation: http://www.mysql.com/doc/en/Control_flow_functions.html

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  iConnect GmbH <http://iConnect.de>
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3

[filter fodder: sql, mysql, query]


---------------------------------------------------------------------
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

Reply via email to