Viewing 15 posts - 4,006 through 4,020 (of 10,143 total)
dwain.c (9/9/2013)
Jeff Moden (9/9/2013)
PRINT '========== Another Integer Math Method =========='SET STATISTICS TIME ON;
SELECT @BitBucket = RIGHT(1000000000 + C1*1000 + C2, 9)
FROM #TestTable;
SET STATISTICS TIME...
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 10, 2013 at 1:26 am
I'm sure we can work it out if you can knock up a suitable sample data set. The problem you are facing is that the data you have is already...
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 10, 2013 at 1:11 am
Mark-101232 (9/9/2013)
SELECT DISTINCT
Grp_A, Grp_B, Grp_C,
SUM(Val_A) OVER(PARTITION BY Grp_A,...
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 9, 2013 at 6:46 am
Jeff Moden (9/9/2013)
ChrisM@Work (9/9/2013)
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 9, 2013 at 6:19 am
Try this - but beware, some of your original data is incorrect:
SELECT
EmpID, EarningCode, PayPerPeriod, EQHourlyRate, HoursWorked, Amount, Dept,
nRate = d.NewRate, nAmount = d.NewAmount,
NewRate = CAST(ROUND(sw.NewAmount/HoursWorked,4) AS DECIMAL(10,4)),
NewAmount = CAST(ROUND(ISNULL(sw.NewAmount,d.Amount),2,0)...
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 9, 2013 at 2:18 am
opc.three (9/9/2013)
SELECT FORMAT(GETDATE(), 'MM/dd/yyyy HH:mm:ss')AS [try the FORMAT function available in SQL 2012 and above];
Thanks Orlando, I'll have a play with this at home...
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 9, 2013 at 1:30 am
natalie.ignatieva (9/9/2013)
Jeff Moden (9/8/2013)
I, however, do not consider the fact that it won’t give you an error for an attempted multiple-update on a single row a fault. Nay. ...
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 9, 2013 at 1:28 am
odepriester (9/6/2013)
GilaMonster (9/6/2013)
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 6, 2013 at 7:32 am
odepriester (9/6/2013)
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 6, 2013 at 7:31 am
Are you sure you need a function? I think you need a little nudge in the right direction with APPLY:
SELECT
OFC.CompanyID,
PRAD.ProjectID,
PRAD.ProposalID,
P.ProposalNo,
P.ProposalName,
PRAD.DateAdded,
x.TSP,
x.QSP,
DiscountPercent = x.TSP + x.QSP
FROM ProposalRequestApprovalDetails PRAD
INNER JOIN ProcessProposalApprovalDetailsCLC PDC
ON...
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 6, 2013 at 6:14 am
This link might help.
In your first query, the left join to ActivitiesAdditionalFieldsValues AS TAFV is converted into an inner join when CboValues TCBOV is inner joined to it.
Changing 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 6, 2013 at 6:09 am
It's a nice little setup for augmenting Gail's fine explanation with some tables. Is id_object the PK of the object table, by any chance?
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 6, 2013 at 5:27 am
nfpacct (9/5/2013)
I added 2 new columns - NewAmount and NewRate (The newamount is based on the calculated newrate)
The desired result is the existing Amount Column values to be replaced...
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 6, 2013 at 1:58 am
ChrisM@Work (9/5/2013)
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 5, 2013 at 9:23 am
Sean Lange (9/5/2013)
This thread has now moved to a new one...not sure why.http://www.sqlservercentral.com/Forums/Topic1491832-1292-1.aspx
Thanks Sean - I'll post the same question there. Cheers.
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 5, 2013 at 9:23 am
Viewing 15 posts - 4,006 through 4,020 (of 10,143 total)