I have a table where one of the column, let’s call it source_id, has type bit(64).
I would like to get this value and use it into a subsequent query:
ResultSet rs = statement.executeQuery("....");
rs.next();
ResultSet rs2 = statement.executeQuery(".... where source_id = " + rs.getBinaryStream("source_id"));
This code does not work, the problem seems to be the wrong type in rs.getBinaryStream, but i could also be wrong.
What can i do? Which is the right data type to use?
I think,
rs.getString()should works as below since you are forming aStringquery statement to execute.