Viewing 15 posts - 27,346 through 27,360 (of 59,101 total)
Compassionate (3/2/2013)
I have two tables Tab1 and Tab2.For each row in Tab1, the table Tab2 contains multiple rows.Important columns in both tables are C0,C1 and C2. So i have...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 2, 2013 at 1:43 pm
mehta.saurabhj (3/2/2013)
select * from emp where (rowid,1) in (select rowid, mod(rownum,2) from emp);
But if I do the foll code for odd...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 2, 2013 at 11:11 am
Irozenberg 1347 (3/1/2013)
IMHO CSV data in database is a pure hack - some developers just cutting corners to speed up first cut and leave before it causing HUGE...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 2, 2013 at 10:20 am
Yeah, you're right, Kevin. I should'a'node. 🙂 The "symptoms" told me I should ask anyway. Didn't know the "problem" would be such an incredible machine. Thanks...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 2, 2013 at 9:40 am
manibad (3/1/2013)
1)Input:2013-03-01
Output:03-March-2013
2)First day of the following month
Input:2013-01-01
Output:2013-02-01
(or)
input:2013-12-29
Output:2014-01-01
I need to satisfy both conditions in a single query
I need...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 2, 2013 at 7:16 am
Lowell (3/1/2013)
Sigerson (3/1/2013)
@Lowell,Is there a word for having to learn so many fine points that one begins to forget the basics? :ermm:
Oh yea,the only guys that remember it all,...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 2, 2013 at 7:04 am
@gavin.cox,
First, very nice job on providing readily consumable data.
My question to you is, will there only be 3 levels in this data?
Also, please post the code you used for your...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2013 at 11:28 pm
No answer in 14 hours. Take a look at the article at the first link in my signature below for a way to change that.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2013 at 10:04 pm
You were SO close...
SELECT
U.Num,
U.NAME,
[1] = SUM(CASE WHEN MONTH(W.WorkDay) = 1 THEN W.TimeWorked ELSE 0 END),
[2] = SUM(CASE WHEN MONTH(W.WorkDay) = 2 THEN W.TimeWorked ELSE 0 END),
[3] = SUM(CASE WHEN...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2013 at 9:51 pm
drjahns 71679 (3/1/2013)
How do you staple ssrs report pages when printing?
It's not a function of SSRS. It's a function of the automatic stapler on your printer and can normally...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2013 at 9:41 pm
ScottPletcher (3/1/2013)
Or simply:
SELECT CONVERT(char(2), myDate, 1)
I'm not poking holes here so go easy. Considering another conversation about not so obvious code, wouldn't the concatenation method of adding a zero...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2013 at 9:25 pm
You can avoid 2 of the 3 table scans of Table1 with a brute force "uncrosstab" (unpivot) followed by a cross tab (pivot). I haven't tested it for performance...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2013 at 9:13 pm
As Magoo suggests, if you include the UPDATE and SELECT in a single transation, then only people that did the end-around with things like WITH(NOLOCK) or SET TRANSACTION ISOLATION LEVEL...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2013 at 7:53 pm
TheSQLGuru (3/1/2013)
Jeff Moden (3/1/2013)
TheSQLGuru (2/28/2013)
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2013 at 7:41 pm
Alan.B (3/1/2013)
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2013 at 7:34 pm
Viewing 15 posts - 27,346 through 27,360 (of 59,101 total)