Hi all,
I have a table with 9 fields that store email addresses: email1,email2,email3, etc. I need to add one new email address to several records. Since each record may have a different number of fields already filled, I need to put the new address in the next available field.
This is the query that returns the record set I'm working with.
I think I need to use a CASE statement, then check each email field and only update with the new address if it's null. I'm just having trouble figuring out where to put it in the query.
Maybe there's a better way?
Thanks,
Justin
I have a table with 9 fields that store email addresses: email1,email2,email3, etc. I need to add one new email address to several records. Since each record may have a different number of fields already filled, I need to put the new address in the next available field.
This is the query that returns the record set I'm working with.
Code:
SELECT *
FROM delivery_options
WHERE (setup_id IN
(SELECT setup_id
FROM setup_main
WHERE client_id = 231))
Maybe there's a better way?
Thanks,
Justin