Viewing 15 posts - 2,791 through 2,805 (of 3,011 total)
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
July 6, 2007 at 8:23 am
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...
July 4, 2007 at 7:07 pm
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.
July 3, 2007 at 2:23 pm
>>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...
July 3, 2007 at 9:19 am
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...
July 2, 2007 at 7:58 am
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...
June 29, 2007 at 8:10 pm
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...
June 29, 2007 at 3:39 pm
A dark background with white or light letters is best for the visually impaired, because you see light, not dark.
June 29, 2007 at 2:26 pm
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 =...
June 29, 2007 at 2:07 pm
I’ve seen stupid flame wars on this site, but this is the most ridiculous thread ever.
Give it a rest. Really.
June 29, 2007 at 1:55 pm
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...
June 29, 2007 at 10:00 am
This should do what you want.
Script to analyze table space usage
June 28, 2007 at 7:02 am
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(...
June 27, 2007 at 9:35 am
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
June 26, 2007 at 2:32 pm
You should post your question on a site wherer they answer SYBASE questions.
You might try the SYBASE forum on dbforumns.com
June 26, 2007 at 10:13 am
Viewing 15 posts - 2,791 through 2,805 (of 3,011 total)