Andy Lacey
andy at minstersystems.co.uk
Mon Jan 17 03:49:10 CST 2005
Watch out for Nulls. If your data may have Null in fields then try: SELECT FieldA, FieldB FROM Table1 WHERE Nz(FieldA) <> Nz(FieldB) -- Andy Lacey http://www.minstersystems.co.uk --------- Original Message -------- From: Access Developers discussion and problem solving <accessd at databaseadvisors.com> To: Access Developers discussion and problem solving <accessd at databaseadvisors.com> Subject: Re: [AccessD] compare two fields Date: 17/01/05 10:31 > > This should give you what you want. > SELECT Table1.FieldA, Table1.FieldB > FROM Table1 > WHERE (((Table1.FieldA)<>[Table1.FieldB])) > Paul Hartland > > > > > > > Message date : Jan 17 2005, 10:24 AM > >From : pedro at plex.nl > To : AccessD at databaseadvisors.com > Copy to : > Subject : [AccessD] compare two fields > Hello group, > > is there a way to compare the values of two fields in one record > Al the records where the values of the two fields don't match (in one record) must be given in the result. > > I have done this before, but i can't find the sql. > > Thanks > > - Pedro Janssen - > > Example: > > Table1 > > fieldA fieldB > > 012345 012345 > 456789 456789 > 234567 034567 > > result > 234567 034567 > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > > Whatever you Wanadoo: > http://www.wanadoo.co.uk/time/ > > This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > > > > ________________________________________________ Message sent using UebiMiau 2.7.2