Need help with query
976439Dec 5 2012 — edited Dec 5 2012Hi, looking for some help in writing a query. i currently have 2 columns, 1 shows a fault number and another a telephone, what i would like to do is select both these fields and if the fault number has the character 'NA' in any rows than I would like this to be replaced by the value in the telephone number.
As i understand there are 3 ways, replace, translate and regexp but not sure going foward which would be the best way and also I currently have selected data from 2 tables and have a union all to put the data together, but not sure how i can replace the NA value.
To summarise this is what i currently have
SELECT
FROM
INNER JOIN
UNION ALL
SELECT
FROM
INNER JOIN
If somebody could please help, would really appreciate it.