multiple query in JAVA - SQL

0

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.

    
asked by Alvaro 15.11.2018 в 16:39
source

0 answers