G
goli
Hi,
I posted a message about a problem in UNION query.
http://groups-beta.google.com/group...8?q=sql+union+in+java&rnum=1#310c36512df95818
I have some more information:
The issue is as follows:
Suppose I have query A (using INNER JOIN) - number of rows in result =
10
Suppose I have query B (using INNER JOIN) - number of rows in result =
7
Query C is UNION of A and B, and I expect 17 rows in the result.
But I get only *7* !!!
If I change DB so query A will have 9 rows, the UNION will give me also
9 results.
Is it an ODBC or JDBC problem ?
Is it the ResultSet class problem ?
Maybe I get the results wrong. I use "while resultSet.next() { .. }
Here are results in excel table:
A B C A - one less C - one less
174285826 174262785 174262785 174285834 174262785
174285834 174262801 174262801 174285835 174262801
174285835 174262817 174262817 174285836 174262817
174285836 174262833 174262833 174285837 174262833
174285837 174263935 174263935 174285838 174263935
174285838 174264578 174264578 174285839 174264578
174285839 174265346 174265346 174285840 174265346
174285840 174285847 174285826 174285841 174285834
174285841 174286035 174285834 174285843 174285835
174285843 174285835 174285844 174285836
174285844 174285836 174285845 174285837
174285845 174285837
Thanks for any help.
I posted a message about a problem in UNION query.
http://groups-beta.google.com/group...8?q=sql+union+in+java&rnum=1#310c36512df95818
I have some more information:
The issue is as follows:
Suppose I have query A (using INNER JOIN) - number of rows in result =
10
Suppose I have query B (using INNER JOIN) - number of rows in result =
7
Query C is UNION of A and B, and I expect 17 rows in the result.
But I get only *7* !!!
If I change DB so query A will have 9 rows, the UNION will give me also
9 results.
Is it an ODBC or JDBC problem ?
Is it the ResultSet class problem ?
Maybe I get the results wrong. I use "while resultSet.next() { .. }
Here are results in excel table:
A B C A - one less C - one less
174285826 174262785 174262785 174285834 174262785
174285834 174262801 174262801 174285835 174262801
174285835 174262817 174262817 174285836 174262817
174285836 174262833 174262833 174285837 174262833
174285837 174263935 174263935 174285838 174263935
174285838 174264578 174264578 174285839 174264578
174285839 174265346 174265346 174285840 174265346
174285840 174285847 174285826 174285841 174285834
174285841 174286035 174285834 174285843 174285835
174285843 174285835 174285844 174285836
174285844 174285836 174285845 174285837
174285845 174285837
Thanks for any help.