Viewing 15 posts - 1 through 15 (of 42 total)
Dave Ballantyne (6/18/2010)
Since 2 is just a subset of 1 , try something like ...
Sum(case when datediff(mn,DateTimeIn, DateTimeOut) < 60 then 1 else 0 end)
Additionally , you...
June 18, 2010 at 2:10 am
GilaMonster (12/8/2009)
setlan1983 (12/7/2009)
May I know what is the proper way to reduce the log file size?
The proper way is to schedule regular log backups so that the space in...
December 8, 2009 at 3:00 am
Elliott W (12/7/2009)
Is the database configured for full or simple recovery. I'm guessing full..You could do:
DUMP TRANSACTION databasename WITH NO_LOG
GO
DUMP TRANSACTION databasename WITH TRUNCATE_ONLY
GO
That should clear up the log..
CEWII
The...
December 7, 2009 at 11:27 pm
Elliott W (12/7/2009)
I believe DBCC SHRINKFILE is available in SQL 2000.. Look at that..CEWII
Tried, but the size not decreasing... still 12GB :pinch:
December 7, 2009 at 11:03 pm
Jack Corbett (12/1/2009)
If you haven't processed any rows yet then all the rows will be returned.
Hmm... I still not very clear about that.
A temporarily table "@eps" was created to hold...
December 1, 2009 at 6:35 pm
Jack Corbett (11/30/2009)
November 30, 2009 at 11:20 pm
Jack Corbett (11/16/2009)
CREATE TABLE EmployeeQueue
(
...
November 30, 2009 at 7:40 pm
Jack Corbett (11/14/2009)
You'd have to write a windows service, probably use .NET, that reads unprocessed...
November 16, 2009 at 4:25 am
Jack Corbett (11/13/2009)
1. Don't do it this way. You do not want a trigger to have to do anything...
November 13, 2009 at 10:02 pm
CREATE TRIGGER [tr_Emp] ON [Employee]
FOR INSERT
AS
DECLARE
@EmpID varchar(20),
@EmpName varchar(100)
SELECT @EmpID=INSERTED.EmpID, @EmpName=INSERTED.EmpName
FROM INSERTED
BEGIN
SET NOCOUNT ON;
IF @EmpID IS NOT NULL
BEGIN
INSERT INTO [ServerName].[DBName].[Employee] (EmpID, EmpName)
VALUES (@EmpID, @EmpName)
END
END
GO
Is this correct?
November 12, 2009 at 11:29 pm
WayneS (10/8/2009)
setlan1983 (10/8/2009)
But if I want archive the following:
1. "SELECT Sum(SalesAmt) AS TotalSales, COUNT(*) AS TotalTrans FROM DB_A.Sales WHERE...
October 8, 2009 at 9:15 pm
Mark-101232 (10/8/2009)
setlan1983 (10/8/2009)
Mark-101232 (10/8/2009)
setlan1983 (10/8/2009)
Mark-101232 (10/8/2009)
CREATE TABLE Table1 (
column1 int,
column2 int
)
INSERT INTO Table1(column1,column2) VALUES(10,20)
DECLARE @DBName VARCHAR(128)
DECLARE @column1 INT
DECLARE @column2...
October 8, 2009 at 6:19 pm
Mark-101232 (10/8/2009)
setlan1983 (10/8/2009)
Mark-101232 (10/8/2009)
CREATE TABLE Table1 (
column1 int,
column2 int
)
INSERT INTO Table1(column1,column2) VALUES(10,20)
DECLARE @DBName VARCHAR(128)
DECLARE @column1 INT
DECLARE @column2 INT
SET @DBName=DB_Name()
EXEC...
October 8, 2009 at 6:22 am
Mark-101232 (10/8/2009)
CREATE TABLE Table1 (
column1 int,
column2 int
)
INSERT INTO Table1(column1,column2) VALUES(10,20)
DECLARE @DBName VARCHAR(128)
DECLARE @column1 INT
DECLARE @column2 INT
SET @DBName=DB_Name()
EXEC ('DECLARE cur1...
October 8, 2009 at 5:35 am
Elliott W (9/17/2009)
For Case B I would say indexing and tuning sounds right....
September 18, 2009 at 1:32 am
Viewing 15 posts - 1 through 15 (of 42 total)