Viewing 15 posts - 3,226 through 3,240 (of 10,144 total)
pwalter83 (6/23/2014)
... I need to use the following query to get the desired resultset. I think that is where the problem is
If the query you "need to use" doesn't work...
June 23, 2014 at 2:49 am
pwalter83 (6/19/2014)
Sachin Nandanwar (6/19/2014)
SELECT SUM(YourSum) FROM
(
SELECT SUM(CASE WHEN SOA_TYPE = 'Agent' THEN USD_AMOUNT ELSE 0 END) +
SUM(CASE WHEN SOA_TYPE = 'Freight' THEN USD_AMOUNT ELSE 0 END) +...
June 23, 2014 at 1:47 am
Are we good so far?
DECLARE @fromDate DATE = 'Apr 01 2008'
DECLARE @tODate DATE = 'Apr 30, 2014'
DECLARE @NumberOfRecords INT = 6
DECLARE @period VARCHAR(10) = 'monthly' -- (This can...
June 20, 2014 at 8:08 am
KnowledgeSeeker (6/20/2014)
Exactly.
Good. You have some guesses - which is nice.
June 20, 2014 at 7:32 am
Or:
UPDATE t1 SET
P = T.NewP
FROM table_1 t1
CROSS APPLY (
SELECT NewP = ISNULL(MAX(p),0)+1
FROM table_1 t2
WHERE t1.link = t2.link
) t
What can you tell us about the distribution of values...
June 20, 2014 at 7:30 am
pwalter83 (6/20/2014)
Sachin Nandanwar (6/20/2014)
(SELECT SUM(CASE WHEN SOA_TYPE IN ('Agent','Freight','Cost') or AC = '16208'THEN USD_AMOUNT ELSE 0 END) YourSum
FROM...
June 20, 2014 at 7:13 am
KnowledgeSeeker (6/20/2014)
June 20, 2014 at 6:12 am
KnowledgeSeeker (6/20/2014)
June 20, 2014 at 6:01 am
KnowledgeSeeker (6/20/2014)
CREATE TABLE #SampleData
(
BaseYear INT,
TransYear INT,
ClientName VARCHAR(50),
DepID INT,
Revenue, INT,
TransactionDate DATETIME
)
INSERT...
June 20, 2014 at 5:42 am
daniarchitect (6/19/2014)
bitbucket-25253....wasted my time what a response
If Bitbucket's explanation doesn't exactly meet your requirements, then simply ask what you need to know. Rudeness is unnecessary and unprofessional.
June 20, 2014 at 1:40 am
Eugene Elutin (6/19/2014)
...and the example was later extended for use as a TSQL recruiting test.
have you ever tried asking on interview what kind of results the following statement will produce:
SELECT...
June 19, 2014 at 9:50 am
autoexcrement (6/19/2014)
What a fantastic explanation! Thank you so much for taking the time!
You're welcome - but the time was taken a while ago to demonstrate a point to a colleague...
June 19, 2014 at 8:36 am
Eugene Elutin (6/19/2014)
...
-- Query 4
SELECT c.*, o.*, ol.*
FROM #Customers c
LEFT JOIN #Orders o
INNER JOIN #Orderlines ol
ON ol.OrderID = o.OrderID
...
June 19, 2014 at 8:09 am
This might help:
“You have a query which joins two tables, say Customers and Orders. It’s an outer join because you want all customers whether or not they’ve ever placed an...
June 19, 2014 at 1:47 am
This might get you started:
SELECT --DISTINCT
t.transactionID, b.TransDate, b.TransType, b.TransDesc1, b.TransDesc2, b.TransDesc3, b.TransDesc4, b.TransDesc5,
(b.Debit + b.Credit) as Amount,
ISNULL(r.OrthoID, 0) as OrthoID,
ISNULL(t.PatientID, 0) as PatientID,
t.ledgerAmount,
t.LedgerType,
(b.Debit + b.Credit) -...
June 18, 2014 at 9:37 am
Viewing 15 posts - 3,226 through 3,240 (of 10,144 total)