|
|
Archives of the TeradataForum
Message Posted: Wed, 11 Jun 2008 @ 23:11:32 GMT
Subj: | | Re: Partial field comparison |
|
From: | | msandma1 |
Craig: I would suggest cleaning up table B first to avoid having to work initially with the bigger table. Create a new table Bprime which would
be Comment, PetStoreID, and the new columns Animal and Color. Use Comment, PetStoreID as the prime index. Write an insert-select statement to
create Bprime from B. Its main task would be to extract the animal name and the color name from the comment. It would do whatever transformations
are useful like deleting '-' so 'br-own' becomes 'brown'. When you get this cleaned up, then change the target Bprime table so that animal, color,
and PetStoreId is the composite primary index. Once that table is built, you can join it to the big table.
I don't understand the table_b.PetStoreID <> table_a.PetStoreID constraint in your example.
| |