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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Eliminating double rows

Author  Topic 

Günnie
Starting Member

4 Posts

Posted - 2002-02-12 : 05:06:15
Hi there,
I've got a problem with sql server 2000. In my 1st table are different datasets with double product id's. I have to keep only 1 dataset with a unique product id.
The rows are inserted from another table (say sourcetable).

My Question is: How can i remove the double id rows and keep one (in MS Access is the First(function), anything similar in sql server?)
or as an alternative, if the id row of table 1 is defined as primary key, how can errors be ignored, which occure when doing the insert from sourcetable to table 1.

e.g.
table 1
--------------
id description
--------------
1 bla_bla_1
1 bla_bla_2
2 bla_bla_3
3 bla_bla_4
2 bla_bla_5

to:

table 1
--------------
id description
--------------
1 bla_bla_1
2 bla_bla_3
3 bla_bla_4

Thanks Günni

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-02-12 : 07:27:35
www.sqlteam.com/faq.asp

Damian
Go to Top of Page
   

- Advertisement -