• Your database is not normalized properly. If you can, you'd be better off fixing that rather than trying to code around it.

    It always helps to provide sample data in the form of DDL to create the tables and DML to insert the values into those table as outlined in the first link in my signature. You should also provide expected results based on the sample data. (It does no good if the expected results don't match the sample data.)

    You also don't mention what happens if Column3 is not null. Does it get overwritten?

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA