Hello People¡
I'm a true greenhorn on SQL, so hope to get some help from you.
I have two different tables, one of them is DATOS and the other one is TICKET:
DATOS
TICKET
I want to make a query to get CREATED, ROWREF, AHT and SDATA from those two tables, but this is what happens:
If I run "SELECT ID, CREATED, ROWREF, AHT, SDATA FROM DATOS, TICKET": The result is a cartesian product, lots and lots of results (about 750k) and a bunch of them are duplicated
I saw on the internet, that this cartesian result can be fixed by using "JOIN", but I was not really sure which JOIN should
I use and where, so
I ran: "SELECT ID, CREATED, ROWREF, AHT, SDATA FROM DATOS NATURAL JOIN TICKET" : In this case, i got
less results, just about 688, but there still many duplicated values
Can you please help let me know whats the right way to query this?
Basically the only link that those two tables have, is ID and ROWREF, but I havent realized how to fix it yet =(