<?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: strergere din doua tabele???</title><link>http://sqlserver.ro/forums/thread/2358.aspx</link><pubDate>Tue, 31 Jul 2007 17:02:56 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2358</guid><dc:creator>B_gd_n[ ]Sahlean</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2358.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2358</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;rsocol:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;Bogdan,&lt;/p&gt;&lt;p&gt;Instrucţiunea respectivă din Access nu şterge din două tabele, ci doar din tabela ArtStk_Land (&lt;b&gt;încearcă dacă nu crezi&lt;/b&gt;)...&lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;img src="http://sqlserver.ro/emoticons/emotion-1.gif" alt="Smile" /&gt; Te cred. Mi-a atras atentia titlul si cunoscand anumite diferente privitoare la "comportamentul" comenzilor SQL din Access si SQL Server nu am citit fraza SQL din primul mesaj.&lt;/p&gt;</description></item><item><title>Re: strergere din doua tabele???</title><link>http://sqlserver.ro/forums/thread/2356.aspx</link><pubDate>Tue, 31 Jul 2007 15:06:19 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2356</guid><dc:creator>rsocol</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2356.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2356</wfw:commentRss><description>&lt;p&gt;Bogdan,&lt;/p&gt;&lt;p&gt;Instrucţiunea respectivă din Access nu şterge din două tabele, ci doar din tabela ArtStk_Land (încearcă dacă nu crezi). Într-adevăr, Access-ul are posibilitatea să şteargă din două tabele printr-o singură instrucţiune, dar acestea trebuie specificate sub forma Tabela.* în clauza DELETE. În plus, e necesar ca tabelele să fie legate printr-o relaţie unu-la-unu (sau să existe indecşii unici necesari pentru o asemenea relaţie).&lt;br&gt;&lt;br&gt;Instrucţiunea menţionată de Ioana poate fi scrisă în T-SQL astfel:&lt;/p&gt;&lt;p&gt;DELETE ArtStk_Land&lt;br&gt;FROM ArtStk INNER JOIN ArtStk_Land ON ArtStk.StkID=ArtStk_Land.StkID&lt;br&gt;WHERE ArtStk.ArtNr=0 &lt;/p&gt;&lt;p&gt;sau conform sintaxei ANSI:&lt;/p&gt;&lt;p&gt;DELETE ArtStk_Land &lt;br&gt;WHERE StkID IN (SELECT StkID FROM ArtStk WHERE ArtNr=0)&lt;br&gt;&lt;br&gt;Răzvan&lt;/p&gt;&lt;p&gt;Notă: am editat mesajul ulterior postării iniţiale (pentru a preciza cum e posibilă ştergerea din mai multe tabele în Access)&lt;/p&gt;</description></item><item><title>Re: strergere din doua tabele???</title><link>http://sqlserver.ro/forums/thread/2355.aspx</link><pubDate>Tue, 31 Jul 2007 14:46:19 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2355</guid><dc:creator>B_gd_n[ ]Sahlean</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2355.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2355</wfw:commentRss><description>&lt;p&gt;Comanda DELETE din T-SQL este "mai rigidă" decat cea din Access (de fapt JET).&lt;/p&gt;&lt;p&gt;Deci comanda DELETE din dialectul SQL implementat in SQL Server&amp;nbsp; adica din T-SQL nu permite realizarea stergerilor din mai multe tabele.&lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Pe scurt nu se poate. Poti folosi urmatoarea secventa VB drept exemplu totusi &lt;/p&gt;&lt;p&gt;objConexiuneADO.Execute "&lt;span style="font-weight:bold;"&gt;DELETE FROM Vasile;DELETE FROM Georgel;&lt;/span&gt;"&lt;/p&gt;&lt;p&gt;sau ...&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Access-ul are niste facilitati care bat la "funduleţ" SQL Server-ul.&lt;br&gt;&lt;/p&gt;</description></item><item><title>strergere din doua tabele???</title><link>http://sqlserver.ro/forums/thread/2352.aspx</link><pubDate>Tue, 31 Jul 2007 09:22:47 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:2352</guid><dc:creator>ioana</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/2352.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=2352</wfw:commentRss><description>&lt;p&gt;urmatorul DELETE e facut in Access si se sterg campuri din doua talele...&lt;/p&gt;&lt;p&gt;cum fac asta in sqlServer?... &lt;br&gt;&lt;/p&gt;&lt;p&gt;DELETE DISTINCTROW ArtStk.ArtNr, ArtStk_Land.* &lt;br&gt;FROM ArtStk INNER JOIN ArtStk_Land &lt;br&gt;ON ArtStk.StkID = ArtStk_Land.StkID &lt;br&gt;WHERE ArtStk.ArtNr = 0&lt;/p&gt;&lt;p&gt;Multumesc anticipat?&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>