Viewing 15 posts - 901 through 915 (of 1,923 total)
What approach are u following to split, currently ?
March 11, 2011 at 9:57 pm
This is the requirement right ??
adonetok (3/9/2011)
For example, second row should be deleted but third and fourth row need to keep.
So, it is correct to delete the rows with multiple...
March 9, 2011 at 4:59 pm
Or this>
delete from #Temp
where OrderID IN
(
select T.OrderID
FROM #Temp t
GROUP BY T.OrderID
HAVING (COUNT(*) > 1 AND COUNT(T.OrderID) <> COUNT(T.City))
)
March 9, 2011 at 4:33 pm
Can NOT be done as u were saying ; WHERE clause filters ROWS, not COLUMNS. You will have to manually write the required columns in the SELECT list.
Else, if the...
March 9, 2011 at 1:10 pm
LutzM (3/5/2011)
ColdCoffee (3/4/2011)
Hmmm, yeah , Lutz ; But i and Jeff can meet as we are in the same continent 🙂 I am in the US for an assignment. I...
March 5, 2011 at 2:57 am
Jeff, got my mail?? (Gentle reminder to Jeff as his PM box if full; apologies for spamming in other's thread :pinch:)
March 4, 2011 at 6:03 pm
Jeff Moden (3/4/2011)
March 4, 2011 at 12:13 pm
This probably is the fastest i could think of 🙂
select d.EmpNO ,
stuff( (replace ( ',2001,2002,2003',cast( (
...
March 3, 2011 at 11:56 pm
Jeff, can u please delete some of your old PMs; when i tried sending u one PM, it said the recipient exceeded the number of PMs. Just wanted to inform...
March 3, 2011 at 10:06 pm
LutzM (3/3/2011)
Both solutions (yours as well as mine) can be right. Or wrong. A classic "it depends" 😀
:cool::-P
March 3, 2011 at 5:23 pm
LutzM (3/3/2011)
;
WITH cte AS
(
SELECT col,
CAST(STUFF(col,1,1,'') AS INT) - ROW_NUMBER() OVER(ORDER BY col ) AS grp
FROM ...
March 3, 2011 at 5:04 pm
Lol :w00t: !! my nickname is derived from a bitter experience by drinkng ColdCoffee, but that led to the formation of a set of close friends for me; so, me...
March 3, 2011 at 2:48 pm
lee rite (3/3/2011)
Thanks again! I think I'm done! I really appreciate all the help!
Will i be getting a Samsung Focus for this help , mate ?? :hehe:
March 3, 2011 at 1:26 pm
smarty3010 (3/3/2011)
SELECT column/s FROM
(
SELECT column/s, row_number() over(ORDER BY getdate()) as...
March 3, 2011 at 1:08 pm
Viewing 15 posts - 901 through 915 (of 1,923 total)