Forum Replies Created

Viewing 15 posts - 4,951 through 4,965 (of 5,394 total)

  • RE: Are the posted questions getting worse?

    GilaMonster (8/10/2009)


    Gianluca Sartori (8/10/2009)


    Any volunteers to proof read an article on indexing?

    Here's one! What should I do to get this exclusive preview?

    Be patient. It's not finished yet. If you're keen...

  • RE: Are the posted questions getting worse?

    Any volunteers to proof read an article on indexing?

    Here's one! What should I do to get this exclusive preview?

    btw, anyone who's feeling overly-critical today might want to avoid today's...

  • RE: Date Range of occurences of consecutive String Values?

    Ok, I could not resist, I HAD to turn it to a quirky update!

    IF OBJECT_ID('TempDB..#tmpdata','U') IS NOT NULL

    DROP TABLE #tmpdata

    SELECT *, eventgroup...

  • RE: Estimation of Query Execution Time

    Maybe I'm wrong, but I took a look at the data returned by the view in my system and it looks like it holds statistics for sql handles of queries...

  • RE: Date Range of occurences of consecutive String Values?

    Gianluca Sartori (8/6/2009)


    maybe a cursor is the best choice here.

    Hope Jeff doesn't find this thread!;-)

    I could get porkchopped in seconds!:-D

  • RE: Date Range of occurences of consecutive String Values?

    Well, it's a bit more complicated than I thought, but it (poorly) does the trick.

    IF OBJECT_ID('TempDB..#tmpdata','U') IS NOT NULL

    DROP TABLE #tmpdata

    SELECT issuenumber,...

  • RE: Running Totals??

    Jeff Moden (8/5/2009)


    Like I said... "rapidly becoming one of the greats". 😉

    Thanks Jeff, I look forward the day I deserve your kindness! 😉

  • RE: How to be notified when a insert/update happens?

    Jeff Moden (8/5/2009)


    I cheat on things like this... xp_CmdShell to a batch file with a NETSEND.

    LOL!

    Haven't heard of NET SEND in the last 5 years!

    It's disabled by default...

  • RE: Date Range of occurences of consecutive String Values?

    This should do the trick:

    SELECT issuenumber, activitydate, activityseq, status

    FROM (

    SELECT *, prevstatus = (

    SELECT status

    FROM #projectactivity AS b

    WHERE activityseq = (SELECT MAX(activityseq) FROM #projectactivity AS c WHERE activityseq <...

  • RE: Running Totals??

    In SQL2008 you can use the new ISO syntax to perform rollups, as old WITH ROLLUP syntax will be removed in future versions:

    select

    nameofmarket as "market",

    sum(sales) as sales,

    sum(price) as...

  • RE: Running Totals??

    Try GROUP BY WITH ROLLUP

    declare @trading table (

    nameofmarket varchar(20),

    sales decimal(18,6),

    price decimal(18,6),

    goods int,

    ordersplaced int

    )

    insert into @trading

    select 'canberra' ,1000,300,25 ,40 union all select

    'sydney' , 2000,800,40 ,50 union all select

    'wellington',6000,1200,120 ,50...

  • RE: Date Range of occurences of consecutive String Values?

    Lowell, I was thinking of row_number() too, but then I saw it was a SQL2000 forum.

    Anyway I don't understand how different "open" rows are related to subsequent operations: can you...

  • RE: Estimation of Query Execution Time

    Uhhh.. wait: maybe you can query sys.dm_exec_query_stats and get statistics for statement you already have executed, something like:

    select b.text, *

    from sys.dm_exec_query_stats as a

    cross apply sys.dm_exec_sql_text(sql_handle) as b

    For stored procedures you...

  • RE: Estimation of Query Execution Time

    I don't think what you are asking is feasable.

    The only thing I remember is a percent_complete and estimated_completion_time in sys.dm_exec_requests, but only for these commands:

    ALTER INDEX REORGANIZE

    AUTO_SHRINK option with ALTER...

  • RE: How to be notified when a insert/update happens?

    It can't be done that simply. There's no such feature in SQL Server. Plenty of workarounds, but no such feature.

Viewing 15 posts - 4,951 through 4,965 (of 5,394 total)