Hello all,
I'm attempting to use the current value of a resultSet as a parameter in a separate query, and can't figure out how to do it! What I'm doing is obviously wrong - so I'd appreciate being set in the right direction...
-vj
Here's what I'm attempting (shortened and edited for readability, so there may be syntax things that don't work):
while(myResultSet.next()) {
myResultSet.getObject("name"
.toString();
if { something that works fine, no need to look further }
else {
currValue = myResultSet.getObject("mnemonic"
.toString();
myResultSet2 = sqlStatement2.executeQuery;
("SELECT name, description " +
"FROM types INNER JOIN codes" +
"ON types.code = codes.code " +
"WHERE mnemonic='" +
currValue + "'";
}
}
etcetera.
I get asssorted compile errors including not an expression statement, illegal start of expression, malformed expression, and variable executeQuery not found in interface
I'm attempting to use the current value of a resultSet as a parameter in a separate query, and can't figure out how to do it! What I'm doing is obviously wrong - so I'd appreciate being set in the right direction...
-vj
Here's what I'm attempting (shortened and edited for readability, so there may be syntax things that don't work):
while(myResultSet.next()) {
myResultSet.getObject("name"
if { something that works fine, no need to look further }
else {
currValue = myResultSet.getObject("mnemonic"
myResultSet2 = sqlStatement2.executeQuery;
("SELECT name, description " +
"FROM types INNER JOIN codes" +
"ON types.code = codes.code " +
"WHERE mnemonic='" +
currValue + "'";
}
}
etcetera.
I get asssorted compile errors including not an expression statement, illegal start of expression, malformed expression, and variable executeQuery not found in interface