Viewing 15 posts - 271 through 285 (of 7,636 total)
Jeff Moden (5/27/2012)
RBarryYoung (5/27/2012)
SELECT
SUM( dbo.calc(c1.column_id, c2.column_id) / 2 )
FROM sys.system_columns c1
cross join sys.system_columns c2
took 104 seconds to execute on...
May 28, 2012 at 5:10 am
"OVER_SET" is the name of the stored procedure that I wrote and that the article discusses. You first have to copy the code from the bottom of the article...
May 28, 2012 at 5:02 am
vinu512 (5/27/2012)
RBarryYoung (5/26/2012)
vinu512 (5/4/2012)
However un-SetBased( :-P...
May 27, 2012 at 10:49 pm
Just by way of comparision, this query:
SELECT
SUM( dbo.calc(c1.column_id, c2.column_id) / 2 )
FROM sys.system_columns c1
cross join sys.system_columns c2
took 104 seconds to execute on my system.
Whereas this...
May 27, 2012 at 10:37 pm
Well, not that all that isn't fun, but here's another way to go:
CREATE FUNCTION dbo.itvfCalc(@Val1 INT, @Val2 INT)
RETURNS TABLE As
RETURN SELECT @Val1 * @Val2 As Val3
SELECT A.Name,
...
May 27, 2012 at 10:23 pm
I believe that the recommendation on this is to change your query to watch the column that is actually changing. See here...
May 27, 2012 at 2:11 pm
Actually, I'm pretty sure that there's a limit on the size of a Row ID which, though huge, would constitute an upper limit on the number of rows that could...
May 27, 2012 at 12:07 pm
Ah, well, glad it worked out for you then.
May 27, 2012 at 11:04 am
L' Eomot Inversé (5/27/2012)
RBarryYoung (5/26/2012)
Heh, try searching SQL_MODULES for '%cursor%open%while%fetch%close%deallocate%', Tom. Those suckers have cursors in them!
Well, it's possible that that could occur within a string literal (or split...
May 27, 2012 at 10:44 am
Maybe this formatting will make it clearer:
CREATE TRIGGER InventLow on PurchaseOrder
For update
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT...
May 27, 2012 at 10:22 am
The SELECT is part of the INSERT command. It tells the INSERT what values to insert.
May 27, 2012 at 10:20 am
Try it like this:
CREATE TRIGGER InventLow on PurchaseOrder
For update
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON
INSERT INTO PurchaseOrder
SELECT...
May 26, 2012 at 9:40 pm
L' Eomot Inversé (5/25/2012)
RBarryYoung (5/24/2012)
GilaMonster (5/23/2012)
dwain.c (5/22/2012)
Stefan Krzywicki (5/22/2012)
Lynn Pettis (5/22/2012)
If people would just format their code they could figure out some of their own problems. Geez.
Many should format...
May 26, 2012 at 9:08 pm
Revenant (5/26/2012)
Steve Jones - SSC Editor (5/25/2012)
Jeff Moden (5/25/2012)
Brandie Tarvin (5/25/2012)
May 26, 2012 at 9:01 pm
Viewing 15 posts - 271 through 285 (of 7,636 total)