Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
rajasekhar857
Constraint Violating Yak Guru
396 Posts |
Posted - 2009-08-26 : 02:24:10
|
| DELETE DFROM( SELECT * ,ROW_NUMBER() OVER (PARTITION BY problem_code, patient_id ORDER BY PROBLEM_ID DESC) AS RowNum FROM EMRPATIENTPROBLEMS) DWHERE RowNum > 1GOhi the above query is working fine with sql server 2005.i want it in sql server 2000.help me out. |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-08-26 : 03:01:05
|
| Hi once go through thisdeclare @t table (A int)insert into @t select 1 union all select 1 union all select 1 union all select 2 union all select 2 union all select 3 union all select 3 union all select 3select identity(int,1,1)as rid, * into #temp from @tselect a,(select count(a) from #temp where rid <= t.rid and a= t.a)as cntfrom #temp t |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-08-26 : 03:08:27
|
| Search for delete duplicate+sql server in googleMadhivananFailing to plan is Planning to fail |
 |
|
|
rajasekhar857
Constraint Violating Yak Guru
396 Posts |
Posted - 2009-08-26 : 06:03:55
|
| what is the equivalent for row_number in sql server 2000 as above query not work for it |
 |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
|
|
rajasekhar857
Constraint Violating Yak Guru
396 Posts |
Posted - 2009-08-26 : 07:18:19
|
| hi tried a lot can you please give equivalent delete script in sql server 2000 |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2009-08-26 : 07:47:55
|
| Here is a better idea. Follow the link in my signature on HOW TO POST A QUESTION. Give us the data asked for, and someone will likely show you what you need.http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|
|
|