Forum Replies Created

Viewing 15 posts - 361 through 375 (of 4,085 total)

  • Reply To: how to rollback transaction explicitly

    ScottPletcher wrote:

    Certain errors by default won't fail the entire transaction/batch.  Before the transaction, use:

    SET XACT_ABORT ON

    to make SQL fail the entire transaction if an error like that occurs.

    You should get...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: how to rollback transaction explicitly

    You've been around long enough to know that you should use the Insert/edit code sample command.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: SSRS vs Crystal Reports - Report Quality In Terms of Looks

    In my experience, you are correct.  SSRS is the least flexible of the reporting tools that I have used.  This is how I would rank the ones that I have...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: Replacing ALL

    Please use the Insert/edit code sample at the top of the box where you enter text to post.  It retains your formatting.

    Because you didn't use it, your formatting is all...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: T-sQL USing STUFF

    I can do it.

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: T-sQL USing STUFF

    I've seen several posts where people think that STUFF() is doing concatenation, so I'm wondering if the request was really for how to use XML concatenation.  Any sense from the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: get around invalid date

    jcelko212 32090 wrote:

    And if my suggestions are broken, are so bad, why do the recent DATE and DATETIME2(n) data types default to it?

    You're confusing the data layer with the presentation layer. ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: get around invalid date

    Joe, You would take up an ANSI/ISO standard with Microsoft, because they are not complying with the standard and you want them to comply.  Until they do, stop pushing the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: get around invalid date

    jcelko212 32090 wrote:

    3) They are not language dependent

    This is demonstrably FALSE.  You have been told repeatedly that this is false.  If you don't like it take it up with Microsoft.  Until...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: get around invalid date

    Use NULLIF() to replace the -1 with a NULL.  You can then optionally provide a specific date to replace NULL values.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: Same Table Example

    You're using the lazy method of creating a temp table.  Instead of using SELECT/INTO you should be creating the table and then using INSERT/SELECT.

    DECLARE @ProcessID TINYINT =...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: Are the posted questions getting worse?

    Steve Jones - SSC Editor wrote:

    drew.allen wrote:

    But it's easy enough to clean up.  Just REPLACE(REPLACE(@sql, '1=1 AND ', ''), 'WHERE 1=1', '').  So if there are additional conditions, you remove the 1 = 1...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: SQL query to return only voided records unless they exists once

    This site is specifically for SQL Server (T-SQL).  I could tell you how to approach this in T-SQL, but I don't know whether that solution will translate to PL/SQL.

    The T-SQL...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: Are the posted questions getting worse?

    Steve Jones - SSC Editor wrote:

    Thom A wrote:

    OH gods, it has a WHERE 1=1 clause too. ??

    This is likely built dynamically, so the 1=1 provides a basis for the query.

    But it's easy enough to clean...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reply To: Calculating gaps between enrollment segments

    Clean up your code and make sure that it runs.  I stopped trying to fix your code after the third error.  Also use the insert/edit code sample when inserting code. ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 361 through 375 (of 4,085 total)