How can I create a new table based on merging 2 tables without joining
certain values?
I asked a question earlier, but I wasn't really able to explain myself
clearly.
I made a graphic to hopefully help explain what I'm trying to do.
I have two separate tables inside the same database. One table called
'Consumers' with about 200 fields including one called 'METER_NUMBERS*'.
And then one other table called 'Customer_Info' with about 30 fields
including one called 'Meter'. These two meter fields are what the join or
whatever method would be based on. The problem is that not all the meter
numbers in the two tables match and some are NULL values and some are a
value of 0 in both tables.
I want to join the information for the records that have matching meter
numbers between the two tables, but also keep the NULL and 0 values as
their own records. There are NULL and 0 values in both tables but I don't
want them to join together.
There are also a few duplicate field names, like Location shown in the
graphic. If it's easier to fix these duplicate field names manually I can
do that, but it'd be cool to be able to do it programmatically.
The key is that I need the result in a NEW table!
This process will be a one time thing, not something I would do often.
Hopefully, I explained this clearly and if anyone can help me out that'd
be awesome!
If any more information is needed, please let me know.
Thanks.
No comments:
Post a Comment