Viewing 15 posts - 1,006 through 1,020 (of 1,251 total)
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...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
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...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
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
(
...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
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...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
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...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
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...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
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...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
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...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
June 18, 2014 at 2:21 am
Koen Verbeeck (6/18/2014)
BWFC (6/18/2014)
Koen Verbeeck (6/18/2014)
BWFC (6/18/2014)
You are working for a company that has uses SQL 2012 for their on site databases.
This explicitly rules out that the databases are...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
June 18, 2014 at 2:13 am
Koen Verbeeck (6/18/2014)
BWFC (6/18/2014)
You are working for a company that has uses SQL 2012 for their on site databases.
This explicitly rules out that the databases are in the cloud,...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
June 18, 2014 at 1:58 am
You are working for a company that has uses SQL 2012 for their on site databases.
This explicitly rules out that the databases are in the cloud, the answer to...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
June 18, 2014 at 1:07 am
rhythmk (6/17/2014)
BWFC (6/17/2014)
rhythmk (6/17/2014)
Thanks for question.It reminds me the trick to delete the duplicate records in a table 🙂Could you enlighten me on that please? It sounds very useful.
Here...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
June 17, 2014 at 5:24 am
How is the order you want being decided? They appear essentially random to me.
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
June 17, 2014 at 3:55 am
What Koen said.
Yesterday I was wondering why we had some call data with a 1753 date on it. I thought it was our problem until I looked up that.
Edited...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
June 17, 2014 at 3:37 am
If you read this article it should point you in the right direction. It will be almost impossible to write the exact query you need from the...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
June 17, 2014 at 3:12 am
Viewing 15 posts - 1,006 through 1,020 (of 1,251 total)