Forum Replies Created

Viewing 15 posts - 556 through 570 (of 650 total)

  • RE: Solving the "Running Total" & "Ordinal Rank" Problems in SS 2k/2k5

    Christian,

    The use of variables in Update statements has always been supported by Microsoft. The full syntax for the original Transact SQL Update statement is...

    [font="Courier New"]

    update [[database.]owner.]{table_name | view_name}

    ...

  • RE: Solving the "Running Total" & "Ordinal Rank" Problems in SS 2k/2k5

    Yes, I'd definitely agree that the 'Quirky update' approach is the right one. I've always used an 'order by' but never tried clustered index/hints to force the order. It seems...

  • RE: Fixing SQL Server

    I spent several years advising a large international manufacturing company on their software-purchasing strategy. It always amazed me how far the software companies, including Microsoft, misunderstood our core requirements. In...

  • RE: If Then logic

    Lowell,

    Thanks so much for noticing. Yes, I wrote the IFCODE version just because I got so damned frustrated with posting SQL code into the new forum software (nothing anyone could...

  • RE: SUN DB

    I suppose it would have to be renamed the SAMP stack, once Sun has done its marketing work. I've always thought of MySQL as the database for people who dislike...

  • RE: If Then logic

    This one would catch both nulls and empty strings, I think.

    [font="Courier New"]

    SELECT  CASE WHEN COALESCE(A.NAME, '') = '' THEN 'unknown'

                 ELSE A.NAME

            END,

            A.age

    FROM    names A

    ORDER BY CASE WHEN COALESCE(A.NAME, '') = '' THEN...

  • RE: Accessing other columns as part of aggregate query

    I think that the derived table you illustrate is the best, safest, and most efficient method. I'd be really pleased to be proved wrong..

  • RE: Running update Stored Procedure from VBS

    There is no message. What you see is generated by SSMS/QA. you can check the return code from the stored procedure in VBS if you want to check for the...

  • RE: Running update Stored Procedure from VBS

    if you just run it on a list of servers and databases in SQLCMD. Then all your errors and status messages can be diverted into one file each. No problems.

    e.g.

    --connect...

  • RE: Running update Stored Procedure from VBS

    Cor. I remember SQL Server 2000

    You can still use the same trick, but the code ain't quite as pretty. In fact it isn't at all pretty. Ken Henderson showed how...

  • RE: Running update Stored Procedure from VBS

    No Jeff. You don't need a cursor for this if you have varchar(MAX). Here is some code that puts all the database users for all the databases in a server...

  • RE: Running update Stored Procedure from VBS

    Jeff,

    It. requires three files and thought it was a bit too long to write up for a Forum entry. The reason I did it was that, by coincidence, Robyn and...

  • RE: Running update Stored Procedure from VBS

    I've just done it in SQLCMD-mode of SSMS, and it works a treat. Normally, doing a script against a number of servers, getting the non-result stuff in SQLCMD is...

  • RE: Finding Current Month's First Day& Last Day

    We've hijacked a thread!

    Yes, my head is swimming. I thought this thread was all about being asked about date calculations during an interview. It is lucky we don't know...

  • RE: When To Use Cursors

    Sorry, I' thought I'd understood that you wanted to save your calculations in the table. Robyn's article would show you how to do that. If you're not quite sure how...

Viewing 15 posts - 556 through 570 (of 650 total)