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> &lt;<a href="mailto:fernandocns@consciencia.com.br">fernandocns@consciencia.com.br
</a>&gt; 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;">&nbsp;</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(&quot;&quot;,&quot;%&quot;,(SELECT `valor` FROM `structd` WHERE 
  `nomcat`= &#39;Centro Comercial&#39; limit 1),&quot;%&quot;)</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;">&nbsp;</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;">&nbsp;</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;">&nbsp;</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 &#39;establecimientos&#39; con la columna 
  &#39;diaconcepto&#39; que contiene &quot;ABCDE&quot; y &#39;structd&#39; que contiene nomcat=&#39;Centro 
  Comercial&#39; y valor=C, Necesito un query que me obtenga todos los registros de 
  &#39;establecimientos&#39; donde aparezca el valor de &#39;valor&#39; de &#39;structd&#39; donde 
  &#39;nomcat&#39; = &#39;Centro Comercial&#39;... no se si me explique bien... <br><br>esta 
  consulta me funciona en todos los registros donde &#39;diaconcepto&#39; tiene = &quot;C&quot;, 
  pero no aquellos donde hay &quot;AC&quot;, o &quot;CB&quot;,,,&nbsp; 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`= &#39;Centro Comercial&#39;)<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>&nbsp;</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)