Original Post
Well, I never used SQL deeply, but I never thought that one day I would have a problem like this. I have a database with many tables. Two of them are as follows: #1: Session_ID Item Time ... where Session_ID is a number and Item is a string (I don't need Time). #2 FromFile Link where FromFile is a number and Link a string. #1 rows are a list of used links, and #2 rows are the complete list of available links and the files they belongs. I need to know the FromFile property for each row in #1, so I did the following queries: select FromFile,Link from #2,#1 where #2.Link = #1.Item select FromFile,Link from #2 where Link = any (select Item from #1 where 1) I tried even more queries but the results are always wrong (I think) because I espect to get 1532 rows in the result (same than #1) but I get always repetitions (T get > 20000 rows), and I don't know why.