Forum Replies Created

Viewing 15 posts - 1,516 through 1,530 (of 10,144 total)

  • RE: Are the posted questions getting worse?

    Sean Lange (6/14/2016)


    Luis Cazares (6/14/2016)


    Sometimes I just want to post RTFA(rticle).

    People are given answers with an article that explains the solution, but won't bother reading and keep posting saying...

  • RE: How can i create a view that matches Fig-1 to Fig-2

    bjaricha (6/14/2016)


    You guys are great, thanks very much for your assistance, its working, created the view and all is working.

    Thanks very much have a great day

    Thanks for the feedback!

  • RE: Strange Performance Issue

    davidlester.home (6/14/2016)


    I did eventually get this to work, though it makes little sense. It turns out that dropping all the indexes on the table was the answer. With indexes the...

  • RE: How can i create a view that matches Fig-1 to Fig-2

    bjaricha (6/14/2016)


    Fig - 1

    VersionPeriodAmount

    11356801.88

    21352626.71

    12352626.71

    22348441.86

    13348419.71

    23344224.23

    14344180.63

    24339973.56

    15339909.23

    25335689.6

    35339973.56

    45339973.56

    55335689.6

    16335605.26

    26331372.08

    36335618.49

    46335639.5

    56335639.5

    66335639.5

    Fig - 2

    VersionPeriodAmount

    11356801.88

    22348441.86

    23344224.23

    24339973.56

    55335689.6

    66335639.5

    Need your help thanks

    Except for Period 1, you're choosing the max version per period (which is easy, see below). Why is this? What are...

  • RE: Need help using a Table variable in a dynamic sql query

    Qira (6/11/2016)


    ...

    Please help. As a result, I know - How to use Table variable in a dynamic sql query

    This batch looks horrendously overcomplicated for what it's doing. Why can't you...

  • RE: Temp DB filling on simple update statement?

    Jeff Moden (6/13/2016)


    patrickmcginnis59 10839 (6/13/2016)


    Jeff Moden (5/25/2016)


    krypto69 (5/25/2016)


    Hi,

    I have a pretty simple update statement:

    UPDATE eligibility

    SET primary_plan = 0

    FROM temp_eligibility e

    WHERE eligibility.eligibility_id = e.eligibility_id

    This statement is updating around 7 million rows....

  • RE: Stored Procedure throws Violation of PRIMARY KEY constraint when called concurrently whit same parameters

    Y.B. (6/13/2016)


    That was a great article Gail! Thanks for sharing, It's one of those subtle things most probably learn the hard way.

    So with that in mind here is update...

  • RE: Stored Procedure throws Violation of PRIMARY KEY constraint when called concurrently whit same parameters

    Y.B. (6/13/2016)


    Maybe something like this would be better suited...

    IF EXISTS (SELECT 1 FROM SomeTable WHERE ID = @id)

    UPDATE SomeTable SET SomeText = @SomeText

    ELSE

    INSERT INTO SomeTable VALUES (@ID, @SomeText)

    EDIT: Although this...

  • RE: Creating #Table

    The two queries use different filters on the IDENTITY_MAP table. The first query (database sem5) uses

    d.Name like '%New Denmark%' in the FROM list and

    d.Name like '%New Dmark%' in...

  • RE: T-SQL find unique records

    That's the ticket! Nice job.

  • RE: T-SQL find unique records

    durga.palepu (6/13/2016)


    Thanks for the quick response!!

    However this solution is not serving the purpose.

    meanwhile I have tried and my solution is as followed, the problem with solution is unique record(s) from...

  • RE: Are the posted questions getting worse?

    GilaMonster (6/13/2016)


    Anyone coming to InsideSQL tomorrow?

    There are some amazing dev sessions and I really wanted to go, but it would have meant buying the time off, and being so close...

  • RE: T-SQL find unique records

    Eddie Wuerch (6/11/2016)


    If this is an interview, then 'the needful' means "admit you don't know".

    It's a curious expression isn't it. Never used in US or UK English, it seems to...

  • RE: Row number with Pivot

    Nice one, Luis 😎

  • RE: Row number with Pivot

    If you don't like the PIVOT operator, you could use a cross tab query instead:

    SELECT TOP(50)

    tf.formid,

    tf.formdate,

    x.*

    FROM tbl_forms tf

    CROSS APPLY (

    SELECT

    [field-0-1] = MAX(CASE WHEN tff.filtertype = 0 AND tff.id...

Viewing 15 posts - 1,516 through 1,530 (of 10,144 total)