Viewing 15 posts - 11,116 through 11,130 (of 15,376 total)
drew.allen (8/2/2012)
WITH ActiveUpdates AS (
SELECT [ID], SortOrder, isActive, ROW_NUMBER() OVER( ORDER BY SortOrder DESC, [ID] ) - 1 AS rn
FROM @CustomerConditions
)
UPDATE...
August 2, 2012 at 7:49 am
This should work with your sample data.
select *
from CustomerConditions
where IsActive = 1
order by SortOrder
begin transaction
update CustomerConditions
set SortOrder = x.RowNum
from CustomerConditions c
cross apply
(
select ConditionID, ROW_NUMBER() over (order by isnull(SortOrder, 9999999), ConditionID)...
August 1, 2012 at 3:25 pm
Lynn Pettis (8/1/2012)
August 1, 2012 at 3:08 pm
But the point was still that functionally "BETWEEN" in TSQL doesn't match what one would logically expect from the name. Which would be, "is value in the range defined by...
August 1, 2012 at 3:04 pm
I think I understand what you are trying to do. Can you post some ddl (create table) and sample data (insert statements) in a consumable format?
August 1, 2012 at 2:29 pm
I understand your point but the lowest value first makes sense. Would you tell somebody that you will come visit them sometime BETWEEN 7pm and 6pm? They would look at...
August 1, 2012 at 2:07 pm
morepainot (8/1/2012)
Sean Lange (8/1/2012)
morepainot (8/1/2012)
August 1, 2012 at 1:00 pm
morepainot (8/1/2012)
August 1, 2012 at 12:37 pm
•Do all staged tables exist in the source and in the stage database?
•Do all staged columns exist in the source and in the stage database?
•Is the data type of all...
August 1, 2012 at 12:33 pm
Oh thats only there cause I have to create a table there. Im not sure what columns to add to it so I left it blank for the time being....
August 1, 2012 at 12:25 pm
Okay, understood. This code is really long but Im going to post it with all the errors, mostly fixed. This included the procs usp_PreStageValidation and usp_PostStageValidation
You need step away from...
August 1, 2012 at 10:38 am
oolawole (8/1/2012)
Thanks so much, that did the job very well.
You are quite welcome. Glad that worked!!! Thanks for letting us know.
August 1, 2012 at 10:13 am
morepainot (8/1/2012)
Sean Lange (8/1/2012)
morepainot (8/1/2012)
August 1, 2012 at 10:05 am
morepainot (8/1/2012)
August 1, 2012 at 10:00 am
morepainot (8/1/2012)
No, it means the procedure alread exists and you are trying to create it again. Two things you can do. One, change the CREATE PROCEDURE to ALTER...
August 1, 2012 at 9:53 am
Viewing 15 posts - 11,116 through 11,130 (of 15,376 total)