Click here to Skip to main content
15,879,535 members
Home / Discussions / Database
   

Database

 
Questioncomplex query Pin
Joshua Lunsford14-Oct-05 12:02
Joshua Lunsford14-Oct-05 12:02 
AnswerRe: complex query Pin
Colin Angus Mackay14-Oct-05 13:14
Colin Angus Mackay14-Oct-05 13:14 
GeneralRe: complex query Pin
Joshua Lunsford17-Oct-05 11:49
Joshua Lunsford17-Oct-05 11:49 
AnswerRe: complex query Pin
miah alom17-Oct-05 4:46
miah alom17-Oct-05 4:46 
QuestionADO.NET Update / delete without primary keys Pin
Jasonc22114-Oct-05 11:10
Jasonc22114-Oct-05 11:10 
AnswerRe: ADO.NET Update / delete without primary keys Pin
miah alom17-Oct-05 5:52
miah alom17-Oct-05 5:52 
GeneralRe: ADO.NET Update / delete without primary keys Pin
Jasonc22117-Oct-05 7:33
Jasonc22117-Oct-05 7:33 
GeneralRe: ADO.NET Update / delete without primary keys Pin
miah alom17-Oct-05 8:35
miah alom17-Oct-05 8:35 
I think first of all if there are duplicate records, you need to delete them. Having duplicate records in a database table does not make sense to me at all.

You can get the duplicate records using a query similar to the following.

select au_lname, au_fname, city, state, count(*)
from dup_authors
group by au_lname, au_fname, city, state
having count(*) > 1
order by count(*) desc, au_lname, au_fname

The following statements will resolve the duplicates.

select distinct *
into #holding
from dup_authors

truncate table dup_authors

insert dup_authors
select *
from #holding

drop table #holding

GeneralRe: ADO.NET Update / delete without primary keys Pin
Jasonc22118-Oct-05 9:22
Jasonc22118-Oct-05 9:22 
GeneralRe: ADO.NET Update / delete without primary keys Pin
l a u r e n21-Oct-05 15:04
l a u r e n21-Oct-05 15:04 
AnswerRe: ADO.NET Update / delete without primary keys Pin
S Douglas20-Oct-05 1:45
professionalS Douglas20-Oct-05 1:45 
AnswerRe: ADO.NET Update / delete without primary keys Pin
l a u r e n21-Oct-05 15:06
l a u r e n21-Oct-05 15:06 
GeneralRe: ADO.NET Update / delete without primary keys Pin
Jasonc22124-Oct-05 12:37
Jasonc22124-Oct-05 12:37 
QuestionSQL connection in servicedcomponents Pin
eliprand14-Oct-05 5:43
eliprand14-Oct-05 5:43 
AnswerRe: SQL connection in servicedcomponents Pin
eliprand14-Oct-05 6:08
eliprand14-Oct-05 6:08 
QuestionHow does Oracle support unicode text? Pin
Xiangyang Liu 刘向阳14-Oct-05 5:35
Xiangyang Liu 刘向阳14-Oct-05 5:35 
AnswerRe: How does Oracle support unicode text? Pin
DiWa14-Oct-05 19:30
DiWa14-Oct-05 19:30 
GeneralRe: How does Oracle support unicode text? Pin
Xiangyang Liu 刘向阳14-Oct-05 19:50
Xiangyang Liu 刘向阳14-Oct-05 19:50 
QuestionConnection String Pin
kenexcelon13-Oct-05 14:27
kenexcelon13-Oct-05 14:27 
AnswerRe: Connection String Pin
Mike Dimmick14-Oct-05 4:42
Mike Dimmick14-Oct-05 4:42 
GeneralRe: Connection String Pin
Anonymous14-Oct-05 15:32
Anonymous14-Oct-05 15:32 
QuestionOPENXML and ntext problem Pin
Luke Murray13-Oct-05 13:44
Luke Murray13-Oct-05 13:44 
QuestionListBox Display Member Pin
kenexcelon13-Oct-05 7:49
kenexcelon13-Oct-05 7:49 
AnswerRe: ListBox Display Member Pin
-Dr_X-13-Oct-05 8:44
-Dr_X-13-Oct-05 8:44 
QuestionError: JZooL & JZ006 What do I do? Pin
Crystal A13-Oct-05 3:27
sussCrystal A13-Oct-05 3:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.