<html><div style='background-color:'><DIV>
<P>TRY</P>
<P>select a, b from THE_TABLE where a<>b ;</P>
<P>a and b are the column A and culumn B respectively.</P>
<P><BR><BR> </P></DIV>
<DIV></DIV>>From: "Matthew John Darnell" <MDARNELL@SERVPAC.COM>
<DIV></DIV>>Reply-To: luau@videl.ics.hawaii.edu
<DIV></DIV>>To: <LUAU@VIDEL.ICS.HAWAII.EDU>
<DIV></DIV>>Subject: [luau] SQL Statement help
<DIV></DIV>>Date: Sat, 16 Aug 2003 21:59:32 -1000
<DIV></DIV>>
<DIV></DIV>>Aloha,
<DIV></DIV>>
<DIV></DIV>>I have a mysql database and I need to know when a row has different values
<DIV></DIV>>in two fields. The values are either 0 or 1.
<DIV></DIV>>
<DIV></DIV>>i.e.
<DIV></DIV>>Column A Column B
<DIV></DIV>>1 1
<DIV></DIV>>0 1
<DIV></DIV>>1 0
<DIV></DIV>>0 0
<DIV></DIV>>
<DIV></DIV>>I would like to know about record 2 and 3. After that I will find out where
<DIV></DIV>>the value "1" is.
<DIV></DIV>>
<DIV></DIV>>Anyone know a SQL statement for something like that?
<DIV></DIV>>
<DIV></DIV>>I have tried to get all the values in two different hashes but I can't
<DIV></DIV>>compare them. Even if I could (I'm sure you can) it would be nice to do it
<DIV></DIV>>in one step.
<DIV></DIV>>
<DIV></DIV>>-Matt
<DIV></DIV>>
<DIV></DIV>>_______________________________________________
<DIV></DIV>>LUAU mailing list
<DIV></DIV>>LUAU@videl.ics.hawaii.edu
<DIV></DIV>>http://videl.ics.hawaii.edu/mailman/listinfo/luau
<DIV></DIV></div><br clear=all><hr>STOP MORE SPAM with <a href="http://g.msn.com/8HMDENUS/2728??PS=">the new MSN 8</a> and get 2 months FREE*</html>