Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 compare two fields

Author  Topic 

gurgel
Starting Member

1 Post

Posted - 2009-01-19 : 11:28:51
Hello

In my Access Database:

ID Typ Age-Count Value
1 10 1 54
2 12 1 43
3 10 2 56
4 10 3 42
5 12 3 58
...

Now I'd like to sort my Database by Type.
Then I'd like to check if there are any entries missing --> if there is a gap in the Age-Count.
I'd like to subtrahate one entrie (Age-Count) from Type 10 from the next one from Age-Count from Type 10.

Question:
How can I compare two fields in the same tabelle?

milena
Starting Member

16 Posts

Posted - 2009-01-26 : 17:36:02
try if syntax like:
select columnA,columnB from table
where table.ColumnA<>table.ColumnB

where Column A and column B are the column you want to compare
Go to Top of Page
   

- Advertisement -