Viewing 15 posts - 3,136 through 3,150 (of 6,037 total)
Create a new table table_Copy
Copy all data from table to table_Copy except image.
Drop table, rename table_Copy to table.
If you've got some FK or other constraints don't forget to drop and...
_____________
Code for TallyGenerator
March 16, 2008 at 7:11 pm
You're probably looking for the data in table master.dbo.syscacheobjects
_____________
Code for TallyGenerator
March 16, 2008 at 6:36 pm
Read topic "Cross-Tab Reports" in BOL
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
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),...
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
January 31, 2008 at 2:36 pm
Mike Nuessler (1/31/2008)I see the table spool as well.
Did you copy HASH JOIN?
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
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]
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
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"
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
January 30, 2008 at 2:22 pm
WHERE (col3 = @Param1 OR @Param1 IS NULL)
_____________
Code for TallyGenerator
January 30, 2008 at 4:04 am
Viewing 15 posts - 3,136 through 3,150 (of 6,037 total)