Forum Replies Created

Viewing 15 posts - 2,986 through 3,000 (of 3,008 total)

  • RE: SQL 2005 Standard Edition Memory Management

    Are you using 32-bit OS or a 64-bit OS?

     

  • RE: How Do I Restore 1 Database To Another?

    When you restore database 2, you cannot use the same physical filenames as database 1.

    You will have to specify new physical file names for database 2 using WITH MOVE in...

  • RE: Problem Restoring Over Existing DB

    Thes fastest way to get everyone out of the database before restoring over it is to execute this command

    alter database MyDatabase set offline with rollback immediate

    This will kick everyone out,...

  • RE: AWE check

    Whenever you run a SQL Server backup or transaction log backup, it will generate a large amount of paging as data is loaded into the file system cache before it...

  • RE: Finding values with cents...

    I use it any place that you might use a number table.  It's fast enough that I see little need for keeping a permanent number table.  I like being able...

  • RE: Finding values with cents...

    I think the tests done already are getting overwhelmed by the overhead of looping.

    I used a different methodology to test.  I loaded a table containing a single money column with...

  • RE: Finding the last day of the PERIOD

    Obviously what Lindsay said in the post you quoted is wrong, he probably meant Dec 31 to Jan 6 is week 14, not Jan 31 to Jan 6.

    Maybe they are following a...

  • RE: Automatic restore available?

    Just do this.  It will kick everyone out of the database, and they will not be able to reconnect, because it will not be available.

    Alter database MyDatabase set offline with...

  • RE: Finding the last day of the PERIOD

    Since you didn't supply any rules for how we could determine what the Fiscal Periods are, I gave you the best I could under the circumstances.

    I don't understand why it...

  • RE: Finding the last day of the PERIOD

    Try this:

    select
    a.[Date_Idx],
    [IsLastDayofPeriod] =
    case when a.[Date_Idx] = b.[LastDayofPeriod] then 1 else 0 end
    from
    [dbo].[DimDate] a
    join
    (
    select
    bb.[FiscalYear],
      bb.[FiscalMonthOfYear],
      [LastDayofPeriod] = max(bb.[Date_Idx])
     from
       [dbo].[DimDate] bb
     ) b
     on a.[FiscalYear]  = b.[FiscalYear] and
      a.[FiscalMonthOfYear]= b.[FiscalMonthOfYear]
     
  • RE: Finding the last day of the PERIOD

    It would be a lot easier to help you if we knew the data structure and contents of the tables you are talking about.

    Could you post the DDL for the...

  • RE: starting a job on another server?

    You're welcome, Veteran!

     

  • RE: last record

    Write a SELECT statement that has a WHERE clause with selection criteria that gives you the row that is "last" by your definition.

    There is no inherent last row in a...

  • RE: Cursor needed to relate different records?

    This seems to work OK:

    declare @t table 
    (
     MachineID INT NOT NULL, 
     EventID INT NOT NULL,
     State varchar(3) NOT NULL,
     PRIMARY KEY CLUSTERED (MachineID ,EventID)
    )
    -- Load on/off state transition events
    insert into @t
    select
     x.MachineID,
     x.EventID, 
     State...
  • RE: Finding Primes

    Ryan, I modified your script to use INT temp tables, instead of BIGINT, and got almost an 18% reduction in runtime.  The following is the result of finding all primes...

Viewing 15 posts - 2,986 through 3,000 (of 3,008 total)