<?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: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1700.aspx</link><pubDate>Mon, 05 Feb 2007 18:21:23 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1700</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1700.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1700</wfw:commentRss><description>asa e....inca o data ai dreptate ;)....multumesc</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1695.aspx</link><pubDate>Mon, 05 Feb 2007 16:45:14 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1695</guid><dc:creator>rsocol</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1695.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1695</wfw:commentRss><description>&lt;p&gt;"SELECT DISTINCT COUNT(*) FROM Tmp" e identic cu "SELECT COUNT(*) FROM Tmp"&lt;br&gt;&lt;/p&gt;&lt;p&gt;Probabil vrei să scrii "SELECT COUNT(DISTINCT coloana) FROM Tabela"&lt;br&gt;sau "SELECT COUNT(*) FROM (SELECT DISTINCT * FROM Tmp) x".&lt;br&gt;&lt;/p&gt;&lt;p&gt;Răzvan&lt;br&gt;&lt;/p&gt;</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1693.aspx</link><pubDate>Mon, 05 Feb 2007 16:28:28 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1693</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1693.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1693</wfw:commentRss><description>&lt;P&gt;mai am inca o intrebare&lt;/P&gt;
&lt;P&gt;&amp;nbsp;de ce......&lt;/P&gt;
&lt;P&gt;SELECT DISTINCT * FROM Tmp ---intoarce 200 inregistrari&lt;/P&gt;
&lt;P&gt;si&lt;/P&gt;
&lt;P&gt;SELECT DISTINCT COUNT(*) FROM Tmp ---intoarce 212 inregistrari&lt;/P&gt;</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1692.aspx</link><pubDate>Mon, 05 Feb 2007 15:58:28 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1692</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1692.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1692</wfw:commentRss><description>Exemplele din Books Online pentru utilizarea bcp sunt lamuritoare,testati-le</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1690.aspx</link><pubDate>Mon, 05 Feb 2007 15:48:48 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1690</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1690.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1690</wfw:commentRss><description>&lt;P&gt;multumesc tuturor......&lt;/P&gt;
&lt;P&gt;&amp;nbsp;diana as folosi cu placere BCP daca as sti :)....o sa citesc despre varianta ta poate e mai buna....momentan varianta lui rscol(Razvan) ma ajuta mult&amp;nbsp; '&amp;gt;&amp;gt;'&lt;/P&gt;</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1689.aspx</link><pubDate>Mon, 05 Feb 2007 15:27:33 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1689</guid><dc:creator>rsocol</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1689.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1689</wfw:commentRss><description>&lt;p&gt;Poţi să foloseşti "echo ...&amp;gt;&amp;gt;fisier.txt" in loc de "echo ...&amp;gt;fisier.txt".&lt;/p&gt;&lt;p&gt;Răzvan&lt;br&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1688.aspx</link><pubDate>Mon, 05 Feb 2007 15:26:29 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1688</guid><dc:creator>Diana</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1688.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1688</wfw:commentRss><description>&lt;p&gt;Incearca de exemplu:&lt;/p&gt;&lt;p&gt;SET @destinatie = 'C:\test_' + CONVERT(nvarchar(10), GETDATE(), 126) + '.txt' &lt;/p&gt;&lt;p&gt;Altfel,
eu ma alatur lui Razvan...cred ca e mai nimerit un BCP (care nu e deloc
complicat si ruleaza rapid) sau o foarte simpla aplicatie .NET care
exporta datele...Este si SSIS/DTS o solutie, dar nu atat de
"lightweight"...&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br&gt;
&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1687.aspx</link><pubDate>Mon, 05 Feb 2007 15:13:38 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1687</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1687.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1687</wfw:commentRss><description>&lt;P&gt;dar problema e alta acum...ca se suprascrie fisierul&lt;/P&gt;
&lt;P&gt;eu vreau sa-mi pastreze toate datele si cele pe care le bag azi...si maine etc....nu de fiecare data cand se executa acest script sa mi se scrie peste.....sa se scrie fisierul iar....:(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1686.aspx</link><pubDate>Mon, 05 Feb 2007 15:10:56 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1686</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1686.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1686</wfw:commentRss><description>scuze...intradevar merge....doar ca folderul era pe D nu pe C</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1685.aspx</link><pubDate>Mon, 05 Feb 2007 15:07:09 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1685</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1685.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1685</wfw:commentRss><description>&lt;P&gt;nu-mi merge :(.........in QA daca rulez imi zice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;output&lt;/P&gt;
&lt;P&gt;NULL&lt;/P&gt;
&lt;P&gt;iar in folderul C:\test.txt &lt;/P&gt;
&lt;P&gt;nu apare nimic&lt;/P&gt;</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1684.aspx</link><pubDate>Mon, 05 Feb 2007 14:58:06 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1684</guid><dc:creator>xmldeveloper</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1684.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1684</wfw:commentRss><description>&lt;P&gt;Mie imi merge:&lt;/P&gt;
&lt;P&gt;DECLARE &lt;BR&gt;&amp;nbsp;@cmd&amp;nbsp; sysname, &lt;BR&gt;&amp;nbsp;@var&amp;nbsp; nvarchar(100),&lt;BR&gt;&amp;nbsp;@destinatie nvarchar(50)&lt;/P&gt;
&lt;P&gt;set @var='Test'&lt;BR&gt;set @destinatie='C:\test.txt'&lt;BR&gt;SET @cmd = 'echo ' + @var + ' &amp;gt; &lt;A href="mailto:'+@destinatie"&gt;'+@destinatie&lt;/A&gt;&lt;BR&gt;EXEC master..xp_cmdshell @cmd&lt;BR&gt;GO&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1683.aspx</link><pubDate>Mon, 05 Feb 2007 14:55:22 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1683</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1683.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1683</wfw:commentRss><description>pt ca o sa fac un job care apeleaza o procedura ce include partea de mai sus....si sa-mi salveze zilnic acolo ce intoarce mesajul ala</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1682.aspx</link><pubDate>Mon, 05 Feb 2007 14:53:28 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1682</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1682.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1682</wfw:commentRss><description>&lt;P&gt;nu..vreau ceva mult mai simplu....de genul...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;DECLARE @mesaj as nvarchar(50),@NrDuplicate int,@data&amp;nbsp;datetime&lt;BR&gt;SELECT @NrDuplicate = (SELECT COUNT(*) FROM Tmp) - (SELECT DISTINCT COUNT(*) FROM Tmp)&lt;BR&gt;set @data=getdate()&lt;BR&gt;set @mesaj = 'In data de '+cast(@data as nvarchar(12))+' avem in tabela Tmp un numar de '+cast(@NrDuplicate as nvarchar(4))+' duplicate.'&lt;BR&gt;&lt;BR&gt;DECLARE &lt;BR&gt;&amp;nbsp;@cmd &amp;nbsp;sysname, &lt;BR&gt;&amp;nbsp;@var &amp;nbsp;nvarchar(100),&lt;BR&gt;&amp;nbsp;@destinatie nvarchar(50)&lt;/P&gt;
&lt;P&gt;set @var=@mesaj&lt;BR&gt;set @destinatie='C:\test.txt'&lt;BR&gt;SET @cmd = 'echo ' + @var + ' &amp;gt; &lt;A href="mailto:'+@destinatie"&gt;'+@destinatie&lt;/A&gt;&lt;BR&gt;EXEC master..xp_cmdshell @cmd&lt;BR&gt;GO&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;dar nu merge.....imi scapa mie ceva....nu cunosc bine xp_cmdshell....ma ajuta cineva?&lt;/P&gt;
&lt;P&gt;unde e greseala?&lt;/P&gt;</description></item><item><title>Re: Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1681.aspx</link><pubDate>Mon, 05 Feb 2007 14:40:58 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1681</guid><dc:creator>rsocol</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1681.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1681</wfw:commentRss><description>&lt;p&gt;În afară de metoda evidentă (copy/paste din Management Studio), poţi să foloseşti OSQL/SQLCMD sau BCP pentru a salva conţinutul unui query într-un fişier text. Soluţia cea mai recomandată e SSIS, probabil. Cred că se poate şi cu linked servers, dar nu sunt sigur. Dacă vrei un anumit format mai complex, poţi să te gândeşti la Reporting Services sau la un program într-un limbaj oarecare în care să deschizi un recordset şi să-l scrii linie cu linie în fişierul text.&lt;br&gt;&lt;/p&gt;&lt;p&gt;Răzvan&lt;/p&gt;</description></item><item><title>Salveaza intr-un .txt</title><link>http://sqlserver.ro/forums/thread/1679.aspx</link><pubDate>Mon, 05 Feb 2007 14:02:59 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1679</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1679.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=1679</wfw:commentRss><description>&lt;P&gt;Salut,....am o procedura de select care la un moment dat se executa.....cum pot salva rezultatul acestui select intr-un document .txt.multumesc&lt;/P&gt;
&lt;P&gt;&amp;nbsp;(SQL Server 2000)&lt;/P&gt;</description></item></channel></rss>