Viewing 15 posts - 1,516 through 1,530 (of 3,957 total)
Jeff Moden (9/9/2013)
September 9, 2013 at 11:12 pm
Mine seems to have gotten lost in the shuffle there in your last test harness, but I can see what you've done. Results look pretty close.
For some reason, I'm...
September 9, 2013 at 11:01 pm
Jeff Moden (9/9/2013)
dwain.c (9/9/2013)
WITH SampleData (C1, C2) AS (
SELECT 1234, 1
UNION ALL SELECT 12345, 11
UNION ALL...
September 9, 2013 at 10:38 pm
In SQL 2008 R2:
SELECT ROUND(123.5555, 0, 1) -- Truncate to integer
,ROUND(123.5555, 1, 1) -- Truncate to first decimal digit
...
September 9, 2013 at 6:46 pm
At the risk of being called a contrarian, this can be done without using RIGHT:
WITH SampleData (C1, C2) AS (
SELECT 1234, 1
UNION ALL SELECT 12345, 11
UNION ALL SELECT 123456, 111)
SELECT...
September 9, 2013 at 6:41 pm
James_DBA (9/9/2013)
September 9, 2013 at 6:24 pm
Roger L Reid (9/9/2013)
Your point is that the generalist programmer often doesn't...
September 9, 2013 at 6:21 pm
Excellent feedback Paul! Absolutely nothing in it I could argue with.
Didn't know about the SQL Connect article (quite interesting) but I did know the syntax wasn't ANSI standard, even...
September 9, 2013 at 4:13 am
Here's one way that lists all Sales Order records.
WITH CTE AS (
SELECT SalesOrderID
FROM #SalesOrders a
LEFT JOIN #ProductList b...
September 9, 2013 at 1:45 am
Jeff Moden (9/8/2013)
September 9, 2013 at 1:41 am
If you just want the SalesOrderID that match your criteria:
SELECT SalesOrderID
FROM SalesOrders a
LEFT JOIN ProductList b ON a.ProductID = b.ProductID
GROUP BY SalesOrderID
HAVING COUNT(CASE WHEN b.ProductID IS NULL THEN 1 END)...
September 8, 2013 at 8:12 pm
I've made a submission.
I hope it's what you were looking for and more importantly I hope I didn't miss some kind of trick part of the question.
September 6, 2013 at 8:32 pm
Will each runner have at most 2 entries?
If only one entry (start time), then what would you like to see for elapsed time?
If more than 2, does the...
September 4, 2013 at 6:30 pm
Sean Lange (9/4/2013)
September 4, 2013 at 6:27 pm
Viewing 15 posts - 1,516 through 1,530 (of 3,957 total)