Viewing 15 posts - 3,061 through 3,075 (of 4,087 total)
grevesz (1/16/2013)
1. Why is the X necessary after the DELETE key word? Wouldn't DELETE FROM demodelete x WHERE x.somenum = 1; work? If not, why?
The DELETE statement consists of six...
January 17, 2013 at 9:51 am
The problem is that the table you are updating is not referenced (directly) in your FROM clause, so it is updating every row in that table. You want to...
January 9, 2013 at 11:49 am
dwain.c (1/7/2013)
Any solution posed with a CTE can always be done without the CTE by making the CTE into a derived table as Lynn has shown.
That's not entirely true. ...
January 9, 2013 at 8:41 am
The problem is that your desired results require that your TABLE1 be sorted in a specific order, but the data provided is insufficient to enforce that order. You have...
November 15, 2012 at 8:15 am
anthony.green (11/5/2012)
If you remove the...
November 5, 2012 at 9:13 am
Skanda (10/17/2012)
CROSS APPLY (
SELECT col = CASE WHEN MAX(col) = MIN(col) THEN MAX(col) ELSE NULL END
)
CROSS APPLY applies a "function" to each row of the (virtual) table. In...
October 17, 2012 at 9:26 am
Without seeing your query, it's impossible to tell what the best approach may be. The previous posts will certainly work, but it's entirely possible that your original query may...
October 17, 2012 at 8:57 am
I think that a GROUP BY is much simpler and probably faster, too.
With YOURTABLE (TICKET,STATUS)
AS
(
SELECT 9543,1 UNION ALL
SELECT 9543,5 UNION ALL
SELECT 9543,5 UNION ALL
SELECT 9544,1 UNION...
October 15, 2012 at 2:11 pm
neellotus07 (10/8/2012)
I am using this query to create crystal report but it is hanging my report while running.Pls tell me all joins are right or wrong or some updation required.
If...
October 12, 2012 at 2:26 pm
You want help resolving an error, but haven't included the text of the error message. That's like going to the doctor and asking him to help you without telling...
October 12, 2012 at 1:00 pm
You already have a thread on this topic http://www.sqlservercentral.com/Forums/Topic1371464-392-1.aspx Please don't start a new one.
The reason your old thread hasn't gotten any comments, is that you haven't provided the...
October 12, 2012 at 12:36 pm
Cadavre (10/12/2012)
SELECT Branch, Year,
SUM(CASE WHEN fail = 'true' THEN 1 ELSE 0 END),
SUM(CASE WHEN fail = 'true' AND
=...
October 12, 2012 at 12:24 pm
Your query 2 is invalid, because an (INNER) JOIN requires an ON clause, which is missing from your query. I suspect that the problem is in that missing clause.
Drew
September 21, 2012 at 2:28 pm
GSquared (9/20/2012)
September 20, 2012 at 12:55 pm
John Mitchell-245523 (8/24/2012)
...
CASE WHEN Interval < 1 THEN 'X'
WHEN Interval >= 1 AND...
August 24, 2012 at 7:28 am
Viewing 15 posts - 3,061 through 3,075 (of 4,087 total)