![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Is it possible to remowe those doubled records (and keep safe the good one ) in one SQL query? |
|
Hello, I have records doubled in my table. Like: order amount date 10001 145,90 2008-02-02 10001 145,90 2008-02-02 10002 305,95 2008-02-03 10002 305,95 2008-02-03 ... Is it possible to remowe those doubled records (and keep safe the good one ) in one SQL query? I would like not to use any additional table norcursor. I have heard about delet caluse based on select query, but I cannot write someting like that. BTW, the table does not have any unique key (e.g. the field 'order' is not unique). The table is quite big (millions of records). Please help. Maciek |
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hello, I have records doubled in my table. Like: order amount date 10001 145,90 2008-02-02 10001 145,90 2008-02-02 10002 305,95 2008-02-03 10002 305,95 2008-02-03 ... Is it possible to remowe those doubled records (and keep safe the good one ) in one SQL query? I would like not to use any additional tablenor cursor. I have heard about delet caluse based on select query, but I cannot write someting like that. BTW, the table does not have any unique key (e.g. the field 'order' is not unique). The table is quite big (millions of records). Please help. Maciek |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
* DELETE TOP(1) t * FROM table t -- oops * WHERE EXISTS ( |
![]() |
| Thread Tools | |
| Display Modes | |
| |