Forum Replies Created

Viewing 15 posts - 316 through 330 (of 475 total)

  • RE: We've all seen it ...

    dwain.c (7/9/2013)

    SELECT TOP 10000000 @Bitbucket=ROW_NUMBER() OVER (ORDER BY (SELECT CAST(0 AS NVARCHAR(MAX))))

    FROM sys.all_columns ac1, sys.all_columns ac2, sys.all_columns ac3

    But oddly it seems to perform in the same approximate time...

  • RE: We've all seen it ...

    dwain.c (7/9/2013)Why doesn't SQL allow the ORDER BY to be optional? In which case it should default to "no ordering."

    I suppose it comes down to the majority of cases...

  • RE: We've all seen it ...

    by the way I had a laugh over the $ controlling the order of things 😀

  • RE: We've all seen it ...

    The only thing I could think of is the size of the datatype used and I don't think that would have any noticeable difference on the speed.

    Having a...

  • RE: SQL Server 2012 Concat

    wolfkillj (7/9/2013)


    Carlo Romagnano (7/9/2013)


    L' Eomot Inversé (7/9/2013)


    Nice straightforward question. Good to see a question about another new feature in SQL 2012.

    However, introducing a weird ODBC function into T-SQL seems...

  • RE: Max of 2 dates

    Hi

    Another one to add to the mix. Not any quicker, but slightly less in the IO stats

    DECLARE

    @StartDate DATETIME2(7),

    @EndDate ...

  • RE: Ranking Based of Advert Breaks

    No problem ... I'm glad it helped. It based on the work of smarter people than me.

    Essentially it came down to a gaps and islands problem. This ...

  • RE: Ranking Based of Advert Breaks

    Hi

    I think the following will do the trick for you

    with adBrandPostion AS (

    select AdDate, AdTime, FK_StationId, brandflag

    ,COUNT(*) OVER (PARTITION BY BrandFlag, FK_StationID, AdDate) NumAds

    ,ROW_NUMBER() OVER (PARTITION BY BrandFlag, FK_StationID, AdDate...

  • RE: Query Help

    Eugene Elutin (7/3/2013)


    SELECT SchoolID

    ,REPLACE(REPLACE(SchoolName, '-',' - '),' - ',' - ') AS SchoolName

    FROM #x1

    Hi

    Unfortunately this will leave double...

  • RE: CPU Flat lines and numerous Time Outs

    Hi

    Not sure if this is anywhere close to what you are experiencing, but recently I saw a situation where a cluster was moved to new (faster and better) hardware. ...

  • RE: A New Look

    I like it ... seems more readable

  • RE: sql query questio

    Hi

    A while back I got told by someone to avoid using additional functions on the XML if possible as they can have a big impact on the performance.

    For example on...

  • RE: Return numbers in a range

    Jeff Moden (6/27/2013)


    mickyT (6/27/2013)


    To be honest I thought it would perform like a dog:-). but using the following setup to test it and using a physical Tally table rather than...

  • RE: Return numbers in a range

    Hi

    Playing around with this, I came up with the following variation

    WITH

    Tens (N) AS (SELECT 0 UNION ALL SELECT 0 UNION ALL SELECT 0 UNION ALL...

  • RE: Append characters in a sentence after certain length

    Here's a recursive CTE method as a iTVF that could work.

    I would like to come up with a none recursive method, but brain fade is setting in and I'm not...

Viewing 15 posts - 316 through 330 (of 475 total)