Forum Replies Created

Viewing 15 posts - 1,546 through 1,560 (of 3,957 total)

  • RE: Are the posted questions getting worse?

    Jeff Moden (8/23/2013)


    Sean Lange (8/22/2013)


    Seems that most of the really "heavy hitters" have not been answering as much either so people like me can come grab the low hanging fruit....

  • RE: Logic to break period of time by month

    mario17 (8/23/2013)


    Dwain,

    trying to reverse eng your super code, is this a place to use Cross Apply ONLY, or could be done with Join.

    I can't get second Cross Apply

    --CROSS...

  • RE: Help with Max function

    Jeff Moden (8/22/2013)


    dwain.c (8/22/2013)


    Sql Student-446896 (8/22/2013)


    I want to get the 10.1 and 10.2 in my output. How do i get that?

    Table A has the columns change_id

    Change_id

    -----------

    1.1

    1.2

    2.1

    2.2

    3.1

    3.2

    10.1

    10.2

    There's about a thousand ways...

  • RE: Left join with duplicate records

    What people are suggesting I generally refer to as "narrowing the JOIN criteria."

    There are a multitude of ways to do it. But the way you choose to do it...

  • RE: and x is NULL <> and x = 'NULL'

    I hate it when OPENROWSET imports a value of ' (empty string in the Excel cell) as an empty string and thus thinks there's extra rows in the input set.

    Have...

  • RE: Programatically ORDERing BY

    How about something like this?

    CREATE TABLE #b1(

    [b1] [int] NOT NULL,

    [b12] [varchar](10) NOT NULL

    ) ON [PRIMARY]

    INSERT #b1 ([b1], [b12]) VALUES (1, N'bob11')

    INSERT #b1 ([b1], [b12]) VALUES (2, N'bob12')

    INSERT #b1 ([b1], [b12])...

  • RE: Are the posted questions getting worse?

    Fal (8/22/2013)


    Speaking of fruit. The missus and I are getting a new kitchen in and are trying to finalise a few issues.

    We were thinking of getting a stone benchtop,...

  • RE: Help with T-SQL Coding Issue, data on different rows

    Knives85 (8/22/2013)


    Hello

    I'm hoping someone can help me , I need to put together a script that will look at different rows in the data

    I having problems creating a case...

  • RE: Help with Max function

    Sql Student-446896 (8/22/2013)


    I want to get the 10.1 and 10.2 in my output. How do i get that?

    Table A has the columns change_id

    Change_id

    -----------

    1.1

    1.2

    2.1

    2.2

    3.1

    3.2

    10.1

    10.2

    There's about a thousand ways in SQL to...

  • RE: Distinct in CTE?

    I more or less agree with sturner that the final query should probably be something like this:

    SELECT [Emp No], [UltiMonth], SUM([Current Amount])

    FROM cte

    GROUP BY [Emp No],[UltiMonth];

  • RE: Assign a unique ID to a group of data that repeats...

    And thank you John for taking the time to let us know you got something you could use out of it.

  • RE: Searching Address by Ranges

    Actually, I've rarely found CTEs to improve performance over similar set-based constructs, e.g., a derived table. All they do is add readability.

    In this case, I wasn't even trying for...

  • RE: Logic to break period of time by month

    mario17 (8/22/2013)


    Is it possible to assign level (count for how many parts (months) it was broken for each ID),

    ...

  • RE: Custom Ranking?

    Not sure why you need to use subqueries. I'd do it with a ranking table.

    WITH Ranking (n, Citation) AS (

    SELECT 1,'Warning'

    ...

  • RE: Logic to break period of time by month

    I believe you can do it something like this.

    with ttt as (

    select 123 Id, DATEADD(d,-10,getdate()) fromDD, DATEADD(d,-3,getdate()) toDD,

    ...

Viewing 15 posts - 1,546 through 1,560 (of 3,957 total)