Basic MySQL. XOR?

Dwight E Chadbourne dwighte.chadbourne at stopandshop.com
Mon Oct 30 09:53:33 EST 2006


I was at work stuck using Access and it's GUI and just couldn't my query 
to work right.  There's an automatic join when you add tables and I didn't 
feel like using that app anyway.  I'm on a box with lots of software I 
don't like and I'm not root.  So I thought I'd ask the BLU list prior to 
running to my house and doing this on my home computer.  I kind of did 
what Seth said with success.

SELECT csv1.*, csv2.varA FROM csv1, csv2
WHERE csv1.varA = csv2.varA
AND csv1.varB = csv2.varB
AND csv1.varC = csv2.varC
INTO blah blah blah

Stuck the info into a table,

LOAD DATA LOCAL INFILE 'C:\\MyWorks...equalTextRows.csv'
INTO TABLE notsettheory.scratchpad

So now that I had where the two intersect in table scratchpad I just did 
this to both tables,

DELETE csv1.* FROM csv1, scratchpad
WHERE scratchpad.varA = csv1.varA
AND scratchpad.varB = csv1.varB

It's pretty simple but it worked.  I now know exactly where these two 
people disagree.

What is this beast?

% diff --old-line-format=%L --new-line-format=%L
--unchanged-line-format="" data1.csv data2.csv > diff.csv

Oh my, hieroglyphics!  I shall read more about diff/grep.  I'm sure it 
will come in handy.

Thanks for your help.

- Eric.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the Discuss mailing list