List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:May 3 2006 9:44pm
Subject:Re: Missing information Search
View as plain text  
Robert

 >What I need to be able to do is find any values of K_Code in table 1 
that don't
 >appear in table 2.

SELECT t1.k_code
FROM table1 t1
LEFT JOIN table2 t2 USING (k_code)
WHERE t2.k_code IS NULL;

PB

-----

Robert Gehrig wrote:
> Hi
>
> I have two tables that are structured like so:
>
> Table 1:
> ID		int
> K_Code	int
>
> Table 2
> K_Code	int
> K_Desc		char
>
> Table 2 has been corrupted and may be missing some records.
>
> What I need to be able to do is find any values of K_Code in table 1 that don't
> appear in table 2.
>
> Thanks
>
> Robert Gehrig
> Webmaster at www.gdbarri.com
>
> e-mail: robert.gehrig@stripped
>
>
>
>
>   


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.2/329 - Release Date: 5/2/2006

Thread
Missing information SearchRobert Gehrig3 May
  • Re: Missing information SearchPeter Brawley3 May