<?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: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2396.aspx</link><pubDate>Mon, 06 Aug 2007 06:53:00 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2396</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2396.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2396</wfw:commentRss><description>&lt;P&gt;Cu placere,&lt;/P&gt;
&lt;P&gt;dar incearca si varianta lui Razvan, mie unul mi se pare mult mai "curata"&lt;/P&gt;
&lt;P&gt;alex.&lt;/P&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2395.aspx</link><pubDate>Mon, 06 Aug 2007 05:37:55 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2395</guid><dc:creator>hyghnet</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2395.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2395</wfw:commentRss><description>Multumesc pentru ajutor ALEX. Functioneaza.</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2394.aspx</link><pubDate>Mon, 06 Aug 2007 05:35:48 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2394</guid><dc:creator>hyghnet</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2394.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2394</wfw:commentRss><description>&lt;P&gt;Multumesc pentru ajutor ALEX.&lt;/P&gt;
&lt;P&gt;Functioneaza asa.&lt;/P&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2389.aspx</link><pubDate>Fri, 03 Aug 2007 14:35:24 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2389</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2389.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2389</wfw:commentRss><description>&lt;P&gt;sau asa....dar tot intortochiat e.....mai sa-mi rup mainile si nu alta :)))&lt;/P&gt;
&lt;P&gt;CREATE TABLE #temp (numar varchar(50), data_inreg datetime)&lt;/P&gt;
&lt;P&gt;insert into #temp (numar, data_inreg)&lt;BR&gt;&amp;nbsp; SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nr_inreg Nr, MAX(data_inreg) AS Data&lt;BR&gt;&amp;nbsp; FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbo.Table2&lt;BR&gt;&amp;nbsp; GROUP BY nr_inreg&lt;BR&gt;&amp;nbsp; HAVING&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (MAX(data_inreg) &amp;lt; CONVERT(DATETIME, '2007-07-26 00:00:00', 102))&lt;/P&gt;
&lt;P&gt;select tbl.* from dbo.Table2 tbl join #temp t on tbl.nr_inreg = t.numar and tbl.data_inreg = t.data_inreg&lt;BR&gt;where tbl.tip is null&lt;/P&gt;
&lt;P&gt;drop table #temp&lt;/P&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2388.aspx</link><pubDate>Fri, 03 Aug 2007 14:24:55 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2388</guid><dc:creator>rsocol</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2388.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2388</wfw:commentRss><description>&lt;p&gt;hyghnet,&lt;/p&gt;&lt;p&gt;Query-ul scris de Diana ar trebui să furnizeze rezultatele corecte. Singura problemă este în datele de test: în primul rând ai scris 1/2006, iar în următoarele două ai scris 1/2007, dar cred că vroiai să scrii aceeaşi valoare. Încearcă, de exemplu, cu următoarele date de test:&lt;br&gt;&lt;/p&gt;&lt;p&gt;CREATE TABLE Tabela (&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nr_inreg varchar(7) NOT NULL,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data_inreg smalldatetime NOT NULL,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tip varchar(10) NULL,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRIMARY KEY (nr_inreg, data_inreg)&lt;br&gt;)&lt;br&gt;&lt;br&gt;INSERT INTO Tabela VALUES ('1/2007','20070501',NULL)&lt;br&gt;INSERT INTO Tabela VALUES ('1/2007','20070505','ACTIV')&lt;br&gt;INSERT INTO Tabela VALUES ('1/2007','20070507','ACTIV')&lt;br&gt;INSERT INTO Tabela VALUES ('2/2007','20070520','ACTIV')&lt;br&gt;INSERT INTO Tabela VALUES ('2/2007','20070603',NULL)&lt;br&gt;INSERT INTO Tabela VALUES ('2/2007','20070615','ACTIV')&lt;br&gt;INSERT INTO Tabela VALUES ('2/2007','20070621',NULL)&lt;br&gt;INSERT INTO Tabela VALUES ('3/2007','20070627',NULL)&lt;br&gt;INSERT INTO Tabela VALUES ('3/2007','20070704',NULL)&lt;br&gt;INSERT INTO Tabela VALUES ('4/2007','20070717',NULL)&lt;br&gt;INSERT INTO Tabela VALUES ('5/2007','20070725',NULL)&lt;br&gt;INSERT INTO Tabela VALUES ('5/2007','20070728',NULL)&lt;br&gt;INSERT INTO Tabela VALUES ('6/2007','20070805','ACTIV')&lt;br&gt;INSERT INTO Tabela VALUES ('6/2007','20070808',NULL)&lt;br&gt;&lt;/p&gt;&lt;p&gt;SELECT a.* FROM Tabela a INNER JOIN (&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT nr_inreg, MAX(data_inreg) as ultima_data&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM Tabela GROUP BY nr_inreg&lt;br&gt;) b ON a.nr_inreg=b.nr_inreg and a.data_inreg=b.ultima_data&lt;br&gt;WHERE data_inreg&amp;lt;'20070726' AND tip IS NULL&lt;br&gt;&lt;/p&gt;&lt;p&gt;Răzvan&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2386.aspx</link><pubDate>Fri, 03 Aug 2007 13:21:48 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2386</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2386.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2386</wfw:commentRss><description>&lt;P&gt;da..intradevar asociaza incorect datele...am vazut....am incercat in ideea ca poate fentez cumva group by sa nu-mi ceara sa bag si tip in el....dar se pare ca nu mere :)&lt;/P&gt;
&lt;P&gt;si pt mine e o enigma de ce 1/2006 nu trebuie sa faca parte din rezultate....dar trec peste si eu consider ca trebuie sa faca parte pana la proba contrarie :)&lt;/P&gt;
&lt;P&gt;imi mai bat capul cu selectul ala....in ideea ca filtrez o data dupa "nr_inreg" si "data_inreg" maxima&amp;nbsp;si apoi totul dupa "tip" = null&lt;/P&gt;
&lt;P&gt;alex.&lt;/P&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2384.aspx</link><pubDate>Fri, 03 Aug 2007 13:10:01 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2384</guid><dc:creator>Diana</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2384.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2384</wfw:commentRss><description>&lt;p&gt;Alex, se pare ca subquery-ul asociaza incorect datele de inregistrare cu tipul...&lt;/p&gt;&lt;p&gt;Nu
inteleg...de exemplu ce "deosebire" exista intre "1/2006" si "4/2007" -
amandoua au tipul NULL si doar cate o inregistrare in tabel...de ce
"1/2006" ar trebui exclus din setul rezultat?&lt;br&gt;
&lt;/p&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2383.aspx</link><pubDate>Fri, 03 Aug 2007 12:39:12 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2383</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2383.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2383</wfw:commentRss><description>&lt;P&gt;poate?!?!?!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;select X.Nr,X.Data,X.tip from (&lt;BR&gt;&amp;nbsp;&amp;nbsp;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nr_inreg Nr, MAX(data_inreg) AS Data, max(tip) AS tip&lt;BR&gt;&amp;nbsp;&amp;nbsp;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbo.Table2&lt;BR&gt;&amp;nbsp;&amp;nbsp;GROUP BY nr_inreg&lt;BR&gt;&amp;nbsp;&amp;nbsp;HAVING&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (MAX(data_inreg) &amp;lt; CONVERT(DATETIME, '2007-07-26 00:00:00', 102))&lt;BR&gt;&amp;nbsp;&amp;nbsp;) X&lt;BR&gt;where X.tip is null&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;alex.&lt;/P&gt;
&lt;P&gt;edit: l-am mai testat si nu e bun :(&lt;/P&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2381.aspx</link><pubDate>Fri, 03 Aug 2007 12:09:22 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2381</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2381.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2381</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://sqlserver.ro/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;hyghnet:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;P&gt;Multumesc Alex.&lt;/P&gt;
&lt;P&gt;Problema este&amp;nbsp;ca ceea ce imi propui tu imi arata data maxima la care numarul are tip is NULL, pe mine ma intereseaza sa-mi arate ultima inregisrare pt un numar numai daca acesta are tip is NULL daca nu sa nu-l afiseze . Daca data maxima pt respectivul numar nu este tip is NULL nu vreau sa-l afisez.&lt;/P&gt;
&lt;P&gt;Ex : pt numarul 1/2006&amp;nbsp;se afiseaza &lt;/P&gt;
&lt;P&gt;1/2006&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/05/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL&lt;/P&gt;
&lt;P&gt;iar eu as fi dorit&amp;nbsp;pt asta sa nu afiseze nimik.&lt;/P&gt;
&lt;P&gt;--Apropo lucrez in sql 2k &lt;/P&gt;
&lt;P&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/P&gt;
&lt;P&gt;nici o problema....doar ca nu prea am inteles :)&lt;/P&gt;
&lt;P&gt;din inregistrarile afisate de tine in acest post.....mie unul mi se pare ca 1/2006 indeplineste conditiile tale pt a fi afisat in SELECT (are si data maxima pt nr_inreg = 1/2006 si are si tip = null)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;deci.....tie iti trebuiesc inregistarile grupate dupa "nr_inreg" care sunt de 2 tipuri ca sa zic asa&lt;/P&gt;
&lt;P&gt;1. nr_inreg cu data maxima si tip = null&lt;/P&gt;
&lt;P&gt;2. nr_inreg cu data maxima si tip = activ&lt;/P&gt;
&lt;P&gt;tu vrei sa ti le intoarca doar pe cele care au si data maxima din grupul respectiv dar si tip = null (daca au data maxima dar tip = activ sa nu ti le intoarca).....asa e?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;alex.&lt;/P&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2380.aspx</link><pubDate>Fri, 03 Aug 2007 12:05:30 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2380</guid><dc:creator>Diana</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2380.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2380</wfw:commentRss><description>...bine, si daca pentru un nr. anume ai o singura inregistrare si tipul este NULL, asta nu "se califica"?&lt;br&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2378.aspx</link><pubDate>Fri, 03 Aug 2007 10:16:56 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2378</guid><dc:creator>hyghnet</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2378.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2378</wfw:commentRss><description>&lt;P&gt;Alex sper&amp;nbsp;ca nu te superi&amp;nbsp;, incerc sa fiu cat mai explicit ca si mie cand mi s-a cerut am inteles mai greu.&lt;/P&gt;
&lt;P&gt;OK. luand ex pt nr. 1/2006 acesta este de felul:&lt;/P&gt;
&lt;P&gt;nr_inreg&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data_inreg&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tip&lt;BR&gt;1/2006&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/05/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL&lt;/P&gt;
&lt;P&gt;1/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05/05/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACTIV&lt;/P&gt;
&lt;P&gt;1/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 07/05/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACTIV&lt;/P&gt;
&lt;P&gt;Deci eu vreau sa vad doar linia cu data 07/05/2007 (adica cea mai&amp;nbsp;recenta data &amp;nbsp;de inregistrare) daca aceasta era de tip is null altfel nu vreau sa o vad.Deci nu trebuie sa vad nimic de la numarul 1/2006 pt ca aceasta data cea mai recenta de inregistrare nu are tip is null.&lt;/P&gt;
&lt;P&gt;trecem la urmatorul numar 2/2007&lt;/P&gt;
&lt;P&gt;2/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/05/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACTIV&lt;/P&gt;
&lt;P&gt;2/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03/06/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL&lt;/P&gt;
&lt;P&gt;2/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15/06/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACTIV&lt;/P&gt;
&lt;P&gt;2/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21/06/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL&lt;/P&gt;
&lt;P&gt;aici trebuie sa vad doar linia cu data 21/06/2007 deoarece are tip is null, daca la aceasta data aveam tot ACTIV atunci pt nr. 2/2007 trebuia sa nu se afiseze mimic. &lt;/P&gt;
&lt;P&gt;Asta este si problema mea&amp;nbsp;ca vreau sa vad numai acele linii care sunt ca si data de inregistrare ultima pt un numar si numai daca acestea sunt de tip is null.&lt;/P&gt;
&lt;P&gt;Multumesc pentru intelegere.&lt;/P&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2376.aspx</link><pubDate>Fri, 03 Aug 2007 10:03:43 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2376</guid><dc:creator>Diana</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2376.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2376</wfw:commentRss><description>??? mie mi se pare ca e corect...pentru 1/2006, in exemplul tau nu ai decato singura inregistrare si aceea cu tip = NULL...???&lt;br&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2375.aspx</link><pubDate>Fri, 03 Aug 2007 09:56:27 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2375</guid><dc:creator>hyghnet</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2375.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2375</wfw:commentRss><description>&lt;P&gt;Multumesc Alex.&lt;/P&gt;
&lt;P&gt;Problema este&amp;nbsp;ca ceea ce imi propui tu imi arata data maxima la care numarul are tip is NULL, pe mine ma intereseaza sa-mi arate ultima inregisrare pt un numar numai daca acesta are tip is NULL daca nu sa nu-l afiseze . Daca data maxima pt respectivul numar nu este tip is NULL nu vreau sa-l afisez.&lt;/P&gt;
&lt;P&gt;Ex : pt numarul 1/2006&amp;nbsp;se afiseaza &lt;/P&gt;
&lt;P&gt;1/2006&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/05/2007&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL&lt;/P&gt;
&lt;P&gt;iar eu as fi dorit&amp;nbsp;pt asta sa nu afiseze nimik.&lt;/P&gt;
&lt;P&gt;--Apropo lucrez in sql 2k &lt;/P&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2371.aspx</link><pubDate>Fri, 03 Aug 2007 09:14:20 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2371</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2371.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2371</wfw:commentRss><description>&lt;P&gt;salut, asa nu merge?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nr_inreg, MAX(data_inreg) AS data, tip AS tip&lt;BR&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbo.Table2&lt;BR&gt;GROUP BY nr_inreg, tip&lt;BR&gt;HAVING&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (tip IS NULL) AND (MAX(data_inreg) &amp;lt; CONVERT(DATETIME, '2007-07-26 00:00:00', 102))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;alex.&lt;/P&gt;</description></item><item><title>Re: cursor sau query pt. o situatie mai complicata</title><link>http://sqlserver.ro/forums/thread/2370.aspx</link><pubDate>Fri, 03 Aug 2007 09:04:07 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2370</guid><dc:creator>Diana</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2370.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2370</wfw:commentRss><description>Mai "cu cantec" poate fi aici lucrul cu "datetime" - ramane de discutat
daca ce am propus e absolut OK pentru tine in aceasta privinta. De
exemplu, te intereseaza numai ziua inregistrarii, sau si ora, etc...&lt;br&gt;</description></item></channel></rss>