Forum Replies Created

Viewing 15 posts - 1,336 through 1,350 (of 4,081 total)

  • RE: Quickshift (100% - 200% performance increase????)

    Robert, I am saying this seriously and not sarcastically. I question some of your assumptions about SQL if you think that high CPU cycles are a good...

  • RE: Arithmetic Calulation

    Again, this sounds like spreadsheet work. You have no attributes to your define your sets for calculation other than Row #1, Row #2, Row #3. Are...

  • RE: Arithmetic Calulation

    If you know the number of columns, then you know how many sum() statements to generate. In your example above:

    insert into tbl_a

    select 4, sum(amt1), sum(amt2), sum(amt3), sum(total)

    from tbl_a

    However,...

  • RE: Relate the values

    Is there ever a possibility of circular references?

    For example

    INSERT @MyRelations

    SELECT 'ADF1', 'BFSA9' UNION

    SELECT 'BFSA9', 'CAAAAA@AS' ...

  • RE: VARCHAR to DATE

    Declare @sample table (data varchar(30))

    insert into @sample

    select 'ERC2009Q1' union all

    select 'LRC2009Q4' union all

    select 'C2009Q3' union all

    select 'TRC2009Q2' union all

    select 'ETHYR2009Q1' union all

    select 'TTSERC2009Q1'

    select right('0'+cast(right(data,1)*3 as varchar),2)+'/01/'+left(right(data,6),4)

    from @sample

    I don't understand why...

  • RE: Eliminating Duplicates

    select max(E) as E

    ,max(F) as F

    ,max(G) as G

    ...

  • RE: Are the posted questions getting worse?

    Ah... another kilt-wearer heard from. 😀

  • RE: Pre-Aggregated Tables - Weekly Inventory

    You're welcome. For what it's worth, you should test both of the solutions at production volumes. The ROWNUMBER() solution I gave you has...

  • RE: Need help on TSQL

    Truth... I am so ashamed.

  • RE: Quickshift (100% - 200% performance increase????)

    Robert, I am posting this as a public apology. Because the title of your post struck me as an advertisement, I jumped on it and that was rude....

  • RE: Are the posted questions getting worse?

    Tom.Thomson (9/24/2010)


    I guess I should use pm and not the thread if I want to start that sort of discussion. Sorry.

    Tom, after a good night's sleep and my first...

  • RE: Are the posted questions getting worse?

    Paul White NZ (9/24/2010)


    The Dixie Flatline (9/23/2010)


    I just reported you to Steve for this Jason. I hit the "Report" button instead of "Quote" by mistake, but then...

  • RE: Need help on TSQL

    Chris Morris-439714 (9/24/2010)


    The Dixie Flatline (9/24/2010)


    Interestingly, Bob's query, while undeniably compact, still scans the source table twice.

    You fail to ascertain that performance was not my primary design criterion. 😛

    Bob,...

  • RE: Need help on TSQL

    Hey, Chris started it. 😀

  • RE: Pre-Aggregated Tables - Weekly Inventory

    ;with cte as (

    select DATEPART(WEEK,CAST(DateID AS varchar)) as [week], -- why is your dateID stored as an int?

    DATEPART(YEAR,CAST(DateID AS varchar)) as [year], -- best practice is to name...

Viewing 15 posts - 1,336 through 1,350 (of 4,081 total)