Viewing 15 posts - 1,546 through 1,560 (of 3,957 total)
Jeff Moden (8/23/2013)
Sean Lange (8/22/2013)
August 23, 2013 at 8:13 pm
mario17 (8/23/2013)
trying to reverse eng your super code, is this a place to use Cross Apply ONLY, or could be done with Join.
I can't get second Cross Apply
--CROSS...
August 23, 2013 at 8:10 pm
Jeff Moden (8/22/2013)
dwain.c (8/22/2013)
Sql Student-446896 (8/22/2013)
I want to get the 10.1 and 10.2 in my output. How do i get that?Table A has the columns change_id
Change_id
-----------
1.1
1.2
2.1
2.2
3.1
3.2
10.1
10.2
There's about a thousand ways...
August 22, 2013 at 9:39 pm
What people are suggesting I generally refer to as "narrowing the JOIN criteria."
There are a multitude of ways to do it. But the way you choose to do it...
August 22, 2013 at 9:27 pm
I hate it when OPENROWSET imports a value of ' (empty string in the Excel cell) as an empty string and thus thinks there's extra rows in the input set.
Have...
August 22, 2013 at 8:42 pm
How about something like this?
CREATE TABLE #b1(
[b1] [int] NOT NULL,
[b12] [varchar](10) NOT NULL
) ON [PRIMARY]
INSERT #b1 ([b1], [b12]) VALUES (1, N'bob11')
INSERT #b1 ([b1], [b12]) VALUES (2, N'bob12')
INSERT #b1 ([b1], [b12])...
August 22, 2013 at 8:22 pm
Fal (8/22/2013)
We were thinking of getting a stone benchtop,...
August 22, 2013 at 8:04 pm
Knives85 (8/22/2013)
I'm hoping someone can help me , I need to put together a script that will look at different rows in the data
I having problems creating a case...
August 22, 2013 at 6:02 pm
Sql Student-446896 (8/22/2013)
I want to get the 10.1 and 10.2 in my output. How do i get that?Table A has the columns change_id
Change_id
-----------
1.1
1.2
2.1
2.2
3.1
3.2
10.1
10.2
There's about a thousand ways in SQL to...
August 22, 2013 at 5:59 pm
I more or less agree with sturner that the final query should probably be something like this:
SELECT [Emp No], [UltiMonth], SUM([Current Amount])
FROM cte
GROUP BY [Emp No],[UltiMonth];
August 22, 2013 at 5:53 pm
And thank you John for taking the time to let us know you got something you could use out of it.
August 22, 2013 at 5:43 pm
Actually, I've rarely found CTEs to improve performance over similar set-based constructs, e.g., a derived table. All they do is add readability.
In this case, I wasn't even trying for...
August 22, 2013 at 5:31 am
mario17 (8/22/2013)
...
August 22, 2013 at 5:24 am
Not sure why you need to use subqueries. I'd do it with a ranking table.
WITH Ranking (n, Citation) AS (
SELECT 1,'Warning'
...
August 22, 2013 at 12:00 am
I believe you can do it something like this.
with ttt as (
select 123 Id, DATEADD(d,-10,getdate()) fromDD, DATEADD(d,-3,getdate()) toDD,
...
August 21, 2013 at 11:41 pm
Viewing 15 posts - 1,546 through 1,560 (of 3,957 total)