Forum Replies Created

Viewing 15 posts - 58,546 through 58,560 (of 59,065 total)

  • RE: Seconds to dd:hh:mm:ss

    You certainly don't need a cursor and, if you don't want, you don't need a function... "Trust the force, Luke."

     SELECT CONVERT(VARCHAR(10),SecondsCol/86400)+':'

          + CONVERT(VARCHAR(8),DATEADD(ss,SecondsCol,0),108)

       FROM yourtable

    The forces to...

  • RE: Finding skipped values

    I don't think he meant to be sarcastic... he was just having fun and beat most of us to it.  It's hard to tell in email when someone is joking...

  • RE: spaces in id feild

    It's customary to share your final solution, if you don't mind.

  • RE: Julian to calendar

    Jon,

    David is correct... since Julian dates recycle every 10 years, should we assume that you will never have a future dated Julian date?

    Also, would you rather (recommended) have the date...

  • RE: How to pivot the table in SQL Server?

    David is correct... his link leads to some code I wrote for him to make a "dynamic" cross-tab.  Might have a fat-finger here and there but David wrote and posted...

  • RE: How to pivot the table in SQL Server?

    Jennifer,

    Since you want this done in OLTP instead of OLAP, these are more commonly known as "crosstabs" and they run pretty darned fast especially when compared to a cursor and...

  • RE: Finding skipped values

    With all the good solutions, I feel a little silly posting this but it's nasty fast... and, since a lot of folks keep their Tally (numbers) tables down to something...

  • RE: Best way to stamp records with who created / modified and when?

    Defaults don't work on rows that have already been inserted.  Leaving it up to Developers to remember to include it in code is OK provided the code has to go...

  • RE: CrossTab ''''like'''' Query

    Thanks for the nice things you said, David.  Surprisingly enough, I don't believe you'll find a huge performance gap just because of the use of the Dynamic SQL.  Dynamic SQL...

  • RE: User Defined Functions Investigation

    BWAAAA-HAAAAA-HAAAAAA-HAAAAA!   I just ran the same set of tests on a 4 processor box "real server" with minor traffic for 2,000,000 records using my previous test code and the differences...

  • RE: User Defined Functions Investigation

    Ok, so does that short-term bottleneck stuff explain why my latest test consistently showed that the UDF code was twice as slow as the clear code regardless of the number...

  • RE: Reformat datetime as: mm/dd/yyyy

    Vladan and Sushila are correct... you may also just try finding the first day of the next month and the looking for anything less than that.

  • RE: CrossTab ''''like'''' Query

    Just keep in mind, David... it breaks at 8k... I think that won't happen for quite some time, though.

    Manchester UK, eh?  I've always wanted to see that place... I may...

  • RE: Check if DB is being written

    Exec sp_Locks

  • RE: Best way to stamp records with who created / modified and when?

    Don't fight 'em... don't tell 'em... put triggers on the tables for these.  Most developers don't even know how to spell trigger never mind go looking for them.

Viewing 15 posts - 58,546 through 58,560 (of 59,065 total)