Forum Replies Created

Viewing 15 posts - 1,261 through 1,275 (of 10,144 total)

  • RE: selecting top rows by counting a variable total

    louise 28346 (8/18/2016)


    thanks Chris

    Its this part

    SELECT 123, 1 UNION ALL

    SELECT 456, 2 UNION ALL

    SELECT 789, 1 UNION ALL

    SELECT 789, 2 UNION ALL

    SELECT 789, 3

    Ive an issue with because my data...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (8/18/2016)


    ThomasRushton (8/18/2016)


    Wow. For the first time in *mumble* years as a SQL guy, I've been asked "how do I get the date in SQL Server"

    erm... SELECT...

  • RE: Compute worked minutes group by hour

    -- sample data setup

    DROP TABLE #MyTable

    SELECT

    POS,

    Employee_ID,

    [Name],

    [Date] = CAST([Date] AS DATE),

    WkTimeStart = CAST(WkTimeStart AS TIME),

    WkTimeEnd = CAST(WkTimeEnd AS TIME)

    INTO #MyTable

    FROM (

    SELECT 18, 96, 'John', '01/07/2016',...

  • RE: selecting top rows by counting a variable total

    -- set up some data to code against

    DROP TABLE #MyTable

    SELECT *

    INTO #MyTable

    FROM (

    SELECT 123, 1 UNION ALL

    SELECT 456, 2 UNION ALL

    SELECT 789, 1 UNION ALL

    SELECT 789, 2 UNION ALL

    SELECT 789,...

  • RE: Execution Plan Question

    Grant Fritchey (8/18/2016)


    ChrisM@Work (8/18/2016)


    Brandie Tarvin (8/18/2016)


    Brandie Tarvin (8/18/2016)


    Ed Wagner (8/17/2016)


    I know this may seem elementary, Brandie, but check the data types of the columns involved in your predicates - in...

  • RE: Execution Plan Question

    Brandie Tarvin (8/18/2016)


    Brandie Tarvin (8/18/2016)


    Ed Wagner (8/17/2016)


    I know this may seem elementary, Brandie, but check the data types of the columns involved in your predicates - in both the JOIN...

  • RE: How to generate sequence number based two columns

    SELECT

    sNo = DENSE_RANK() OVER(ORDER BY [name] DESC, cycleno),

    cycleno, [name]

    FROM #tmp1

    ORDER BY [name] DESC, cycleno

  • RE: Still Confused about the difference between varchar(max) and varchar(8000)

    joshua 15769 (8/17/2016)


    My primary keys are int sirs, But my database columns are all varchar(MAX)

    I would like to thank you both for the great answers, i'm thinking, could I mark...

  • RE: Are the posted questions getting worse?

    tindog (8/17/2016)


    ChrisM@Work (8/17/2016)


    tindog (8/17/2016)


    ChrisM@Work (8/17/2016)


    Luis Cazares (8/17/2016)


    Brandie Tarvin (8/17/2016)


    Eirikur Eiriksson (8/17/2016)


    BrainDonor (8/17/2016)


    ChrisM@Work (8/17/2016)


    We have git hubs all over the UK. They're also known as Weatherspoons.

    You owe me a new keyboard...

    😀

    ...just...

  • RE: Are the posted questions getting worse?

    tindog (8/17/2016)


    ChrisM@Work (8/17/2016)


    Luis Cazares (8/17/2016)


    Brandie Tarvin (8/17/2016)


    Eirikur Eiriksson (8/17/2016)


    BrainDonor (8/17/2016)


    ChrisM@Work (8/17/2016)


    We have git hubs all over the UK. They're also known as Weatherspoons.

    You owe me a new keyboard...

    😀

    ...just managed to...

  • RE: Execution Plan Question

    It sounds like one or more of the join columns are missing from whatever index is chosen, which would go some way to explaining the poor row count estimate and...

  • RE: Are the posted questions getting worse?

    Luis Cazares (8/17/2016)


    Brandie Tarvin (8/17/2016)


    Eirikur Eiriksson (8/17/2016)


    BrainDonor (8/17/2016)


    ChrisM@Work (8/17/2016)


    We have git hubs all over the UK. They're also known as Weatherspoons.

    You owe me a new keyboard...

    😀

    ...just managed to save mine

    😎

    I...

  • RE: Query subtree costs justify parallelism, but it doesn't

    Indianrock (8/17/2016)


    Almost all of our application code is ORM-generated, originally in C# code. ( entity framework type stuff )

    Are you saying the table/column aliases etc actually have a bearing on...

  • RE: Index Usage

    There is a use case for having an ordinary index with the same leading edge column as the clustered index. If your table is very wide (meaning less rows per...

  • RE: String or binary would be truncated error.

    Anandkumar-SQL_Developer (8/17/2016)


    Dear ChrisM@Work / twin.devil ,

    ...

Viewing 15 posts - 1,261 through 1,275 (of 10,144 total)