Click here to Skip to main content
15,892,480 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionTimeout Problem Pin
SreejithKumar M14-May-10 18:34
SreejithKumar M14-May-10 18:34 
AnswerRe: Timeout Problem Pin
Brij14-May-10 20:01
mentorBrij14-May-10 20:01 
GeneralRe: Timeout Problem Pin
SreejithKumar M14-May-10 20:15
SreejithKumar M14-May-10 20:15 
GeneralRe: Timeout Problem Pin
Brij14-May-10 20:26
mentorBrij14-May-10 20:26 
GeneralRe: Timeout Problem Pin
SreejithKumar M14-May-10 20:33
SreejithKumar M14-May-10 20:33 
GeneralRe: Timeout Problem Pin
Brij15-May-10 18:01
mentorBrij15-May-10 18:01 
GeneralRe: Timeout Problem Pin
SreejithKumar M16-May-10 17:06
SreejithKumar M16-May-10 17:06 
GeneralRe: Timeout Problem Pin
Suresh Pirsquare18-May-10 3:43
Suresh Pirsquare18-May-10 3:43 
To me, the query is not well optimized and I think, you should optimize your stored procedure.

I have optimized the query and it may work for you: -

WITH DuplicateRecords(Name,StreetAddress,City,State,ZipCode,Telephone,SecondaryPhone,AddressPK) AS
(
SELECT T1.[Name],T1.[StreetAddress],T1.[City],T1.[State],T1.[ZipCode],T1.[Telephone],T1.[SecondaryPhone],COUNT(*) AS 'NoOfEntries',min(AddressPK) as 'AddressPK' from #Test1
GROUP BY T1.[Name],T1.[StreetAddress],T1.[City],T1.[State],T1.[ZipCode],T1.[Telephone],T1.[SecondaryPhone] HAVING COUNT(*) > 1
ORDER BY T1.[Name],T1.[StreetAddress],T1.[City],T1.[State],T1.[ZipCode],T1.[Telephone],T1.[SecondaryPhone]
)


INSERT INTO tblLocalDataDuplicate ([AddressPK],[SlNo], [CategoryID],[ProjectID],
[WebUrl],[Name],[StreetAddress],[City],[State],[ZipCode],[Telephone],[SecondaryPhone],
[EmailID],[EnteredDate],[UpdatedDate],[UserId])
SELECT T1.[AddressPK],T1.[SlNo],T1.[CategoryID],T1.[ProjectID],T1.[WebUrl],T1.[Name],T1.[StreetAddress],T1.[City],T1.[State],T1.[ZipCode],T1.[Telephone],T1.[SecondaryPhone],T1.[EmailID],T1.[EnteredDate],T1.[UpdatedDate],T1.[UserId]
FROM tblLocalData T1 INNER JOIN DuplicateRecords T2
ON T1.addresspk = T2.AddressPK


--Delete the duplicate records
DELETE tblLocalData
WHERE addresspk IN(SELECT AddressPK FROM DuplicateRecords)


please let me know when you are done.

I hope this may help you.

Regards,

Suresh Dayma
Everything Is Possible!

AnswerRe: Timeout Problem Pin
Sandeep Mewara15-May-10 18:56
mveSandeep Mewara15-May-10 18:56 
QuestionHow to e-mail 404 errors Pin
Larry Antram14-May-10 14:06
Larry Antram14-May-10 14:06 
AnswerRe: How to e-mail 404 errors Pin
Larry Antram15-May-10 9:23
Larry Antram15-May-10 9:23 
QuestionPlease give me answer Pin
indian14314-May-10 12:10
indian14314-May-10 12:10 
AnswerRe: Please give me answer Pin
Dr.Walt Fair, PE14-May-10 12:39
professionalDr.Walt Fair, PE14-May-10 12:39 
GeneralRe: Please give me answer Pin
indian14314-May-10 12:59
indian14314-May-10 12:59 
GeneralRe: Please give me answer Pin
Dr.Walt Fair, PE14-May-10 13:09
professionalDr.Walt Fair, PE14-May-10 13:09 
GeneralRe: Please give me answer Pin
Not Active14-May-10 15:43
mentorNot Active14-May-10 15:43 
GeneralRe: Please give me answer Pin
indian14314-May-10 16:02
indian14314-May-10 16:02 
QuestionChanging the style sheet for a asp content page based on the version of IE (javascript?) Pin
Steve Holdorf14-May-10 6:46
Steve Holdorf14-May-10 6:46 
AnswerRe: Changing the style sheet for a asp content page based on the version of IE (javascript?) Pin
Brij14-May-10 7:54
mentorBrij14-May-10 7:54 
AnswerRe: Changing the style sheet for a asp content page based on the version of IE (javascript?) Pin
Steve Holdorf15-May-10 6:08
Steve Holdorf15-May-10 6:08 
QuestionSingleton Pattern Pin
Brendan Vogt14-May-10 5:36
Brendan Vogt14-May-10 5:36 
AnswerRe: Singleton Pattern Pin
Brij14-May-10 7:56
mentorBrij14-May-10 7:56 
GeneralRe: Singleton Pattern Pin
Brendan Vogt14-May-10 8:56
Brendan Vogt14-May-10 8:56 
QuestionASTreeView help Pin
vishnukamath14-May-10 2:24
vishnukamath14-May-10 2:24 
QuestionCannot open database "ASPState" requested by the login. The login failed Pin
Satish_S14-May-10 2:17
Satish_S14-May-10 2:17 

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.