Viewing 15 posts - 991 through 1,005 (of 1,347 total)
Why are you turning NOCOUNT off, when there are statements in there (eg the INSERT INTO) which will generate rowcount messages ?
April 3, 2005 at 5:32 pm
SELECT DISTINCT
CASE
WHEN Member_1 < Member_2
THEN Member_1
ELSE Member_2
END As Member_1,
CASE
WHEN Member_1 > Member_2
THEN Member_1
ELSE Member_2
END As Member_2
FROM YourTable
April 2, 2005 at 1:55 pm
Which 1 of these 2 statements from the initial post & subsequent replies above is actually correct ?
>>The 'recordid' column is an IDENTITY column in both tables.
>>Table D: recordid is VARCHAR(50)
April 1, 2005 at 4:29 pm
Please post the DDL of the tables. It may also help to post the results of using SET SHOWPLAN_TEXT ON, with the 2 alternative queries.
April 1, 2005 at 3:57 pm
This thread is 14 months old ... chances are they have the answer by now
April 1, 2005 at 3:45 pm
If there's no index on EVENT_DATE, you're unlikely to do much better.
If there was an index, this might perform better, depending on the type of index and selectivity etc:
SELECT *
FROM...
April 1, 2005 at 9:53 am
Your query to get data uses a left join but:
>>AND tbl_assignment.resultcode = 'DNS'
You reference the left-joined table in the where clause thereby implicitly converting it to an inner join.
I'm not...
April 1, 2005 at 8:44 am
The set-based solution will scale better to a larger table. It will also translate easily to the new ROW_NUMBER ranking function coming in Sql Server 2005 that will get rid...
March 31, 2005 at 5:53 pm
Why are you using a cursor ?
Select Identity(int, 1, 1) As NewValue,
WorkSitePKEY
Into #Sequence
From WorkSite
Where Cred_ID IS NULL
Update WorkSite
Set Cred_ID = Cast( s.NewValue As varchar(10) )
From WorkSite As w
Inner Join...
March 31, 2005 at 5:33 pm
Are there any triggers defined on table 'Appointment' and are you aware of how that impacts @@IDENTITY and SCOPE_IDENTITY() ifthis is the case ?
Have you tried using SELECT instead of...
March 30, 2005 at 4:20 pm
However ... you can't specify a FillFactor on a heap.
Since you only Update throughout the year, and since those updates are on int columns that don't cause page splitting, you...
March 30, 2005 at 12:26 pm
More differences:
Truncate cannot be used if there are foreign keys referencing the table.
Truncate resets any Identity columns to their Seed value, Delete does not.
March 30, 2005 at 9:36 am
The design isn't "wrong", as long as some assumptions hold true. eg: Can a player be on more than 1 team ? Assumption is No.
Given that:
Select dt.TeamNum, p1.Name As Player1Name,...
March 30, 2005 at 9:13 am
>> And it shouldn't take minutes to retrieve the first row.
That depends on many factors.
An ORDER BY potentially causes the optimizer to select a different query execution plan. Depending on...
March 29, 2005 at 2:00 pm
>>Within the sproc, it hangs at the first fetch after the OPEN CURSOR stmt.
How do you *know* it hangs ? What are you using to diagnose this ? Maybe it's...
March 29, 2005 at 1:28 pm
Viewing 15 posts - 991 through 1,005 (of 1,347 total)