Hi all,I have the following SQL script that works fine, but I like to view all the fields for the records that are not exists in “capdb.dbo.abc “ for “capdb2.dbo.abc” table instead of some fields :select distinct cp2abc.subj_num , cp2abc.abc_age, cp2abc.ABC_LETHARGY, cp2abc.ABC_STEREOTYPY, cp2abc.ABC_STEREOTYPY, cp2abc.ABC_HYPERACTIVITY, cp2abc.ABC_INAPPROPRIATE_SPEECHfrom capdb2.dbo.abc as cp2abc, capdb.dbo.abc as cp1abcwhere not exists (select cp1abc.subj_num, cp1abc.abc_date from capdb.dbo.abc as cp1abc where cp2abc.subj_num = cp1abc.subj_num and cp2abc.abc_DATE = cp1abc.abc_date)
I tried cp2abc.*, but the returns entire the records in the tables.select cp2abc.*from capdb2.dbo.abc as cp2abc, capdb.dbo.abc as cp1abcwhere not exists (select cp1abc.subj_num from capdb.dbo.abc as cp1abc where cp2abc.subj_num = cp1abc.subj_num and cp2abc.abc_DATE = cp1abc.abc_date)
Is there a way to accomplish this
Thanks for any help.Regards,Abrahim(moved from Script Library by Jeff)