Viewing 15 posts - 451 through 465 (of 1,228 total)
thomasrichardson2000 (10/11/2012)
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 8:41 am
-- sample data
;WITH
MySample (ID, notes, account1, account2, account3, account4, account5) AS (
SELECT 1, 'notes', 1, 0, 1, 0, 1 UNION ALL
SELECT 2, 'notes', 0, 1, 0, 1, 0...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 8:37 am
Dhirju (10/11/2012)
which is better for performance wise,function or join?
thanks
An inline table-valued function can perform equally as well as a join to tables. If the function has BEGIN/END in it,...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 8:21 am
Do you get different results with/without the DISTINCT?
Here's a reformatted copy of the query. I've added table aliases to make it a little more readable and changed the order of...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 8:15 am
Skanda (10/11/2012)
select record_id,
if Col1= 'Student'
Begin
Insert record_id, Student as Stud into new_table
end
else if Col2 = 'Student'
Begin
Insert record_id, Student as Stud into new_table
end
else...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 7:58 am
What's the UPDATE statement you are using, and is there any reason why it can't include VLoadnoteCarr?
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 7:49 am
Can you make ParentID a non-unique clustered index? It will almost certainly improve performance. Might as well remove the TOP 100 PERCENT too, it's only pretending to do something.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 7:46 am
Skanda (10/11/2012)
hi,as per my requeirement when ever i insert new record, existing record should be deleted.
What denotes "existing record"? How do you identify it?
Why don't you use UPDATE instead of...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 6:50 am
Skanda (10/11/2012)
i want to delete existing records from sql table, after inserting new record.
am using below code...
CREATE trigger Del_records on Active_Table
AFTER insert
as
delete from Active_Table
but it is deleting all records
plz...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 6:43 am
aadharjoshi (10/11/2012)
Thank you all..!I appreciate your help.. Most probably i can remove in clause and use inner join..
Folks here would be happy to help you tune your query. Can you...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 6:27 am
Jason-299789 (10/11/2012)
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 4:55 am
The filter is being applied locally. You could use EXEC with dynamic SQL as Chandan suggests; I'd personally use OPENQUERY, which will also require your statement to be constructed as...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 4:35 am
aadharjoshi (10/10/2012)
eg..
SELECT COUNT(T.CompanyID),
COUNT(UserDataID)
FROM...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 3:02 am
aadharjoshi (10/10/2012)
What OPTION (RECOMPILE, QUERYTRACEON 8649) will do when i add it to query?...
If you suspect you are experiencing performance problems with one or more of your queries,...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 2:58 am
mister.magoo (10/10/2012)
The outline of the logic is to replace the recusive cte with a...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
October 11, 2012 at 2:26 am
Viewing 15 posts - 451 through 465 (of 1,228 total)