Viewing 15 posts - 3,136 through 3,150 (of 6,036 total)
You're probably looking for the data in table master.dbo.syscacheobjects
March 16, 2008 at 6:36 pm
Read topic "Cross-Tab Reports" in BOL
March 10, 2008 at 3:22 pm
J, your example does not require cursor either.
Let's assume you have a table holding all your discounts:
[Code]
CREATE TABLE dbo.Temp_Discount (
OrderID int NOT NULL PRIMARY KEY,
Amount FLOAT NOT NULL
)
INSERT INTO dbo.Temp_Discount...
March 9, 2008 at 6:19 pm
And Mike, don't trust much those "Query cost" numbers in QA.
Every time verify it with simple but 100% reliable check:
[Code]
DECLARE @Time datetime
SET @Time = GETDATE()
Set of queries No.1 here
PRINT CONVERT(varchar(20),...
January 31, 2008 at 9:15 pm
Peter, my solution has 3 internal iterations: one per year.
It does not iterate neither over staff members, nor over reviews.
It builds 3 temp tables for each year and joins them...
January 31, 2008 at 4:11 pm
Mike Nuessler (1/31/2008)With the ridiculously small amount of data this is being run on either would work for my purposes.
(for that matter so does my original While..Continue temp table...
January 31, 2008 at 2:36 pm
Mike Nuessler (1/31/2008)I see the table spool as well.
Did you copy HASH JOIN?
January 31, 2008 at 1:25 pm
Peter Larsson (1/31/2008)
That TABLE SPOOL looks nasty to me. And 10 clustered index scans?
I did not have TABLE SPOOL in my test runs.
Are you sure you copied my code as...
January 31, 2008 at 12:42 pm
[Code]...
left join transcriptgpa as t on
p.people_code_id=t.people_code_id
and t.record_type='O'
and t.academic_term='Fall'
and t.academic_year='2007'
where a.academic_term='Spring'
and a.academic_year='2008'
and a.enroll_separation ='enrl'
and a.academic_session='main'
and (a.program ='ft' or a.program='pt')
[/Code]
January 30, 2008 at 5:20 pm
Start Profiler.
Open EM.
Go to Maintenance -> SQL Server Agent -> Jobs.
Create a new job similarto what you wanr to create.
Go back to Profiler and find all scripts EM used...
January 30, 2008 at 4:37 pm
I would start not from performance but from incorrect logic of the trigger.
If 2 or more lines are inserted than ALL rows in the table with serial_fk=@serial_fk and test_fk=@Test_fk and...
January 30, 2008 at 4:23 pm
LEFT join transcriptgpa
And move
t.record_type='O'
and t.academic_term='Fall'
and t.academic_year='2007'
from "WHERE" to "ON"
January 30, 2008 at 2:39 pm
You welcome.
This UPDATE has 2 other imprescriptible parts outside of the sattement itself:
[Code]ORDER BY StaffName, ReviewDate[/Code]
which inserts rows in the table in specific order and
[Code]ID INT IDENTITY(1,1) NOT NULL...
January 30, 2008 at 2:22 pm
WHERE (col3 = @Param1 OR @Param1 IS NULL)
January 30, 2008 at 4:04 am
This returns exactly what you need.
This script uses table Tally which contains sequential integer numbers.
You may create it yourself or search this forum for one of scripts creating it.
[Code]
Create Table...
January 29, 2008 at 3:05 pm
Viewing 15 posts - 3,136 through 3,150 (of 6,036 total)