Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Thu, 12 Jun 2008 @ 10:34:38 GMT





     
  <Prev Next>   <<First <Prev Next> Last>>  




Subj:   Re: Partial field comparison
 
From:   Michael Larkins



Hi Craig:

You really have some ugly data in that Table_b. 3.5 million rows you say? That is worse than ugly, more like ugly's ugly brother.

As long as you go through and get rid of all the "-" (WITH RECURSIVE might be a good approach for this), you could do the following, but it will not be fast with the volume of your ugly data:

     WHERE POSITION(table_a.animal IN table_b.comment) > 0
     AND POSITION(table_a.color IN table_b.comment) > 0
     AND table_b.PetStoreID <> table_a.PetStoreID

Hope this helps,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor





     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 16 Nov 2008