MySQL Forums
Forum List  »  Spanish

Re: Contar cero cuando no exista registro indicado
Posted by: Monttanna Monttanna
Date: July 05, 2014 12:04AM

Hola jesus trate de poner el left joint en lugar del in pero el workbench me lanza un error de escritura puedes darm algun ejemplo funcional esto fue lo ke yo intente.

SELECT Col1, sum(Col2) FROM TablaA WHERE Col1 LEFT JOIN ('A','B','C') GROUP BY Col1;

Y me lanza un error:

Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN ('A','B','C') GROUP BY Name' at line 2

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Contar cero cuando no exista registro indicado
1251
July 05, 2014 12:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.