Forum Replies Created

Viewing 15 posts - 2,791 through 2,805 (of 3,011 total)

  • RE: just the date, please

    The dateadd/datediff method show below is the best way to do it.

    insert into table1 ( change_date )
    select
     dateadd(dd,datediff(dd,0,change_date),0)
    from
     table2
    
  • RE: Command took 40 Min to RUN

    This will convert the date shipped to the first day of the month at time 00:00:00.000

    dateadd(mm,datediff(mm,0,s.date_shipped),0)

    As for the run time, we really don't have enough information about your tables, indexes, constraints, amount...

  • RE: converting date time to a character

    It is a bad design to store a date in a non-datetime column.

    If you are going to change it to anything, change it to a data type of datetime.

  • RE: TSQL question with Datediff

    >>WHERE crt_expiration_date < Convert( varchar, DateAdd( dd, 31, GetDate()), 101 )<<

    This could also fail if the setting of DATEFORMAT is not MDY, which means on systems that are non-US...

  • RE: MSSQLSERVER dependencies

    The services are setup correctly.  SQL Server Agent is not a dependency of MSSQLSERVER, meaning that the SQL Server Agent does not have to be running for SQL Server to...

  • RE: Install SQL Server 7 Eval on WinXP MediaCenter. Is it possible?

    You can do everything in SQL Server 2005 that you can do in SQL Server 7, and much more.  It's basically the same database server engine as SQL 7.0 with 7...

  • RE: Install SQL Server 7 Eval on WinXP MediaCenter. Is it possible?

    Why don't you install SQL Server 2005, instead of SQL Server 7?

    You can buy the SQL Server 2005 Developer Edition for under $50 US, and it has all the functionality...

  • RE: Blackle

     A dark background with white or light letters is best for the visually impaired, because you see light, not dark.

  • RE: Indentifying Recovery Mode via Query Analyzer

    For SQL Server 7.0, run this script.  If you see "trunc. log on chkpt" in the result set, it is not Full Recovery.

    declare @db sysname
    select @db = db_name()
    exec sp_dboption @dbname =...
  • RE: Round to Even (aka Banker''''s Rounding) - The final function

    I’ve seen stupid flame wars on this site, but this is the most ridiculous thread ever.

    Give it a rest. Really.

     

  • RE: Is Maintenance Plan Reindex Appropriate for Large Table?

    For really large tables, you might want to use DBCC INDEXDEFRAG, instead of reindexing.  It's an online operation that can be run while the database is active, and does the...

  • RE: How to observe table growth

    This should do what you want.

    Script to analyze table space usage

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61762

  • RE: DB size

    This query will show you how much unused space you have in each database file.

    Use MyDatabase
    -- Show Size, Space Used, Unused Space, and Name of all database files
    select
     [FileSizeMB] =
      convert(numeric(10,2),round(a.size/128.,2)),
     [UsedSpaceMB] =
      convert(numeric(10,2),round(fileproperty( a.name,'SpaceUsed')/128.,2)) ,
     [UnusedSpaceMB] =
      convert(numeric(10,2),round((a.size-fileproperty(...
  • RE: transact job to kill all connections to a database

    This is the best way to kick everyone, including administrators, out of the database and prevent them from reconnecting.

    use master
    alter database MyDatabase set offline with rollback immediate

     

  • RE: Table size in DB

    You should post your question on a site wherer they answer SYBASE questions.

    You might try the SYBASE forum on dbforumns.com

     

Viewing 15 posts - 2,791 through 2,805 (of 3,011 total)