Viewing 15 posts - 991 through 1,005 (of 1,243 total)
Sean Pearce (6/19/2014)
mod: removed dead link
Do you mind if I borrow that?
June 19, 2014 at 6:37 am
TomThomson (6/18/2014)
BWFC (6/18/2014)
I disagree there. It doesn't say that all on site databases are 2012, it says that uses 2012. That doesn't preclude there being...
June 18, 2014 at 1:01 pm
SELECT distinct
q.Description
,SUM(q.Amount) OVER (PARTITION BY q.Description)
FROM #Question q
It might be worth you trying to create some sample data that's closer to what you actually have. You can do...
June 18, 2014 at 8:26 am
And another thing!!!
the cloud is the more likely given that the company is progressive enought to have everything on site running SQL 2012
The company I work for is constantly employing,...
June 18, 2014 at 8:11 am
mattech06 (6/18/2014)
So a better example would be using a table with ..
CREATE TABLE...
June 18, 2014 at 8:03 am
You're welcome.
If you have read of this article [/url] then it'll be much quicker getting an answer in future. It'll save people having to make assumptions and it'll...
June 18, 2014 at 7:19 am
You can use one CTE after another, like so:
CREATE TABLE #Question ([Description] VARCHAR(15), [Amount] INT)
INSERT INTO#Question
SELECT 'Bob', 10 UNION ALL
SELECT 'Tim',20 UNION ALL
SELECT 'Jim',30
;
WITH cteTest AS
(
SELECT * FROM...
June 18, 2014 at 7:00 am
Rhythmk's solution does exactly what you want or the alteration to my solution below will do the same, although much less elegantly.
SELECT
q.[Description]
,SUM(s.totSum)
FROM #Question q
CROSS APPLY
(
...
June 18, 2014 at 6:32 am
I see, so you want whatever is the first description value to be the description that is displayed.
How is the ordering done? Is it done on the value of the...
June 18, 2014 at 6:20 am
John Mitchell-245523 (6/18/2014)
Ed Wagner (6/18/2014)
On site means on site, not Azure - plain and simple.
Precisely. All on-site databases are 2012, meaning 2000 can't be the answer. And since...
June 18, 2014 at 6:09 am
CREATE TABLE #Question ([Description] VARCHAR(15), [Amount] INT)
INSERT INTO#Question
SELECT 'Bob', 10 UNION ALL
SELECT 'Tim',20 UNION ALL
SELECT 'Jim',30
SELECT
[desc] =q.[Description]
,amt = SUM(s.totSum)
FROM #Question q
CROSS APPLY
(
SELECT
totSum...
June 18, 2014 at 5:27 am
GilaMonster (6/18/2014)
Koen Verbeeck (6/18/2014)
The answer is incorrect.The question clearly states that the databases are on site. Thus, by the process of elimination, the corruption answer is the only one left.
Except...
June 18, 2014 at 2:55 am
Toreador (6/18/2014)
You are working for a company that has uses SQL 2012 for their on site databases. A fellow DBA is trying to do a quick check on a database...
June 18, 2014 at 2:21 am
Viewing 15 posts - 991 through 1,005 (of 1,243 total)