Viewing 15 posts - 61 through 75 (of 239 total)
It looks like there is a lot of Parallelism going on. Try adding OPTION (MAXDOP 1) to the end of the query and see if that changes anything.
June 1, 2006 at 9:33 am
A couple of things:
How many rows are in each table? Are being inserted?
How are you running it when it takes 6 hours to run? 1 minute to run?
Remove 'AND PTY_Party_Code...
May 31, 2006 at 4:58 pm
A table modifier is allowed in the assignee side of an update. The following works perfectly well.
DECLARE @table1 TABLE (id int, data varchar(5) null)
INSERT @table1 values(1, null)
INSERT @table1 values(2, null)
DECLARE...
May 31, 2006 at 4:34 pm
Try this:
DECLARE @Table1 table(BP_Period int, Matter_Code int, BP_At_Time int NULL)
INSERT @table1 values(200301, 640559, NULL)
INSERT @table1 values(200402, 640559, NULL)
INSERT @table1 values(200503, 640559, NULL)
INSERT @table1 values(200504, 640559, NULL)
INSERT @table1 values(200605, 640559, NULL)
INSERT...
May 31, 2006 at 4:27 pm
This will work but I don't know how it will perform with a large number of rows in the transaction table.
DECLARE @begbal TABLE (customer varchar(20), balance int, baldate datetime)
insert @begbal...
May 31, 2006 at 4:11 pm
It's always there for each query window. From left to right, the status bar reads:
Ready | servername | login(SPID) | Database | query time | rowcount | cursor position
May 10, 2006 at 10:20 am
Try something like this to avoid cursors:
--create tables
create table source(username varchar(255) PRIMARY KEY, firstname varchar(255), lastname varchar(255), address varchar(255))
create table person(personid int PRIMARY KEY, username varchar(255), firstname varchar(255), lastname varchar(255),...
May 10, 2006 at 10:16 am
Repost this to the correct forum if you want help. This is the SQL 2000 Newbies forum.
May 9, 2006 at 11:53 am
Try this:
create table lut ( id1 INT, id2 INT )
insert lut (id1,id2) values (1, 1)
insert lut (id1,id2) values (1, 4)
insert lut (id1,id2) values (1, 5)
insert lut (id1,id2) values (2, 2)
insert...
May 9, 2006 at 11:49 am
This may help solve your problem without using a loop and using data normalization to not duplicate data.
--Build a table of numbers, you may want to make it a real...
May 8, 2006 at 2:15 pm
If GID changes is unique to a row, then you can use the following:
declare @Input table(gid int, sname varchar(50), fname varchar(50))
insert @Input values (1, 'Mathew Levey', 'Mark Bell')
insert @Input values...
May 8, 2006 at 1:15 pm
SQL never guarantees the order unless an ORDER BY clause is used. The order that they are entered or in the table is not guranteed. Given your data, what would you...
May 8, 2006 at 1:09 pm
I believe the following will work. You'll have to substitue your getmonthstart function where necessary.
declare @Historical table(startdate datetime, account varchar(50), amount money)
declare @Future table(startdate datetime, account varchar(50), amount money)
insert @Historical...
May 8, 2006 at 1:05 pm
Try this:
declare @Input table(gid int, sname varchar(50), fname varchar(50))
insert @Input values (1, 'Mathew Levey', 'Mark Bell')
insert @Input values (1, 'San Gordon', 'Mark Bell')
insert @Input values (1, 'Larry Gomes', 'Mark Bell')
insert...
May 8, 2006 at 9:34 am
Does this help:
SELECT case when floortotal <> 0 then fnWTRalldata.floortotocc / fnWTRalldata.floortotal
else 0 end AS floorspaceperc,
case when floortotal <> 0 then (fnWTRalldata.NetRent / fnWTRalldata.FinalRtLsincSC) - 1
else...
May 8, 2006 at 9:27 am
Viewing 15 posts - 61 through 75 (of 239 total)