Forum Replies Created

Viewing 15 posts - 56,956 through 56,970 (of 59,072 total)

  • RE: @@rowcount Returns 0

    Not true in a trigger folks... if @@ROWCOUNT is either the very first thing or the first thing after variable declarations, it will identify if any rows have been affected.

    The...

  • RE: Day Range Caluculations

    Thanks Farrell,

    That's a high compliment coming from folks like yourself.

    Vamsi,

    On my way to work so can't answer in detail just now but, I need to know, what are the boundaries...

  • RE: Time Difference

    Nicely done, Robert.

    I'm still waiting for the original poster to definitely describe the datatype of the column he named "TimeStamp" (instead of guessing ).

  • RE: Day Range Caluculations

    Ok, here's some sample code using Michael's function that I renamed as "fnTally" and changed the "Numbers" column to just an "N" to match what I also have in my...

  • RE: Day Range Caluculations

    1) WHERE Name IS NULL - is that specific to your Master.dbo.spt_Values table? 

    It is specific to the Master.dbo.spt_Values table... however, the table isn't "my" table, it's part of...

  • RE: Day Range Caluculations

    Same as above but single column output...

    DECLARE @StartDate DATETIME

    DECLARE @EndDate DATETIME

        SET @StartDate = '01/01/2006'

        SET @EndDate = '10/02/2007'

    PRINT DATEDIFF(dd,@StartDate,@EndDate)+1

     SELECT STR(Number*90+1,4)

          + ' -'

          + STR(CASE

                   ...

  • RE: Day Range Caluculations

    Set based solution... substitute a tally table for spt_Values if you have one...

    DECLARE @StartDate DATETIME

    DECLARE @EndDate DATETIME

        SET @StartDate = '01/01/2006'

        SET @EndDate = '10/02/2007'

      PRINT DATEDIFF(dd,@StartDate,@EndDate)+1 --Just...

  • RE: JOIN screwing things up.

    Nope... not the NULL thing.  My explanation is probably going to sound a little "dated" because I gave up the "GUI world" about 5 years ago when my boss (actually,...

  • RE: Time Difference

    John,

    What is the data type of the column you are calling "TimeStamp"?

  • RE: xp_cmdshell not working with FTP on server

    Where is the "E" drive... on the server or on your local drive?  If it's not on the server, you must use the UNC name back to the path where...

  • RE: select for update vs. UPDLOCK

    Post your cursor and let's see if we can help you get rid of it because it has the biggest and worst impact both on performance and resources.

  • RE: Reading txt file then creating new table

    I might MOVE the file to an "archive" directory, but I wouldn't delete it until I was sure the server had gone through a backup cycle.

  • RE: SQL Server 2000 SP 4 issue with query

    Heh... well done... I'm thinking that if SP4 is so tough on cursors, then I like it a lot

  • RE: JOIN screwing things up.

    FYI... the WHERE 1=1 thing is what a lot of GUI programmers do when writing embedded SQL with dynamic WHERE clauses...  they will always have a valid WHERE clause and they...

  • RE: Question about Execution plan and...hardware??

    Another couple o' things to check...

    1. Are the boxes running the same version/service pack level of Windows Server?
    2. Are the boxes running the same EDITION/service pack level of SQL Server (SQL Server Standard...

Viewing 15 posts - 56,956 through 56,970 (of 59,072 total)