Click here to Skip to main content
16,004,944 members
Home / Discussions / Database
   

Database

 
GeneralSQL database login and password connection string Pin
Cory Kimble12-Feb-08 2:53
Cory Kimble12-Feb-08 2:53 
AnswerRe: SQL database login and password connection string Pin
Ashfield12-Feb-08 3:36
Ashfield12-Feb-08 3:36 
GeneralRe: SQL database login and password connection string Pin
Cory Kimble13-Feb-08 10:57
Cory Kimble13-Feb-08 10:57 
GeneralRe: SQL database login and password connection string Pin
Cory Kimble13-Feb-08 10:57
Cory Kimble13-Feb-08 10:57 
GeneralDisplay Duplicate Rows Only once Pin
Kodanda Pani12-Feb-08 2:23
Kodanda Pani12-Feb-08 2:23 
GeneralRe: Display Duplicate Rows Only once Pin
Paddy Boyd12-Feb-08 2:53
Paddy Boyd12-Feb-08 2:53 
GeneralRe: Display Duplicate Rows Only once Pin
Kodanda Pani12-Feb-08 12:30
Kodanda Pani12-Feb-08 12:30 
GeneralRe: Display Duplicate Rows Only once [modified] Pin
David Branscome12-Feb-08 12:43
David Branscome12-Feb-08 12:43 
-- ALWAYS TEST FIRST

-- I don't have your table name
-- REPLACE "TABLE" WITH THE ACTUAL TABLE NAME
-- Try this to select the dups

select count(*),FirstName , LastName , City
from "TABLE"
group by FirstName , LastName , City
having count(*) > 1


-- select the data into another table and TEST THIS
-- REPLACE "TABLE" WITH THE ACTUAL TABLE NAME
--*********************** DELETE DUPS ***************************************
-- the Magic is in the rowcount setting!!! make sure it is set to 1 at the start and 0 on completion

set rowcount 1
while exists (select FirstName,LastName,City
from "TABLE"
group by FirstName , LastName , City
having count(*) > 1)
begin
delete T
from "TABLE" T
inner join (select FirstName,LastName,City
from "TABLE"
group by FirstName,LastName,City
having count(*) > 1) dup on T.FirstName = dup.FirstName and T.LastName = dup.LastName and T.City = dup.City
end
go

set rowcount 0
go

Good Luck DBranscome Phoenix AZ

David Branscome

modified on Tuesday, February 12, 2008 7:19 PM

GeneralAn acute problem with MSMDPump.dll Pin
Vasudevan Deepak Kumar12-Feb-08 2:13
Vasudevan Deepak Kumar12-Feb-08 2:13 
Questioncan any one tell , what is the best use of view, how to create and execute, how to user trigger, i try...... Pin
Shaik Haneef12-Feb-08 1:33
Shaik Haneef12-Feb-08 1:33 
GeneralWhich edition of sql server in suitable for ny application. Pin
r_mohd12-Feb-08 1:32
r_mohd12-Feb-08 1:32 
GeneralRe: Which edition of sql server in suitable for ny application. Pin
GuyThiebaut12-Feb-08 5:48
professionalGuyThiebaut12-Feb-08 5:48 
GeneralRe: Which edition of sql server in suitable for ny application. Pin
r_mohd12-Feb-08 17:41
r_mohd12-Feb-08 17:41 
QuestionMS CRM Reporting Services Pin
wolfgangmull11-Feb-08 22:06
wolfgangmull11-Feb-08 22:06 
QuestionGetting "When connecting to SQL Server 2005 Error" using MS SQL 2000? Pin
eyeseetee11-Feb-08 21:48
eyeseetee11-Feb-08 21:48 
Generalsqlserver2005 Pin
Jeeno24711-Feb-08 21:24
Jeeno24711-Feb-08 21:24 
GeneralRe: sqlserver2005 Pin
Joe11-Feb-08 22:24
Joe11-Feb-08 22:24 
Questionsqlserver2000 database backup Pin
renuka9011-Feb-08 20:21
renuka9011-Feb-08 20:21 
GeneralRe: sqlserver2000 database backup Pin
D. Shyam11-Feb-08 21:04
D. Shyam11-Feb-08 21:04 
GeneralFirewalls and remote connections Pin
blackjack215011-Feb-08 19:32
blackjack215011-Feb-08 19:32 
Questionsql and pl/ sql [modified] Pin
Member 470807711-Feb-08 18:57
Member 470807711-Feb-08 18:57 
GeneralRe: sql and pl/ sql Pin
Christian Graus11-Feb-08 19:00
protectorChristian Graus11-Feb-08 19:00 
GeneralRe: sql and pl/ sql Pin
Joe11-Feb-08 19:34
Joe11-Feb-08 19:34 
Questionsqlserver [modified] Pin
Member 470807711-Feb-08 18:49
Member 470807711-Feb-08 18:49 
NewsRe: sqlserver Pin
Venkatesh Mookkan11-Feb-08 18:57
Venkatesh Mookkan11-Feb-08 18:57 

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.