Forum Replies Created

Viewing 15 posts - 5,941 through 5,955 (of 10,144 total)

  • RE: Are the posted questions getting worse?

    SQL Kiwi (8/2/2012)


    Fal (8/2/2012)


    Well, being a Kiwi he does live in the land of Mordor. 😛

    True; see the picture below of two hobbits winning our first gold medal in...

  • RE: Running Total

    Hi Jay

    We use VS2010Ultimate/AnkhSVN/SSDT for development here so I'm reasonably familiar with it - yet I'm not sure what you are trying to do or why. If you want to...

  • RE: Implementing Surrogate Key

    shahsn11 (8/2/2012)


    How to implement surrogate key ?

    CREATE TABLE MyTable (

    MyTableID INT IDENTITY(1,1) PRIMARY KEY,

    .

    .

    .

  • RE: T-SQL Advice on Update Statement Needed

    Sometimes, just occasionally, when the target table isn't the first table listed in the FROM list, SQL Server gets its knickers in a twist. Try this:

    UPDATE ceh

    Set AEarned 1 =...

  • RE: Is there an joiner much like the 8kSplitter?

    anthony.green (8/2/2012)


    Thanks Lynn for Chris's modified function.

    Both that function and the one in the DB backup I provided both execute in the same amount of time.

    Anthony - "Chris's modified function"...

  • RE: trying to add alias for value generated by Where clause

    XMLSQLNinja (8/1/2012)<<snip>>

    Each of these guys will blast through several hundred thousand rows in seconds. QU is still new to me and I'm playing around with it - it is usually...

  • RE: Is there an joiner much like the 8kSplitter?

    Lynn Pettis (8/1/2012)


    ChrisM@Work (8/1/2012)


    Lynn Pettis (8/1/2012)


    I made a slight change to the function Chris wrote...

    😀 😀

    Take this as a "seal" (imagine a picture of a seal here) of approval? ...

  • RE: Is there an joiner much like the 8kSplitter?

    Lynn Pettis (8/1/2012)


    I made a slight change to the function Chris wrote...

    😀 😀

  • RE: Is there an joiner much like the 8kSplitter?

    anthony.green (8/1/2012)


    Chris,

    Just a simple execute the two views, the original came back in 12 seconds, yours was over 2 minutes.

    I get around 15-60ms for either using the backup...

  • RE: Is there an joiner much like the 8kSplitter?

    How did you time the runs, Anthony?

  • RE: Is there an joiner much like the 8kSplitter?

    This function runs about 25% faster:

    -- =============================================

    -- Author:<Author,,Name>

    -- Create date: <Create Date,,>

    -- Description:<Description,,>

    -- =============================================

    ALTER FUNCTION [dbo].[GetCIDs]

    (@SID INT)

    RETURNS @Result TABLE (LongCID VARCHAR(8000))

    AS

    BEGIN

    DECLARE @Accumulator TABLE (seq INT, CID INT);

    INSERT INTO...

  • RE: Running Total

    jerome.morris (8/1/2012)


    Chris M do I need to give more information ?

    I can see the finish line almost 🙂

    I'm sorry Jerome, looks like you need a c# developer to help with...

  • RE: Count Per Hour By User By Day

    texpic (8/1/2012)


    That gets me the first report. Is there a way to dynamically create this report from those results? There would be more time periods and more users.

    date...

  • RE: Count Per Hour By User By Day

    SELECT Dept, UserId, x.[date], x.[Hour], COUNT(*)

    FROM #CountsPerHour

    CROSS APPLY (

    SELECT

    [date] = DATEADD(dd,0,DATEDIFF(dd,0,StartTime)),

    [Hour] = DATEPART(hh,StartTime)

    ) x

    WHERE Dept <> 2

    AND StartTime >= @DateStart -- NOTE >=

    AND...

  • RE: trying to add alias for value generated by Where clause

    Koen Verbeeck (8/1/2012)


    ChrisM@Work (8/1/2012)


    polkadot (7/31/2012)


    ... I need an alias for the column the WHERE STATEMENT generates...

    The WHERE clause doesn't generate an output column. Ever.

    There are four well-known ways to...

Viewing 15 posts - 5,941 through 5,955 (of 10,144 total)