Viewing 15 posts - 23,431 through 23,445 (of 26,486 total)
GilaMonster (11/29/2008)
Jack Corbett (11/29/2008)
They imply you memorized some canned answered and/or went to boot camp.There's a frighteningly small percentage that actually studied the material. Not many, but there are some.
I...
November 29, 2008 at 11:55 am
And none of them worth the paper they are printed on I'd guess.
November 28, 2008 at 6:49 pm
One good place for table variables is in testing insert/update/delete testing where you know you will be rolling back the changes with an explicit BEGIN TRANSACTION/ROLLBACK TRANSACTION, but want to...
November 28, 2008 at 5:14 pm
Jack is correct, it depends. Also in deciding between temp tables and table variables it depends not only on the usage but the size of the data set as...
November 28, 2008 at 2:31 pm
Jack Corbett (11/28/2008)
;With cteItemTotalSales As
(
Select
IP.ItemNumberSK,
Sum(SI.Qty) as total_sold
From
item_purchase IP Join
sales_item SI On
IP.ItemNumberSK = SI.ItemNumberSK
Group By
IP.ItemNumberSK
)
SELECT
st.StoreName,
st.StoreCountry,
si.ItemNumberSK,
si.ItemName,
(SUM(si.Qty)/Convert(Float, total_sold)) as sales_pct
FROM
STORE st Join
ITEM_PURCHASE ip On
st.StoreNumberSK...
November 28, 2008 at 2:26 pm
Just playing the Devil's Advocate here, but couldn't you consider user training of an application using SQL Server 2005 as the database backend a "demonstration use"?
You can have SQL Server...
November 28, 2008 at 2:16 pm
Jeffrey Williams (11/28/2008)
Just so we answer the original question - use the RETURN statement to return the status back to the caller.
That doesn't really answer the question. He wanted...
November 28, 2008 at 1:31 pm
Jportelas (11/28/2008)
Thanks for the reply, even it did not answer my original question it help me somehow.Good way to solve the problem.
To take what Sergiy said and expand a little,...
November 28, 2008 at 1:07 pm
Time to compare functions.
In the code below I create a 1,000,000 row Tally table starting at 1. The table has one column, n. This is also clustered primary...
November 28, 2008 at 8:41 am
Okay, you don't have to take my word on this, in fact don't. Test it for yourself on a test server. Nothing beats actually doing it to be...
November 28, 2008 at 7:40 am
Hugo Kornelis (11/27/2008)
Jacob Luebbers (11/27/2008)
Hugo Kornelis (11/27/2008)
...
* The optimizer might choose a non-clustered index to drive the query
...
The technique also uses an index hint specifying the clustered index, with...
November 27, 2008 at 6:33 pm
Also, if I remember the discussions around Jeff's article on running totals, the only place he has run into difficulties with the technique is with partitioned tables. That is...
November 27, 2008 at 3:42 pm
Okay, can't wait to see Jeff's response. I was using a technique I picked up from him for completing running totals.
Regarding storing running totals, maybe it isn't stored in...
November 27, 2008 at 3:01 pm
Hugo Kornelis (11/27/2008)
Lynn Pettis (11/27/2008)
Since the purpose of the identity field was order, if there was a gap it wouldn't have caused an issue.
Hi Lynn,
But you are using the IDENTITY...
November 27, 2008 at 2:03 pm
diehc (11/27/2008)
I have that compare 2 tables (table1 and table2), if tne rows of the table1 dont exist in table2, have to inserted then in table2 , but if there...
November 27, 2008 at 12:36 pm
Viewing 15 posts - 23,431 through 23,445 (of 26,486 total)