Forum Replies Created

Viewing 15 posts - 58,666 through 58,680 (of 58,880 total)

  • RE: Time conversion

    p.s.

    If you are getting a "NULL' as a return, perhaps the code you wrote isn't actually finding what you think.  Post your code and we'll take a look.

  • RE: Time conversion

    Schalk and Antares,

    I test this stuff before I post it and, you are incorrect.   STUFF works just fine on an INT values thanks to implicit conversions.  For example, this...

  • RE: tempdb autogrow issue

    Autogrow = Fragmentation

    As some have already said on this thread, set TempDB to be a reasonably large initial size and set autogrow to100 to 500 mb.  We currently have a...

  • RE: Time conversion

    Since the column is in the format of HHMMSS (even though it's a number),

    For just a pure string representation of the time...

    STUFF(STUFF(run_duration,5,0,':'),3,0,':')

    For a real time as a...

  • RE: Get a Percentage from Integers

    You may experience some "wierd" answers when using FLOAT because it does it's math in a binary rather than decimal fashion.

  • RE: subtraction of column doesn''''t work correctly

    The problem is most likely that the datatype in one of the columns is FLOAT which using binary math instead of Decimal math with some very unexpected results.  Recommend you...

  • RE: how to return result of a query into a dos variable?

    I believe that your outer parenthesis are the problem.  Compare your script tot the previous answer.

  • RE: Inserting into table with one column 1,2,3,4...

    > If you are using this for a one time query, you really will want to do it that way

    ... unless the return is very large in which case you'll...

  • RE: Question About Date Data

    There is if you update other fields along with the "cased" field.  Nulls will be put in the "cased" field.

  • RE: Coding Standards - Part 1

    Just to dispell some of the drum beating on this thread, I've asked 22 different SQL programmers and DBAs in some pretty large companies, some of which were related to...

  • RE: Calculating Work Days

    First, Adam, thanks for the great link.  I took a look at ALL of the scripts including the additional reference to the auxiliary number table and I definitely see your...

  • RE: Can You Compute?

    Very nice.  The graphics you took the time to do the "Alice's Restaurant" thing to really make this a very clear article on what Rollups and Cubes actually do.  The...

  • RE: Calculating Work Days

    Again, lot's of good posts.  Shie, Robert L, Noeld, and Adam have all pointed out that the use of a "Calendar Table" or "Holiday Table" to hold non-workdays (I'm assuming...

  • RE: Calculating Work Days

    Bert,

    Thanks for the great compliment!  As my follow-up note (long posting above) suggests, you can easily add a reference to a simplified holiday table to the function.

    Frank,

    Thanks for the tip. ...

  • RE: convert varchar to int

    As Farrell suggested, you don't need to do the rounding thing because INT will do the rounding for you.

    Either of these will work...

    SELECT CONVERT(INT,CONVERT(MONEY,'27.49'))
    SELECT CAST(CAST('26.50' AS MONEY) AS INT)

    Obviously, you...

Viewing 15 posts - 58,666 through 58,680 (of 58,880 total)