Click here to Skip to main content
15,889,116 members
Home / Discussions / Database
   

Database

 
AnswerRe: SqlDataReader Number of Rows Pin
tech60324-Mar-09 13:24
tech60324-Mar-09 13:24 
QuestionProblem with CASE statement in WHERE clause Pin
marijus523-Mar-09 1:49
marijus523-Mar-09 1:49 
AnswerRe: Problem with CASE statement in WHERE clause Pin
Ashfield24-Mar-09 2:27
Ashfield24-Mar-09 2:27 
GeneralRe: Problem with CASE statement in WHERE clause Pin
marijus524-Mar-09 5:33
marijus524-Mar-09 5:33 
GeneralRe: Problem with CASE statement in WHERE clause Pin
Ashfield24-Mar-09 10:31
Ashfield24-Mar-09 10:31 
GeneralRe: Problem with CASE statement in WHERE clause Pin
marijus524-Mar-09 13:24
marijus524-Mar-09 13:24 
GeneralRe: Problem with CASE statement in WHERE clause Pin
Ashfield24-Mar-09 22:12
Ashfield24-Mar-09 22:12 
GeneralDelete Duplicates in MySQL Pin
Brady Kelly22-Mar-09 23:36
Brady Kelly22-Mar-09 23:36 
I've given a client the following query to delete duplicate phone no. records in an MSSQL database, but now they need to also do it on MySQL, and they report that MySQL complains about the format of the query. I've included the setup of a test table with duplicates for my code sample, but the actual delete query is what counts.

I'm asking this in ignorance and urgency, as I am still busy downloading and installing MySQL, and just maybe somebody can help in the mean time.

create table bkPhone
(
    phoneNo nvarchar(20),
    firstName nvarchar(20),
    lastName nvarchar(20)
)
GO

insert bkPhone values('0783313780','Brady','Kelly')
insert bkPhone values('0845319792','Mark','Smith')
insert bkPhone values('0834976958','Bill','Jones')
insert bkPhone values('0845319792','Mark','Smith')
insert bkPhone values('0828329792','Mickey','Mouse')
insert bkPhone values('0834976958','Bill','Jones')

alter table bkPhone add phoneId int identity

delete from bkPhone
where phoneId not in
(
    select min(phoneId)
    from bkPhone
    group by phoneNo,firstName,lastName
    having  count(*) >= 1
)



GeneralRe: Delete Duplicates in MySQL Pin
Blue_Boy23-Mar-09 4:22
Blue_Boy23-Mar-09 4:22 
QuestionInstalling SQL Server 2005 Developer Edtion Pin
klaydze22-Mar-09 3:45
klaydze22-Mar-09 3:45 
AnswerRe: Installing SQL Server 2005 Developer Edtion Pin
Mycroft Holmes22-Mar-09 13:25
professionalMycroft Holmes22-Mar-09 13:25 
GeneralRe: Installing SQL Server 2005 Developer Edtion Pin
klaydze25-Mar-09 4:59
klaydze25-Mar-09 4:59 
Questionhow to shrink the log file of a sql server 2000 database with a full recovery model? [modified] Pin
ma.amer21-Mar-09 10:36
ma.amer21-Mar-09 10:36 
AnswerRe: how to shrink the log file of a sql server 2000 database with a full recovery model? Pin
Eddy Vluggen22-Mar-09 1:15
professionalEddy Vluggen22-Mar-09 1:15 
GeneralRe: how to shrink the log file of a sql server 2000 database with a full recovery model? Pin
ma.amer22-Mar-09 3:24
ma.amer22-Mar-09 3:24 
QuestionHow to activate Oracle server ? Pin
E_Gold21-Mar-09 10:02
E_Gold21-Mar-09 10:02 
QuestionPassword Setting Pin
jayachandra.c21-Mar-09 5:12
jayachandra.c21-Mar-09 5:12 
AnswerRe: Password Setting Pin
scottgp21-Mar-09 9:49
professionalscottgp21-Mar-09 9:49 
GeneralRe: Password Setting Pin
Riaan Booyzen22-Mar-09 2:40
Riaan Booyzen22-Mar-09 2:40 
QuestionPlz help me...(Urgently)... Pin
Arslan Khan20-Mar-09 8:42
Arslan Khan20-Mar-09 8:42 
AnswerRe: Plz help me...(Urgently)... Pin
Mycroft Holmes21-Mar-09 14:56
professionalMycroft Holmes21-Mar-09 14:56 
JokeRe: Plz help me...(Urgently)... Pin
Arslan Khan22-Mar-09 9:00
Arslan Khan22-Mar-09 9:00 
GeneralRe: Plz help me...(Urgently)... Pin
Mycroft Holmes22-Mar-09 13:19
professionalMycroft Holmes22-Mar-09 13:19 
QuestionRewrite sql for Oracle and MySQL? Pin
devvvy20-Mar-09 1:12
devvvy20-Mar-09 1:12 
AnswerRe: Rewrite sql for Oracle and MySQL? Pin
Ashfield20-Mar-09 2:13
Ashfield20-Mar-09 2:13 

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.