Forum Replies Created

Viewing 15 posts - 11,341 through 11,355 (of 18,923 total)

  • RE: Noon and Midnight (NOT 12 pm and 12 am)

    So what are you gonna do Friday night at midnight ?

  • RE: Need help with a simple query

    Don't be sorry... we were all there at some point in our career.

  • RE: Need a fresh approach to something quite simple

    The convert in the select is very minor because it won't affect the query plan (data access wise).  It'll take a few cpu cycles to do the converts, but I...

  • RE: Finding the Next Business Day Recursively

    Hey Joe, don't you feel like you are talking for nothing sometimes???

     

    Guys, Joe literally wrote the book on SQL, he wrote the ISO standards for SQL.  I would strongly suggest...

  • RE: Need a fresh approach to something quite simple

    Let the application worry about that... unless you have loads of different reports using that query.  You could centralize the code.  The convert in the select part only shouldn't slow...

  • RE: UPDATE

    The sliding window was used to do something slightly different but it can be modified for this case.  This is untested and from the top of my head :

    create...

  • RE: Maximum Count By days

    Didn't I say that I didn't check the query?!?  I was assuming it was giving the correct results but that he needed only one row.

     

    Also I may suggest that you...

  • RE: Maximum Count By days

    And the max value in all of this??

  • RE: UPDATE

    Agreed... but we don't know the froms and tos of the update so we would just be speculating at this point.

     

    Also the sliding window method doesn't have that limitation

  • RE: Maximum Count By days

    Unoptimized :

    SELECT TOP 1 COUNT(EmployeeID), dbo.GetDatePortion(StartTime)

    FROM dbo.TimeClock

    WHERE StartTime > '2006-10-01' AND startTime < '2006-11-01'

    GROUP BY dbo.GetDatePortion(StartTime)

    ORDER BY COUNT(EmployeeID) DESC

  • RE: UPDATE

    Not if you index the column.  You can also use the slidding window trick (just search these forums to find it).

     

    Also the idea behind this technic is that you don't...

  • RE: schedule a stored procedure

    Sql server enterprise manager, yourserver / gestion / Sql server agent / jobs

    Create a new job.  From there just check around and you'll see how to make everything work.

     

    If you...

  • RE: To Moderators...

    Good idea but I don't think that there are any moderators on tis site... other than the owners who mainly maintain the site and post editorials.

  • RE: UPDATE

    You might also consider adding a waifor in the loop to let other transactions execute on the table.

    Depending on the update you need to do and the power of the...

  • RE: listing contents of Store Procedures?

    Happy to have almost helped .

Viewing 15 posts - 11,341 through 11,355 (of 18,923 total)