Viewing 15 posts - 646 through 660 (of 1,132 total)
For a detailed analysis of the various methods see http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=23&messageid=243877#bm245300
For a column MyTs, the fastest method is:
CAST( CAST( ( MyTs - 0.5 ) as integer ) as datetime )
The various...
April 26, 2007 at 10:50 am
"i just want to know how to run the tool in my sql statement"
Quote from Joe Celko:
Q: What is the best kind of rock to drive in wood screws.
A:...
April 26, 2007 at 10:33 am
"has anyone used the Unix2Dos utility? "
Yes.
Note that the fact that the file originates on a UNIX server is important but the fact that server is running Oracle is not...
April 26, 2007 at 9:44 am
Try this:
CREATE TRIGGER dbactivity_t_ia ON dbactivity FOR INSERT
as
set nocount on
set xact_abort on
IF 0 = ( select count(*) from inserted) RETURN
insert into intstamp
(ints_serial,ints_type,ints_id,ints_id_table
,ints_date,ints_time,ints_action,ints_message
,ints_seq,ints_error)
select 0,...
April 25, 2007 at 8:00 pm
There is a solution that is described in Joe Celko's book "Trees and Hierarchies in SQL for Smarties"
ISBN-13: 978-1558609204
set nocount on
set xact_abort on
go
if object_id('tempdb..#temp') is not null drop table...
April 25, 2007 at 2:41 pm
"where's the error check and rollback code that should go with it?"
add at the beginning:
set xact_abort on
April 23, 2007 at 11:19 am
The #Sample is for demonstration purposes only but when it is a base table, ANY reordering process does not work should any other connection perform an insert, update or delete...
April 22, 2007 at 10:27 am
The physically most efficient solution is to use a temporary table with an identity column to be new sort order.
IF OBJECT_ID('tempdb..#Sample') is not null drop table #Sample
IF OBJECT_ID('tempdb..#OrderNew') is not...
April 22, 2007 at 9:58 am
If you use the system tables, then the SQL will NOT be usable with SQL Server 2005.
Instead use the ISO metadata view named INFORMATION_SCHEMA.COLUMNS, which works for 2000 and...
April 20, 2007 at 6:03 pm
under SQL Query Analyzer, run
exec masteer.dbo.sp_helpfile
In the result, does the file name column look like this(two slashes) ?
M:\MSSQL\Data\\master.mdf
If so, then when SQL server was installed, the directory for the system...
April 20, 2007 at 6:00 pm
Began getting the same messsage in early March of 2007 and the error has been occuring about once a week when the cluster keep-alive process has been restarting SQL Server....
April 18, 2007 at 11:35 am
The section "WHERE (p.ActualHold > b.LowerLimit) AND (p.ActualHold b.LowerLimit) AND (p.ActualHold < b.UpperLimit)
April 13, 2007 at 1:05 pm
To create objects that will be owned by a different user, the database role db_ddladmin must be granted. To restrict what objects can be created, you may deny a...
April 5, 2007 at 12:02 pm
For SQL Server 2000 and 2005, here is a SQL batch that inlcudes supports for named instances. It has been tested when SQL Server is running on a cluster...
March 28, 2007 at 2:19 pm
Viewing 15 posts - 646 through 660 (of 1,132 total)