Forum Replies Created

Viewing 15 posts - 1 through 15 (of 18 total)

  • RE: WHERE Clause exclusions, best practices.

    May well not apply in your case, but it may be possible to set an additional flag on each record that says if it is to be considered or not.

  • RE: A Tiny Trauma

    Hi Eric and Thomas

    It's a matter of timing.

    In the application as it stands, the ResendLimit says the max times the relevant communication can be resent -...

  • RE: Best way to track "errors" in Stored Procedure

    To expand on Jeff's comment, the following shows information that is available
    BEGIN TRY
    -- Generate a divide-by-zero error.
    SELECT 1/0;
    END TRY
    BEGIN CATCH...

  • RE: A Tiny Trauma

    Thanks Jeff.

    Wow, nearly 1,000,000 points. I am in awe.  Just as well SQLServerCentral didn't use even a smallint for that (and they should watch out if it is...

  • RE: A Tiny Trauma

    Thanks srienstr.
    That was the main option I considered (along with casting within the subtraction).
    I eventually decided against it - less on the overhead grounds - more because I...

  • RE: Is sp_send_dbmail Asynchronous?

    db_send_dbmail returns a mailitem_id immediately (the email is queued to be sent later). Use that to read msdb.dbo.sysmail_mailitems and check sent_status at a later time (values 0-3 in my...

  • RE: Is sp_send_dbmail Asynchronous?

    For me (with 2008 R2) it queues the message (and this makes logical sense to me).

    Anyway, when you call send_dbMail, if it all is basically OK you get...

  • RE: Logging options while running stored procedure

    A simple way to get around the issue of modified_on and modified_by causing records to expand is
    a) Use an ID for people (e.g. an int) so it is always...

  • RE: Reporting by date - DateTrunc

    Perhaps I'm misunderstanding how I should use the variant of the function you suggest.

    Here is an example of how I would expect my version to be used, in...

  • RE: Reporting by date - DateTrunc

    I'm not sure what you'd expect the function to return when the number is not a divisor of the number of units in the implied containing period.

    For example,...

  • RE: The Floor

    Considering the underlying problem - how do we get the integer value nearest to 0  - I would use cast.
    select cast(123.45 as int), cast(-123.45 as int), cast(123.89 as int),...

  • RE: Records common in both tables

    If the tables have multiple columns and you want to count where all columns match


    select count(*) from (
    select * from dbo.c_scope
    intersect
    select *...

  • RE: Your Favorite Feature that Needs Work

    I also use Netezza. There are some areas where it is much more user-friendly, for example:

    1. In a query use alias names you just created. Example:...

  • RE: Username increment by 1 if already exists in table

    You need to start with a sound design, thinking through the possible issues, then implement it.

    The first design, with a suffixed number, is basically fine in principle. It will...

  • RE: Converting to data-driven code

    The use of Upper comes from an implementation of this on a different database that is case sensitive (Netezza) and a bit of (buggy) transcription. Whilst of course the...

Viewing 15 posts - 1 through 15 (of 18 total)