Forum Replies Created

Viewing 15 posts - 46 through 60 (of 284 total)

  • RE: Converting integer to time

    Jeff Moden (8/27/2008)


    Heh... or use a tremendously underutilized bit of code that starts with "--" 😉

    Do I hear an "Amen!"?

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: How can I calculate how many mussels have been shucked?

    Jeff Moden (8/27/2008)


    I'll probably have a million row table in tow kinda like Tom did...

    I'll make you a deal. You don't call me Tom and I won't call you Jef....

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: How can I calculate how many mussels have been shucked?

    rbarryyoung (8/27/2008)


    ...Noel's query (and I think that yours is the same) is assign the count difference to the wrong time/record. It is supposed to be assinging the count difference...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: How can I calculate how many mussels have been shucked?

    rbarryyoung (8/27/2008)


    Yeah, I've been playing around with a version like that one, Noel. Except that I think that you have the A's & B's reversed: you are reporting...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: How can I calculate how many mussels have been shucked?

    To really make a test, I loaded up the table. After loading in the first 25 rows of the supplied data (I left out the rows that didn't change amounts),...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: How can I calculate how many mussels have been shucked?

    Jeff, you are correct. However, I have to avoid things like CTEs. Not because I have anything against them but because 90% of my dbs are still SS2k, not to...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Converting integer to time

    jofa (8/27/2008)


    The expression

    TimeNumber/10000*3600 + (TimeNumber%10000)/100*60 + TimeNumber%100

    can be simplified to

    TimeNumber - TimeNumber/100*40 - TimeNumber/10000*2400

    Actually, the code was "60 * 60" not "3600", meaning 60 minutes per hour times 60 seconds...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Converting integer to time

    I don't know if this is any faster than Jeff's (he being the King of Nasty Fast), but it doesn't use any string manipulation (which I try to avoid if...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: How can I calculate how many mussels have been shucked?

    Here is my contribution:

    declare @ShiftCountersRawData table(

    RecID int IDENTITY(1,1) NOT NULL,

    ...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: creating calculation scripts

    john.arnott (8/22/2008)


    Does your solution depend on the temp table being read back in the same order in which it was loaded? That "gotcha" would have to be avoided at least...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: 3 or more purchases over a 12 month period

    Interesting problem.

    declare @Table table(

    RowID int Identity(1,1),

    CustNo ...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: creating calculation scripts

    declare @Table table(

    ID int not null,

    Dep money,

    Accum ...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: DBA as commodity in future

    I've always said that if I was charged with developing a top-notch Accounting application, I would hire a top-notch Accountant who knew squat about programming and a top-notch Programmer who...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: DBA as commodity in future

    SQL Noob (8/21/2008)


    common sense would say that if you create a table that will hold thousands of rows you need an index or two

    Why? I'm assuming the table had a...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: DBA as commodity in future

    You looked just at the "create table" script and decided that the table needed indexes? That is impressive. I generally have to look at the queries to make that determination.

    And...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

Viewing 15 posts - 46 through 60 (of 284 total)