SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Suppression code FOXPR0 2.6 DOS


SQL Suppression code FOXPR0 2.6 DOS

Author
Message
gh449
gh449
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
anthony.green
anthony.green
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23866 Visits: 6519
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
When a question, really isn't a question - Jeff Smith
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


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search