Viewing 15 posts - 5,686 through 5,700 (of 10,143 total)
SELECT
f1, CountOfQ6_BRANCH = SUM(CountOfQ6_BRANCH)
FROM (
SELECT format(WEEK_DATE, "YYYYMM") as f1, Count(Q6_BRANCH) AS CountOfQ6_BRANCH
FROM TBL_AML_ERRORS
GROUP BY format(WEEK_DATE, "YYYYMM")
UNION ALL -- the keyword ALL is important if you don't want to eliminate...
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 11, 2012 at 7:56 am
sqlnaive (9/11/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 11, 2012 at 7:31 am
Using the sample data provided, a simple calculation rCTE works fine with both positive and negative numbers.
DECLARE @AmountToAllocate INT = 21
;WITH Calculator AS (
SELECT
BucketID, TotalSize, Amount,
AmountLeftToAllocate = CASE...
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 11, 2012 at 7:24 am
shani19831 (9/11/2012)
Eugene Elutin (9/11/2012)
) is of smalldatetime data type (we don't know which column...
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 11, 2012 at 3:47 am
jadelola (9/10/2012)
Below is my revised table. Customers 1 and 2 will have 0 left but customer 3 will have 23 left has could only buy 27 units from him. 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 11, 2012 at 3:30 am
dwilliscp (9/10/2012)
Alexander Suprun (9/7/2012)
dwilliscp (9/7/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 11, 2012 at 2:06 am
jared 11265 (9/7/2012)
ChrisM@Work (9/7/2012)
Yvan Bouchard (9/7/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 7, 2012 at 9:19 am
SELECT b.*
FROM #tblBlocks b
WHERE NOT EXISTS (
SELECT 1
FROM #tblBlocks bi
WHERE bi.BlockID = b.BlockID
AND bi.BaseStage = 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
September 7, 2012 at 9:15 am
Yvan Bouchard (9/7/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 7, 2012 at 9:00 am
dwilliscp (9/7/2012)
Michael Valentine Jones (9/7/2012)
You haven't provided enough information for anyone to begin to answer that question.You should just try each way to see which is faster.
The problem 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
September 7, 2012 at 8:38 am
GSquared (9/7/2012)
Sorry for the delay in replying. Been recovering from surgery....
Get well soon, GGeezer.
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 7, 2012 at 7:32 am
KumarSQLDBA (9/7/2012)
getting error while running this statement to store YYYYMM eg.201209 in database int column todatyearmonth.
eg,
convert(varchar(4),year([getdate()])) + convert(varchar(4),month([getdate()]),105) as todayyearmonth
Please help me how to proceed..
error:
Msg 241, Level 16,...
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 7, 2012 at 7:27 am
CELKO (9/6/2012)
.. it doesn't mean that I don't know any basics of data modeling, RDBMS or Date fields [sic] in SQL. I believe this forum is not just for...
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 7, 2012 at 7:22 am
DELETE aa
FROM aa
INNER JOIN bb
ON bb.ID = aa.ID
SET IDENTITY_INSERT aa ON
INSERT INTO aa (Id,Policynumber,date)
SELECT Id,Policynumber,date
FROM bb
SET IDENTITY_INSERT aa OFF
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 7, 2012 at 6:43 am
sqlnaive (9/7/2012)
For such kind of reasons we should avoid float and real datatypes ? And rather use decimal and numeric ?
Have a look in BOL under CONVERT to see which...
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 7, 2012 at 5:50 am
Viewing 15 posts - 5,686 through 5,700 (of 10,143 total)