Forum Replies Created

Viewing 15 posts - 271 through 285 (of 7,636 total)

  • RE: function

    Jeff Moden (5/27/2012)


    RBarryYoung (5/27/2012)


    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...

  • RE: Replacement for Cursors

    "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...

  • RE: Replacement for Cursors

    vinu512 (5/27/2012)


    RBarryYoung (5/26/2012)


    vinu512 (5/4/2012)


    I give up...I've banged my head on this for really long....I have come to the conclusion that a loop cannot be avoided in this scenario.

    However un-SetBased( :-P...

  • RE: SQL Query

    The HAVING keyword must come after the GROUP BY clause.

  • RE: function

    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...

  • RE: function

    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,

    ...

  • RE: Query Notification in MS SQL 2012

    I believe that the recommendation on this is to change your query to watch the column that is actually changing. See here...

  • RE: billy-yons and billy-yons of rows

    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...

  • RE: Error in cube processing using conformed date dimension

    Ah, well, glad it worked out for you then.

  • RE: Are the posted questions getting worse?

    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...

  • RE: I need help in compare value trigger

    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...

  • RE: I need help in compare value trigger

    The SELECT is part of the INSERT command. It tells the INSERT what values to insert.

  • RE: I need help in compare value trigger

    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...

  • RE: Are the posted questions getting worse?

    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...

  • RE: Are the posted questions getting worse?

    Revenant (5/26/2012)


    Steve Jones - SSC Editor (5/25/2012)


    Jeff Moden (5/25/2012)


    Brandie Tarvin (5/25/2012)


    Anyone else find it inconvenient that MS wants people to have SysAdmin access in order to work the sp_enable_sql_debug proc...

Viewing 15 posts - 271 through 285 (of 7,636 total)