Viewing 15 posts - 256 through 270 (of 532 total)
The problem I have with the case statements is that they're a bit ugly to work with (especially when you get more and more) and they're not dynamic. So,...
July 14, 2010 at 11:48 am
No left join is needed for this so I wouldn't use one either.
;WITH cteTemp
AS
(
select [EMP],
[order_no],
EmpAccts = DENSE_RANK() OVER (PARTITION BY [EMP] ORDER BY [order_no]),
EmpRes = ROW_NUMBER() OVER (PARTITION BY [order_no]...
July 14, 2010 at 11:32 am
david.c.holley (7/14/2010)
However, I would swear up and down that I've seen example where the value of the Row_Number is referenced in the WHERE statement without using WITH() AS.
It's possible you...
July 14, 2010 at 10:46 am
Supposedly you can create a linked server and query that way. Take a look at this article: OLE DB Provider for Microsoft Directory Services. (I just did a...
July 13, 2010 at 6:13 pm
Lynn Pettis (7/8/2010)
you need a semi-colon like this:SET NOCOUNT ON;
Heh .. some code reviewer I am. I just assumed that it was there because it was discussed.
July 8, 2010 at 4:12 pm
Can't really tell for sure what you're trying to do big picture, but it looks like you're trying to make 12 entries in a table. One of the big...
July 8, 2010 at 4:06 pm
I'm surprised that's throwing an error, but you can just do
declare @thisdontmeananything bit;
with cte ...
July 8, 2010 at 3:43 pm
Thank you for bringing this to the attention of the community.
July 8, 2010 at 3:39 pm
The Dixie Flatline (7/7/2010)
You're not going to explain this in a such a way as to make him happy.
I didn't believe you. Now I do.
July 7, 2010 at 6:03 pm
doobya (7/7/2010)
If this is common knowledge - prove it with a link
I have searched this forum and google and found no mention of the dual behaviour issue
Common knowledge that an...
July 7, 2010 at 6:02 pm
doobya (7/7/2010)
bteraberry (7/7/2010)If you want 'Y' to happen regardless of what happens with 'X' then don't put it in the same TRY.
that is what I *am* doing! X and Y...
July 7, 2010 at 5:38 pm
Also, you can take a look at what happens in your example when you change the proc dbo.spTryTestA:
create proc dbo.spTryTestA
as
--
begin try
raiserror('spTryTestA:1', 0, 1)
end try
begin catch
raiserror('spTryTestA:1 failed', 0, 1)
end catch
begin try
raiserror('spTryTestA:2',...
July 7, 2010 at 5:23 pm
doobya,
Let me give you a few suggestions:
#1. Consider that maybe it's you who isn't understanding what's being said. You're arguing with someone who writes top notch books on SQL...
July 7, 2010 at 4:50 pm
The problem with how you're doing this is that you have 3 nested IF's, but only the outer IF has an associated ELSE. So if your condition evaluates true...
July 2, 2010 at 11:18 am
jvanderberg (7/1/2010)
July 1, 2010 at 5:04 pm
Viewing 15 posts - 256 through 270 (of 532 total)