Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Suppression code FOXPR0 2.6 DOS Expand / Collapse
Author
Message
Posted Monday, February 18, 2013 7:04 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, February 19, 2013 3:50 AM
Points: 4, Visits: 12
Hello,

We need to write a few lines of sql that will compare one file (as dbf) to another. Then output the records that are the not the same. This would be the suppression file. Example. I have 10,000 records in a master file.
I selected all the records that of customers that lived in Atlanta and Austin say 150 records. I want to be able to suppress those names from the master and create an output file of not equal to the atlanta austin file.

This is my effort. not working. Any help would be greatly appreciated.
Thanks,
gbhiner



&&&& A prg to supress two files based on Z5, LN , AD - FEB 2013 GH
&&&& "FEBSUP.PRG" all standard files
SELECT * ;
FROM LARGE, small ;
WHERE LARGE.Z5 <> small.z5 and Large.ln <> small.ln and Large.cy <> small.cy and large.st <> small.st ;
ORDER BY LARGE.Z5 ;
INTO TABLE SUPP.DBF
Post #1421201
Posted Monday, February 18, 2013 7:08 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 2:20 AM
Points: 5,231, Visits: 5,106
Duplicate post, replies here please http://www.sqlservercentral.com/Forums/Topic1421182-2799-1.aspx



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1421204
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse