I am executing this query in java to a database in SQL, if I do the query in the following way, it runs without problems:
String consulta= "SELECT * FROM Produccion.Transferido WHERE WO =
'"+jTextIngresoWO.getText()+"'";
But I need the query to be in the following way, and it does not work anymore:
String consulta= "SELECT * FROM Produccion.Transferido WHERE WO =
'"+jTextIngresoWO.getText()+"' AND PendienteEnviar = (SELECT
MIN(PendienteEnviar))";
I'm not sure I have any errors in the syntax, but for some reason the query is no longer executed and sends me to the catch.