Ver Mensaje Individual
  #5 (permalink)  
Antiguo 20/03/2016, 16:38
maurousa33
 
Fecha de Ingreso: diciembre-2013
Mensajes: 7
Antigüedad: 10 años, 4 meses
Puntos: 0
Respuesta: consulta que me dice quienes no han pagado

Cita:
Iniciado por Libras Ver Mensaje
creo que te faltan parentesis para esa consulta:

Código MySQL:
Ver original
  1. select *  from clientes  
  2. where t1.idcliente
  3. not in( SELECT t2.idcliente FROM clientes as t1 left join pagos as t2 on (t1.idcliente=t2.idcliente)
  4. WHERE mes=%s AND year=%s )

prueba con eso, y trata de poner el error tal cual te aparece, porque sin el error no se te puede ayudar demasiado......

amigo lo solucione de la siguiente forma era un error de ambigüedad
muchas gracias me ayudaste mucho
Código MySQL:
Ver original
  1. select *  from clientes  
  2. where idcliente not in( SELECT t1.idcliente FROM clientes as t1 left join pagos as t2 on (t1.idcliente=t2.idcliente) WHERE year=%s and mes=%s)