Forum Replies Created

Viewing 15 posts - 1,066 through 1,080 (of 3,348 total)

  • RE: How to Group By With multiple conditions

    The information you give is quite limited so this is going to require some guesswork. But perhaps this works:

    SELECT CaseStatus, Case_Group, COUNT(CaseStatus) AS CASE_GROUP_TOTAL

    FROM dbo.MCJ

    WHERE Case_Group IN ('INPATIENT', 'Outpatient')

    GROUP BY...

  • RE: referencing same column in same table but coulum has different values

    Julie, from this point on two things can happen.

    One is that me or someonee else, despite the still incomplete information you have given, decides to start guessing what the missing...

  • RE: Flag Values Based on Columns

    Jeff Moden (1/21/2016)


    To be honest, I don't see any bashing occurring except maybe from you ;-).

    You might want to reread Sergiy's second post in this topic. That's the one that...

  • RE: Flag Values Based on Columns

    nm.rajesh (1/17/2016)


    Hi All,

    I Have a Table with the values as shown below :

    IDcode recoIDPostmtsa_m DesiredFlag

    19990104220791236917.2 1

    20000104220791236917.2 1

    34330104220791237017.2 1

    45430104220791237017.2 1

    16560104220791237322.6 0

    26610104220791237322.6 0

    36610104220791237422.6 0

    1661010422079127050.4 ...

  • RE: Flag Values Based on Columns

    Sergiy (1/21/2016)


    MMartin1 (1/21/2016)


    You assume a bit much though. The OP might have a situation where he needs to deliver a result now, and take care of database Normalisation after. We...

  • RE: How to figure out whether data is selected from dirty pages?

    I don't think that's possible.

    Also, even if you know what data is from dirty pages, you still do not have the full picture. Using read uncommitted can also cause data...

  • RE: Are the posted questions getting worse?

    Greg Edwards-268690 (1/21/2016)


    Steve Jones - SSC Editor (1/21/2016)


    Greg Edwards-268690 (1/21/2016)


    It seems he has an elephant on the menu, and a 6 quart pot to cook it in.

    But refuses to start...

  • RE: Are the posted questions getting worse?

    Phil Parkin (1/21/2016)


    Brandie Tarvin (1/21/2016)


    Two years from now he or his successor are going to be very irritated about their design.

    I love a good understatement.

    I get very irritated when we...

  • RE: Edit a Clustered index

    Bill Talada (1/21/2016)


    Without uniqueness, sql is forced to use rowids to find rows on a page.

    Not true. Without a clustered index (i.e., in a heap), SQL Server needs to use...

  • RE: referencing same column in same table but coulum has different values

    You really need to give us more information than this.

    Mike has included a set of two links in his reply to you. Please click them, read them, then follow the...

  • RE: Help with an insert script

    To avoid the duplicates, extend the WHERE clause of whichever version of the query you picked with something like this:

    AND NOT EXISTS (SELECT * FROM fecon2 AS f2 WHERE f2.productcode...

  • RE: How to get records batch wise?

    Small footnote to Mike's solution. This works well when UserID is guaranteed to be unique. Otherwise it is a bit risky. If, for instance, rows #100 and #101 are for...

  • RE: Script to create Triggers

    For the timestamp and user of creation, you can use default constraints.

    For the timestamp and user of last update, you have to use an ON UPDATE trigger. Use the inserted...

  • RE: Are the posted questions getting worse?

    Though I am happy to hear that he feels that he has heard enough to be able to solve it, I am at the same time concerned. Based on his...

  • RE: Are the posted questions getting worse?

    Me, too

Viewing 15 posts - 1,066 through 1,080 (of 3,348 total)