Viewing 15 posts - 2,641 through 2,655 (of 10,143 total)
ramrajan (2/11/2015)
Can anyone please rewrite this query for good performance with INNER joins.
SELECT
...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 11, 2015 at 9:13 am
Debbie Edwards (2/11/2015)
I have come across a niggle that I cant seem to resolve.
I have a number field and my report is ordered against it. However, When I looked I...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 11, 2015 at 5:30 am
New Born DBA (2/6/2015)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 9, 2015 at 3:44 am
Sioban Krzywicki (2/4/2015)
Grant Fritchey (2/4/2015)
Sioban Krzywicki (2/4/2015)
Some of it is probably the sport you're focusing on. Two of the sports were football and field events (shot put, discus, javelin). It...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 5, 2015 at 7:09 am
Grant Fritchey (2/5/2015)
ChrisM@Work (2/5/2015)
Grant Fritchey (2/4/2015)
SQLRNNR (2/4/2015)
Grant Fritchey (2/4/2015)
Sioban Krzywicki (2/4/2015)
Some of it is probably the sport you're focusing on. Two of the sports were football and field events (shot...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 5, 2015 at 5:53 am
Grant Fritchey (2/4/2015)
SQLRNNR (2/4/2015)
Grant Fritchey (2/4/2015)
Sioban Krzywicki (2/4/2015)
Some of it is probably the sport you're focusing on. Two of the sports were football and field events (shot put, discus, javelin)....
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 5, 2015 at 3:52 am
dwain.c (2/4/2015)
This illustrates the problem.
CREATE VIEW dbo.Test
WITH SCHEMABINDING
AS
SELECT
RecordLastChangedDateKey=20150204,
x=CAST('20150204' AS DATE) ;
GO
CREATE UNIQUE CLUSTERED INDEX IDX_t1 ON dbo.Test (RecordLastChangedDateKey, x);
GO
SELECT *
FROM dbo.Test;
GO
DROP VIEW dbo.Test;
Perhaps this solves it?
CREATE VIEW dbo.Test
WITH...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 5, 2015 at 1:50 am
Byzza (2/3/2015)
I have 2 tables - 1...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 4, 2015 at 6:17 am
theboyholty (2/4/2015)
ChrisM@Work (2/4/2015)
SELECTRecordLastChangedDateKey,
CAST(CAST(RecordLastChangedDateKey AS CHAR(8))AS DATE)
FROM (SELECT RecordLastChangedDateKey = CAST(20150204 AS INT)) im
Thanks but its still giving me the message "The view contains a convert that is imprecise...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 4, 2015 at 6:04 am
theboyholty (2/4/2015)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 4, 2015 at 5:55 am
SELECT
d.Fullname,
Lastname = LEFT(d.Fullname, pos1-2), -- -2 removes the comma, could use REPLACE
FirstName = SUBSTRING(d.Fullname, pos1+1, (pos2-pos1)-1),
MidddleName = SUBSTRING(d.Fullname,pos2+1,8000), -- could use REPLACE to remove period
x1.*, x2.* -- included...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 4, 2015 at 5:37 am
-- Before attempting to fix the results set of your query,
-- you might want to do some remedial work on the components of it.
-- Here's a little sample set...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 4, 2015 at 3:51 am
It's easy once you've worked through your first example. Here's another article written by Jeff Moden:
http://www.sqlservercentral.com/articles/Crosstab/65048/%5B/url%5D
A couple of minor changes to your query which may make the job easier:
SELECT --...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 3, 2015 at 8:15 am
Resender (2/2/2015)
I always do
WHERE 1 = 1
I can't remember where I picked this habit up and I'm one...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 2, 2015 at 9:49 am
Your query isn't properly formed, the subquery (timesheets join employeemaster) isn't correlated with the UPDATE target leavehoursearned.
Start by writing a SELECT query which correctly joins all three tables and...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 2, 2015 at 6:54 am
Viewing 15 posts - 2,641 through 2,655 (of 10,143 total)