Viewing 15 posts - 1,741 through 1,755 (of 3,957 total)
TheSQLGuru (6/19/2013)
tssopa (6/19/2013)
July 4, 2013 at 7:19 pm
This might work too.
WITH BigInts (n) AS (
SELECT CAST(9223372036854775807 AS BIGINT)
UNION ALL SELECT CAST(9223372036854775807 AS BIGINT))
SELECT SUM(CAST(n AS DECIMAL(38,0)))
FROM BigInts
July 4, 2013 at 6:59 pm
Erland Sommarskog (7/4/2013)
; WITH numbering AS (
SELECT RecID, DateEntered,...
July 4, 2013 at 6:50 pm
Since we're speaking hypothetically here and I don't have AdventureWorks to play with, I'll propose another hypothetical approach that I've seen to work well on occasion.
Using Gail's Query 1, instead...
July 4, 2013 at 6:37 pm
Coriolan (7/4/2013)
This is great, SSCrazy. It is exactly what I am looking for.Short, simple, easy to read, thus easy to maintain.
Thank you!
You wouldn't be the first to call me crazy...
July 4, 2013 at 5:12 pm
Mark-101232 (7/4/2013)
delete from TABLE2 where Filename<>'file3.txt'
on the OPs sample data so that job1 only has one out...
July 4, 2013 at 6:35 am
I'm always interested in cases like this so with more time on my hands than I care to admit, I came up with the following test harness:
CREATE TABLE #TABLE1 ([filename]...
July 4, 2013 at 12:50 am
Here's possibly another way:
SELECT jobname
FROM TABLE1 a
CROSS APPLY (
SELECT TOP 1 SuccessFailIndicator=1-SuccessFailIndicator
FROM TABLE2 b
WHERE a.[Filename] = b.[Filename]
...
July 4, 2013 at 12:17 am
Coriolan,
The following matches your results by using a cross tab to generate counts of order detail lines by status.
WITH CountOfStatus AS (
SELECT ORderID
...
July 3, 2013 at 11:52 pm
Similar to Luis's suggestion:
WITH Dummy(ID, String) AS(
SELECT 1,'SubnetAddress=10.16.224.128' UNION ALL
SELECT 2,'SubnetName=FOS-Salzburg Kasernenstraase #823 VPN' UNION ALL
SELECT 3,'SubnetMask=255.255.255.128' UNION ALL
SELECT 4,'NetworkAddress=10.0.0.0' UNION ALL
SELECT 5,'LocationID=895' UNION ALL
SELECT 30,'SubnetDescription=CHINA-BEIJING-C025 F2 XIANGJIANG CNVASX1706' UNION...
July 3, 2013 at 7:59 pm
sqlfriends (7/3/2013)
for example now I have fullstreet ='100 NW 25...
July 3, 2013 at 7:33 pm
Here's my take:
Q: Can I avoid using cursors?
A: Most probably.
Q: How?
A: DDL and sample data needed along with expected results to get some working code. An explanation of any...
July 3, 2013 at 7:29 pm
Lot's of assumptions here including all of Jeff's, Lowell's that you don't have an abbreviation like COR that matches to Corporation and that also there are not extra parens in...
July 3, 2013 at 7:17 pm
Viewing 15 posts - 1,741 through 1,755 (of 3,957 total)