Forum Replies Created

Viewing 15 posts - 25,471 through 25,485 (of 26,487 total)

  • RE: date

    declare @startdate int,

               @enddate  int

    set @startdate = datediff(dd, 0, '19980309') + 36161

    set @enddate = datediff(dd, 0, '20000912') + 36161

    select * from dbo.yourTable where date between @startdate and @enddate

  • RE: date

    First thing we need to know is how the integer date value is computed.  Looking at your data, I have no way of knowing what date 75505 (or any of...

  • RE: Untrappable Errrors

    >> IF Object_ID('tempdb..#fred') IS NOT NULL

    This is where I will agree with you Sergiy.  Using the OBJECT_ID system function is better than using the system table directly.  I will...

  • RE: Untrappable Errrors

    Sergiy,

    I am not going to debate the issue.  There is a fix to the problem encountered by the OP, and it is to test for the existence of the table...

  • RE: Untrappable Errrors

    Sergiy,

    No need.  I put a PRINT statement just before the select, ALTERed the proc (which ran successfully), then executed the proc, and the print statement worked THEN the proc failed. ...

  • RE: SQL Server 2005 Developer version vs Express version

    For professional development, I put my money on SQL Server 2005 Developer Edition.  Very inexpensive, very powerful, and worth the money.  You get the x32 bit version, the x64 bit...

  • RE: SQL Server 2005 Developer version vs Express version

    The Express version is also free, where as the developer edition costs $50.00 (USD).  If you are using it to learn and develop skills, spend the $50.oo and order the...

  • RE: SendMail attachment size limit?

    I think I found the limit to be 1,000,000 bytes.  That was the error I received while trying to send the results of a query to my manager using send_dbmail.

  • RE: Untrappable Errrors

    Actually, the stored procedure is being executed, it fails because the table does not exist.  Here is what I did to get your code to work:

    ALTER PROCEDURE dbo.philproc

    as

    begin

        DECLARE @error...

  • RE: spid 59 (blocking) and spid 9 (blocked by 59)

    It boils down to this, what shrinks also has to grow.  If your database is constantly growing and shrinking, it impacts system performance.  This may not be an issue for...

  • RE: Distributed transaction between 2005 & 2000 failing

    Have you searched this site?  I think there may be a couple of threads that discuss this.  Let me know if you find anything, as I need to look through...

  • RE: Result set of VIEWS not returned SORTED although view has a ''''SORT BY''''.

    This is as expected actually.  A view is a virtual table.  In SQL 2000, the order by declared in a view definition was honored, however, SQL does not guarantee order...

  • RE: date functions

    Just another way to do it.  One benefit, you don't have to know a date in the past that falls on the day you want to start your week on...

  • RE: date functions

    I realized after posting I could remove the modulo calculation (%).  This produces the same result:

    declare @saveDateFirst tinyint,

               @curDate datetime

  • RE: date functions

    This will also work:

    declare

    @saveDateFirst tinyint,

               @curDate datetime,

               @LowerBound datetime,

               @UpperBound

Viewing 15 posts - 25,471 through 25,485 (of 26,487 total)