<?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: Sintaxa sql mai ciudata...</title><link>http://sqlserver.ro/forums/thread/1813.aspx</link><pubDate>Thu, 15 Feb 2007 05:46:28 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1813</guid><dc:creator>rsocol</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1813.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1813</wfw:commentRss><description>&lt;p&gt;Dacă există în tabelă numere din ziua de mâine, iar în ziua de azi există numere nefolosite, ce vrei să obţii ?&lt;/p&gt;&lt;p&gt;Dacă există în tabelă numere din ziua de mâine, iar în ziua de azi NU există numere nefolosite (dar există numere nefolosite ieri şi mâine), ce vrei să obţii ?&lt;/p&gt;&lt;p&gt;Răzvan&lt;br&gt;&lt;/p&gt;</description></item><item><title>Re: Sintaxa sql mai ciudata...</title><link>http://sqlserver.ro/forums/thread/1812.aspx</link><pubDate>Wed, 14 Feb 2007 20:57:47 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1812</guid><dc:creator>ThePuiu</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1812.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1812</wfw:commentRss><description>mda...de fapt, nu ma descurc.... sa revin: eu vreau sa obtin cel mai mic numar nefolosit din ziua curenta (care ar trebui sa fie ultima zi din tabela, dar nu neaparat, dimineata nu exista in tabela decit ziua de ieri sau alaltaieri&amp;nbsp;si atunci trebuie sa returneze urmatorul numar - adica se renunta la numerele nefolosite din ziua precedenta). Daca nu exista numar nefolosit intre inregistrazile cu data de astazi sa returneze urmatorul numar.</description></item><item><title>Re: Sintaxa sql mai ciudata...</title><link>http://sqlserver.ro/forums/thread/1811.aspx</link><pubDate>Wed, 14 Feb 2007 19:03:36 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1811</guid><dc:creator>ThePuiu</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1811.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1811</wfw:commentRss><description>pe mine ma intereseaza varianta b, dar cu ce mi-ai spus cred ca ma descurc singur! daca nu, mai revin cu intrebari! Multumesc tare mult!</description></item><item><title>Re: Sintaxa sql mai ciudata...</title><link>http://sqlserver.ro/forums/thread/1809.aspx</link><pubDate>Wed, 14 Feb 2007 17:00:26 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1809</guid><dc:creator>rsocol</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1809.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1809</wfw:commentRss><description>&lt;p&gt;Nu e clar dacă vrei să găseşti:&lt;br&gt;a) primul număr care lipseşte&lt;br&gt;b) primul număr care lipseşte din ultima zi care există&lt;br&gt;c) o listă cu numerele care lipsesc&lt;br&gt;d) o listă cu intervale de numere care lipsesc&lt;/p&gt;&lt;p&gt;Presupunând că e vorba de a), încearcă:&lt;/p&gt;&lt;p&gt;SELECT MIN(Numar)+1 FROM Tabela WHERE Numar+1 NOT IN (SELECT Numar FROM Tabela)&lt;/p&gt;&lt;p&gt;Dacă nu e ceea ce ai nevoie, te rog scrie mai multe exemple.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Răzvan&lt;/p&gt;</description></item><item><title>Sintaxa sql mai ciudata...</title><link>http://sqlserver.ro/forums/thread/1806.aspx</link><pubDate>Wed, 14 Feb 2007 16:08:37 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1806</guid><dc:creator>ThePuiu</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1806.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1806</wfw:commentRss><description>&lt;P&gt;Pt inceput, fiind primul meu post, vreau sa va salut pe toti! Acum, care este intrebarea mea: am o tabela in MSDE care contine 2 campuri NUMAR si DATA (formatele sint numeric si date). Presupunem ca tabela contine datele urmatoare:&lt;/P&gt;
&lt;P&gt;NUMAR&amp;nbsp;&amp;nbsp; DATA&lt;BR&gt;125&amp;nbsp;&amp;nbsp;&amp;nbsp;01/02/2007&lt;BR&gt;126&amp;nbsp;&amp;nbsp; 02/02/2007&lt;BR&gt;127&amp;nbsp;&amp;nbsp; 02/02/2007&lt;BR&gt;129&amp;nbsp;&amp;nbsp; 02/02/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Cum pot face o interogare care sa-mi returneze numarul 128 in cazul din exemplu sau 130 daca in data de 02/02/2007 nu exista nici un numar nealocat?&lt;/P&gt;
&lt;P&gt;Multumesc anticipat!&lt;/P&gt;</description></item></channel></rss>