Viewing 15 posts - 5,596 through 5,610 (of 10,143 total)
Michael Valentine Jones (9/21/2012)
kingdonshel (9/21/2012)
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
September 21, 2012 at 8:59 am
There's a cautionary note in the CREATE SCHEMA section of BOL;
"Beginning with SQL Server 2005, the behavior of schemas changed. As a result, code that assumes that schemas are equivalent...
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
September 21, 2012 at 8:34 am
Can you post the CREATE INDEX script?
If you're updating the whole table, then nonclustered indexes won't help performance and will impede performance if they too require updating.
Batching the update could...
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
September 21, 2012 at 8:25 am
Big hammer;
DECLARE @asd VARCHAR(20)
SET @asd = 'asdaaaadffa'
SELECT
Letter,
Occurrences = COUNT(*)
FROM (
SELECT Letter = SUBSTRING(@asd,n,1)
FROM (SELECT TOP(LEN(@asd)) n = ROW_NUMBER() OVER (ORDER BY (SELECT NULL))
FROM sys.all_columns) tally
) d
GROUP BY Letter
ORDER...
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
September 21, 2012 at 7:25 am
UPDATE StoreProducts SET Stock = Stock + 2
UPDATE ProdutStorages SET Stock = Stock + 2
How many tables are you updating?
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
September 21, 2012 at 7:16 am
dwain.c (9/21/2012)
egerencher (9/21/2012)
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
September 21, 2012 at 4:42 am
Hunterwood (9/21/2012)
Thanks Chris,I was too quick and missed the inner group by, which is the most likely to give the error...
/Markus
Hey Markus, no problem - it's always good to have...
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
September 21, 2012 at 3:00 am
hoseam (9/21/2012)
I have this query
SELECT
(select REB_TAX_RATE from PR_REB_TAX_RATE
where EFF_DATE = (select MAX(EFF_DATE)
...
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
September 21, 2012 at 2:18 am
dwain.c (9/20/2012)
....But one of those SSNs shouldn't be there!
Gah! I hate it when that happens. Here's a new, completely different version;
;WITH
MyTrans AS (
SELECT TransID,...
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
September 20, 2012 at 9:50 am
dwain.c (9/20/2012)
...I knew someone would come along that knew what they were doing and best me. 😀
Haha! I had no idea that this query would be any faster when 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
September 20, 2012 at 4:45 am
Note that the date arithmetic is still messed up - but I'm bored with making corrections to it because you keep throwing them away. The date arithmetic I posted was...
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
September 20, 2012 at 4:39 am
chinye2020 (9/20/2012)
ChrisM@Work (9/20/2012)
chinye2020 (9/19/2012)
...No,Chris, When the Acc No's Open_balance is null Between the date only change the sql query to before 16-09-12...
how to do that?
Use ISNULL or COALESCE in the...
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
September 20, 2012 at 3:34 am
laurie-789651 (9/20/2012)
ChrisM@Work (9/19/2012)
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
September 20, 2012 at 3:30 am
Simpler, quicker, same results:
SELECT
t.TransID,
c.SSN,
t.TransDate,
t.Amount
FROM #Customer c
INNER JOIN #TransDtl t
ON t.CustKey = c.CustKey
CROSS APPLY (
SELECT Amount = SUM(ti.Amount)
FROM #TransDtl ti
WHERE t.CustKey = c.CustKey
AND ti.TransDate BETWEEN t.TransDate-1 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
September 20, 2012 at 2:59 am
Sean Lange (9/19/2012)
Brandie Tarvin (9/19/2012)
Lynn Pettis (9/19/2012)
Do you ever feel that no matter how many times you tell someone what the problem may be that they just aren't listening?
Yep.
My current...
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
September 20, 2012 at 1:56 am
Viewing 15 posts - 5,596 through 5,610 (of 10,143 total)