<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Intrebari generale</title><link>http://sqlserver.ro/forums/16/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: cautare in mai multe tabele</title><link>http://sqlserver.ro/forums/thread/7069.aspx</link><pubDate>Tue, 21 Apr 2009 10:45:46 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:7069</guid><dc:creator>rsocol</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/7069.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=7069</wfw:commentRss><description>Poţi să faci ceva de genul:&lt;br /&gt;&lt;br /&gt;SELECT 'Calculator' as Tip, Denumire, Locatie, IP&lt;br /&gt;FROM Calculatoare&lt;br /&gt;WHERE Denumire=@Valoare OR IP=@Valoare&lt;br /&gt;&lt;br /&gt;UNION ALL&lt;br /&gt;&lt;br /&gt;SELECT 'Imprimanta' as Tip, Denumire, Locatie, IP&lt;br /&gt;FROM Imprimante&lt;br /&gt;WHERE Denumire=@Valoare OR IP=@Valoare OR Model=@Valoare&lt;br /&gt;&lt;br /&gt;... şi aşa mai departe. Ideea este să returnezi acelaşi set de coloane din toate tabelele (chiar dacă poţi să cauţi pe coloane diferite).&lt;br /&gt;&lt;br /&gt;Răzvan</description></item><item><title>Re: cautare in mai multe tabele</title><link>http://sqlserver.ro/forums/thread/7068.aspx</link><pubDate>Tue, 21 Apr 2009 09:04:06 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:7068</guid><dc:creator>Diana</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/7068.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=7068</wfw:commentRss><description>&lt;P&gt;Specifica pe formul de C#&amp;nbsp;tipul cautarii (host, IP, etc...)&amp;nbsp;- de exemplu cu un "radio button". Apoi foloseste un query dinamic si un sp_executesql. Te poti inspira din &lt;A href="http://www.sommarskog.se/dynamic_sql.html"&gt;http://www.sommarskog.se/dynamic_sql.html&lt;/A&gt;&amp;nbsp;-&amp;nbsp;vezi de exemplu sectiunea "Dealing with Dynamic Table and Column Names".&lt;/P&gt;
&lt;P&gt;Nu uita sa verifici datele introduse prin formul tau (validatori .NET, regexp......).&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description></item><item><title>cautare in mai multe tabele</title><link>http://sqlserver.ro/forums/thread/7067.aspx</link><pubDate>Tue, 21 Apr 2009 08:05:18 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:7067</guid><dc:creator>kios</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/7067.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=7067</wfw:commentRss><description>Salut,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AM o bd cu mai multe tabele (ex: pc - host, ip, user... printer: host, ip, model...switch: host, ip...) si vreau sa fac o cautare de genul: dintr-un singur form (c#) se introduce host sau ip sau serial number si sa returneze in functie de ce gaseste informatiile. deci daca gaseste host in table pc returneaza de acolo, daca gaseste in table printer returneaza de acolo. Cum sa conditionez interogarea dupa host/ip/sn in functie de unde gaseste rezultatul?&lt;br&gt;</description></item></channel></rss>