SQL self join

Good evening,

SQL self join seems to be a way to join a table to itself.

In MS Access, I have written queries where I dragged two instances of the same table into the query editor and did an inner join.

Can this be done in XOJO, and if so, is the self join command the right way to do it?

(Right now, I am duplicating the same table twice to force an inner join, and that seems terribly inefficient).

Thanks. Hoping everyone is having a productive night.

John

How about something like:

...FROM table1 as A, table1 as B WHERE A.field1 = B.field2... 

Yeah, that looks familiar to the website where I was reading about it. So I guess it should work… if I get the syntax correct. Thanks.