<?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</title><link>http://sqlserver.ro/forums/14/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: fraza SQL</title><link>http://sqlserver.ro/forums/thread/4856.aspx</link><pubDate>Sun, 11 May 2008 18:57:18 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:4856</guid><dc:creator>B_gd_n[ ]Sahlean</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/4856.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=4856</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;Talkabout:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;pentru capriciosa da, exista mai multe componente, cu gramajele aferente. dar de ce sa selectez o reteta anume? eu vreau sa selectez o pizza(dupa id sau tip, nu conteaza) si sa-mi afiseze reteta, adica toate componentele, si gramajele, dar si acel camp calculat, valoare. se pare ca, campul da 0 daca impartirea nu se face exact&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br&gt;Pentru că - de exemplu - unele sunt cantităţile pentru o pizza de 26 cm şi alte sunt cantităţile pentru o pizza de 36 cm.&lt;br&gt;&lt;br&gt;În fine ... depinde de cum ai proiectat baza de date.&lt;br&gt;</description></item><item><title>Re: fraza SQL</title><link>http://sqlserver.ro/forums/thread/4855.aspx</link><pubDate>Sun, 11 May 2008 18:09:52 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:4855</guid><dc:creator>Talkabout</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/4855.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=4855</wfw:commentRss><description>am reusit in cele din urma, mersi oricum :)</description></item><item><title>Re: fraza SQL</title><link>http://sqlserver.ro/forums/thread/4854.aspx</link><pubDate>Sun, 11 May 2008 17:50:21 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:4854</guid><dc:creator>Talkabout</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/4854.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=4854</wfw:commentRss><description>pentru capriciosa da, exista mai multe componente, cu gramajele aferente. dar de ce sa selectez o reteta anume? eu vreau sa selectez o pizza(dupa id sau tip, nu conteaza) si sa-mi afiseze reteta, adica toate componentele, si gramajele, dar si acel camp calculat, valoare. se pare ca, campul da 0 daca impartirea nu se face exact</description></item><item><title>Re: fraza SQL</title><link>http://sqlserver.ro/forums/thread/4853.aspx</link><pubDate>Sun, 11 May 2008 17:35:32 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:4853</guid><dc:creator>Diana</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/4853.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=4853</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;xmldeveloper:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;
&lt;P&gt;Interogarea originala este:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;SELECT&lt;/SPAN&gt; &lt;BR&gt;C.numeComponenta, &lt;BR&gt;R.gramaj, &lt;BR&gt;D.pretComponentaPerKg&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;FROM&lt;/SPAN&gt; pizza &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; P, &lt;BR&gt;reteta &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; R, &lt;BR&gt;componente &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; C, &lt;BR&gt;CostComponente &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; D&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;WHERE&lt;/SPAN&gt; &lt;BR&gt;P.idPizza=R.idPizza &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:silver;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;And&lt;/SPAN&gt; r.idcomponenta=c.idcomponenta &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:silver;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;And&lt;/SPAN&gt; C.idComponenta=D.idComponenta &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:silver;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;and&lt;/SPAN&gt; p.tippizza=&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;'capriciosa'&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Un posibil raspuns este:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;SELECT&lt;/SPAN&gt; &lt;BR&gt;C.numeComponenta, &lt;BR&gt;R.gramaj, &lt;BR&gt;D.pretComponentaPerKg,&lt;BR&gt;(R.gramaj * D.pretComponentaPerKg)/1000 &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; Price&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;FROM&lt;/SPAN&gt; pizza &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; P, &lt;BR&gt;reteta &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; R, &lt;BR&gt;componente &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; C, &lt;BR&gt;CostComponente &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; D&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;WHERE&lt;/SPAN&gt; &lt;BR&gt;P.idPizza=R.idPizza &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:silver;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;And&lt;/SPAN&gt; r.idcomponenta=c.idcomponenta &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:silver;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;And&lt;/SPAN&gt; C.idComponenta=D.idComponenta &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:silver;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;and&lt;/SPAN&gt; p.tippizza=&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;'capriciosa'&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/P&gt;
&lt;P&gt;...aici cred ca trebuie sa selectezi si o reteta anume - se pare ca pentru "capriciosa" exista mai multe retete (???). &lt;/P&gt;</description></item><item><title>Re: fraza SQL</title><link>http://sqlserver.ro/forums/thread/4852.aspx</link><pubDate>Sun, 11 May 2008 17:15:29 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:4852</guid><dc:creator>Talkabout</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/4852.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=4852</wfw:commentRss><description>formula pentru coloana este buna, de calcul a unei componente la un anumit gramaj, stiind pretul/kg.&lt;br /&gt;inca ceva, daca pretul/kg este 20, iar o componenta are 210 gr., cum se calculeaza in acea coloana calculata cu virgula? sau se poate doar cu numere intregi? unde nu se imparte exact, imi da 0</description></item><item><title>Re: fraza SQL</title><link>http://sqlserver.ro/forums/thread/4851.aspx</link><pubDate>Sun, 11 May 2008 17:13:20 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:4851</guid><dc:creator>xmldeveloper</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/4851.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=4851</wfw:commentRss><description>&lt;P&gt;In principiu folositi tot o coloana calculata.&lt;/P&gt;
&lt;P&gt;Formula pentru coloana depinde de logica aplicatiei care personal imi scapa.&lt;/P&gt;
&lt;P&gt;Eventual puteti lua in calcul folosirea GROUP BY.&lt;/P&gt;</description></item><item><title>Re: fraza SQL</title><link>http://sqlserver.ro/forums/thread/4850.aspx</link><pubDate>Sun, 11 May 2008 16:41:11 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:4850</guid><dc:creator>Talkabout</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/4850.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=4850</wfw:commentRss><description>mersi, dar daca in Reteta am pentru capriciosa sau orice alt tip de pizza mai multe gramaje, imi apar toate, nu doar cel corespunzator componentei.&lt;br /&gt;de exemplu, imi afiseaza asa:&lt;br /&gt;http://img106.imageshack.us/my.php?image=resulteg9.jpg&lt;br /&gt;sau daca in Reteta am o singura componenta pentru o anumita pizza, nu mi-o afiseaza in urma select-ului.</description></item><item><title>Re: fraza SQL</title><link>http://sqlserver.ro/forums/thread/4847.aspx</link><pubDate>Sun, 11 May 2008 12:33:42 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:4847</guid><dc:creator>xmldeveloper</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/4847.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=4847</wfw:commentRss><description>&lt;P&gt;Interogarea originala este:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;SELECT&lt;/SPAN&gt; &lt;BR&gt;C.numeComponenta, &lt;BR&gt;R.gramaj, &lt;BR&gt;D.pretComponentaPerKg&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;FROM&lt;/SPAN&gt; pizza &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; P, &lt;BR&gt;reteta &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; R, &lt;BR&gt;componente &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; C, &lt;BR&gt;CostComponente &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; D&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;WHERE&lt;/SPAN&gt; &lt;BR&gt;P.idPizza=R.idPizza &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:silver;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;And&lt;/SPAN&gt; r.idcomponenta=c.idcomponenta &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:silver;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;And&lt;/SPAN&gt; C.idComponenta=D.idComponenta &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:silver;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;and&lt;/SPAN&gt; p.tippizza=&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;'capriciosa'&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Un posibil raspuns este:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;SELECT&lt;/SPAN&gt; &lt;BR&gt;C.numeComponenta, &lt;BR&gt;R.gramaj, &lt;BR&gt;D.pretComponentaPerKg,&lt;BR&gt;(R.gramaj * D.pretComponentaPerKg)/1000 &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; Price&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;FROM&lt;/SPAN&gt; pizza &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; P, &lt;BR&gt;reteta &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; R, &lt;BR&gt;componente &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; C, &lt;BR&gt;CostComponente &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;AS&lt;/SPAN&gt; D&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;WHERE&lt;/SPAN&gt; &lt;BR&gt;P.idPizza=R.idPizza &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:silver;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;And&lt;/SPAN&gt; r.idcomponenta=c.idcomponenta &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:silver;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;And&lt;/SPAN&gt; C.idComponenta=D.idComponenta &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:silver;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;and&lt;/SPAN&gt; p.tippizza=&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;'capriciosa'&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description></item><item><title>fraza SQL</title><link>http://sqlserver.ro/forums/thread/4846.aspx</link><pubDate>Sun, 11 May 2008 11:04:56 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:4846</guid><dc:creator>Talkabout</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/4846.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=4846</wfw:commentRss><description>am un query ca cel din exemplu.&lt;br /&gt;dar daca vreau sa adaug la rezultatul acestuia inca o coloana, in care sa calculeze pretul pentru acea componenta cum ar trebui sa procedez? &lt;br /&gt;ex.: blat de 100 grame, cu pretul/kg 20 lei, in a 4-a coloana as vrea sa apara 2. ca formula, ar fi (gramaj*pretComponentaPerKg)/1000, dar cum adaug o a 4-a coloana, in care sa fie calculat acest pret?&lt;br /&gt;&lt;br /&gt;Fisierul pe care vroiam sa il atasez(dar nu a mers): http://uploaded.to/?id=m6akt6</description></item></channel></rss>