<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — SQL Execute from Multiple Where's]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=4262</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=4262&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in SQL Execute from Multiple Where's.]]></description>
		<lastBuildDate>Wed, 09 May 2018 22:44:09 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: SQL Execute from Multiple Where's]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=25070#p25070</link>
			<description><![CDATA[<p>okay here&#039;s what i have atm:</p><p>frm_assistencia.ComboBox_cl_idcliente.dbItemID := SqlExecute(&#039;SELECT IFNULL(id, -1)id FROM cliente WHERE ((nome like &quot;%&#039;+nome+&#039;%&quot;) and (contacto2 like &quot;%&#039;+contacto2+&#039;%&quot;) and (contacto1 like &quot;%&#039;+contacto1+&#039;%&quot;))&#039;);</p><p>in this situation, i have several edit boxes that i can type whatever i want in them, and the sql will indeed search for each and every possibility trying to figure out it&#039;s nº1 best guess.<br />But if i have a (null) entry on sql , for instance, if only one contact is avaiable, with this syntax i am not able to get the search to work.</p><p>the only other way to do this is to create multiple sql execute commands, one for each edit box. something i&#039;m trying to avoid to keep this database simple and effective</p>]]></description>
			<author><![CDATA[null@example.com (VascoMorais)]]></author>
			<pubDate>Wed, 09 May 2018 22:44:09 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=25070#p25070</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Execute from Multiple Where's]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=25068#p25068</link>
			<description><![CDATA[<p>I would try:</p><p>To select something with contacto1 AND nome:<br />&#039;SELECT id FROM cliente WHERE contacto1 LIKE &quot;%&#039;+contacto1+&#039;%&quot; and nome LIKE &quot;%&#039;+nome+&#039;%&quot;&#039;;</p><p>To select something with contacto1 OR nome:<br />&#039;SELECT id FROM cliente WHERE contacto1 LIKE &quot;%&#039;+contacto1+&#039;%&quot; or nome LIKE &quot;%&#039;+nome+&#039;%&quot;&#039;;</p><br /><br /><br /><p>Basically you &#039;select&#039; &#039;something&#039; &#039;from&#039; &#039;somewhere&#039; &#039;where&#039; &#039;constraint is&#039; &#039;something&#039; &#039;or/and&#039; &#039;something else&#039;. No need to repeat WHERE in same select.</p>]]></description>
			<author><![CDATA[null@example.com (tcoton)]]></author>
			<pubDate>Wed, 09 May 2018 16:48:16 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=25068#p25068</guid>
		</item>
		<item>
			<title><![CDATA[SQL Execute from Multiple Where's]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=25064#p25064</link>
			<description><![CDATA[<p>hello, i&#039;m trying to figure out a way to search from mutiple &quot;where&#039;s&quot;</p><p>here&#039;s my syntax, doesn&#039;t seem to work:</p><p>(&#039;SELECT id FROM cliente WHERE contacto1 LIKE &quot;%&#039;+contacto1+&#039;%&quot; and WHERE nome LIKE &quot;%&#039;+nome+&#039;%&quot;&#039;)</p><p>Contacto1 and nome are vars of course</p><p>Many thanks in advance <img src="https://myvisualdatabase.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (VascoMorais)]]></author>
			<pubDate>Wed, 09 May 2018 12:08:57 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=25064#p25064</guid>
		</item>
	</channel>
</rss>
