Funciono Perfecto....<br><br>Muchas gracias Fernando<br><br><div><span class="gmail_quote">El día 10/01/08, <b class="gmail_sendername">Fernando - Consciência</b> <<a href="mailto:fernandocns@consciencia.com.br">fernandocns@consciencia.com.br
</a>> escribió:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">tienta esso:</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">SELECT * FROM `establecimientos` WHERE
`diaconcepto` LIKE concat_ws("","%",(SELECT `valor` FROM `structd` WHERE
`nomcat`= 'Centro Comercial' limit 1),"%")</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">limit 1 esso somiente para garantir no erros na
query.</div><div><span class="e" id="q_11765020de0858e6_1">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b>
<a title="cristian.mejia@gmail.com" href="mailto:cristian.mejia@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Cristian Alberto Mejia Medina</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="usuarios@mysql-hispano.org" href="mailto:usuarios@mysql-hispano.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
usuarios@mysql-hispano.org</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Thursday, January 10, 2008 2:51
PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> [MySQL Hispano] Una
consulta</div>
<div><br></div>Tengo dos tablas 'establecimientos' con la columna
'diaconcepto' que contiene "ABCDE" y 'structd' que contiene nomcat='Centro
Comercial' y valor=C, Necesito un query que me obtenga todos los registros de
'establecimientos' donde aparezca el valor de 'valor' de 'structd' donde
'nomcat' = 'Centro Comercial'... no se si me explique bien... <br><br>esta
consulta me funciona en todos los registros donde 'diaconcepto' tiene = "C",
pero no aquellos donde hay "AC", o "CB",,, quise poner % al inicio y
final del segundo select pero no es valido,,,, <br>Alguna
idea?????<br><br>SELECT * FROM `establecimientos` WHERE `diaconcepto` LIKE
(SELECT `valor` FROM `structd` WHERE `nomcat`= 'Centro Comercial')<br clear="all"><br>-- <br>TPI. Cristian Alberto Mejia Medina <br><br>Have a nice
day :o)
</span></div><p>
</p><hr>
<p></p>_______________________________________________<br>Usuarios mailing
list<br><a href="mailto:Usuarios@mysql-hispano.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Usuarios@mysql-hispano.org</a><br><a href="http://lists.mysql-hispano.org/mailman/listinfo/usuarios" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://lists.mysql-hispano.org/mailman/listinfo/usuarios</a><br><p></p></blockquote><br>
<div><font face="Arial" size="2"></font> </div></div>
<br>_______________________________________________<br>Usuarios mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Usuarios@mysql-hispano.org">Usuarios@mysql-hispano.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.mysql-hispano.org/mailman/listinfo/usuarios" target="_blank">
http://lists.mysql-hispano.org/mailman/listinfo/usuarios</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>TPI. Cristian Alberto Mejia Medina<br><br>Have a nice day :o)