Click here to Skip to main content
15,887,350 members
Home / Discussions / Database
   

Database

 
AnswerRe: database [crosspost] Pin
Eddy Vluggen10-Dec-09 0:36
professionalEddy Vluggen10-Dec-09 0:36 
AnswerRe: database Pin
Niladri_Biswas10-Dec-09 0:39
Niladri_Biswas10-Dec-09 0:39 
Questionproblem while import TXT file Pin
koolprasad20039-Dec-09 19:48
professionalkoolprasad20039-Dec-09 19:48 
AnswerRe: problem while import TXT file Pin
_Damian S_9-Dec-09 20:23
professional_Damian S_9-Dec-09 20:23 
GeneralRe: problem while import TXT file Pin
koolprasad200310-Dec-09 22:24
professionalkoolprasad200310-Dec-09 22:24 
QuestionTable result to Xml Pin
Fayu9-Dec-09 5:31
Fayu9-Dec-09 5:31 
AnswerRe: Table result to Xml Pin
Riaan Booyzen9-Dec-09 20:05
Riaan Booyzen9-Dec-09 20:05 
QuestionSQL query optimization Pin
Member 46483709-Dec-09 1:59
Member 46483709-Dec-09 1:59 
Hi All,

Thanks for those who take an interest in reading posts like these - and I sincerely hope that at least one of you can help me.

I am fairly new at SQL (without formal trianing...) so this might be very noob.

I have inherited the maintenance of a oldish software project. I am only getting to know the code and there is lot of it, so I feel a bit desperate. OK OK I'll get to the point!

My client needs me to solve a problem ASAP. They send out mail merge letters frm the application and they have a very sophisticated piece of code that allow you to filter the client database according to many criteria. When the criteria is entered it generates an integer (iParam below) that is used to filter a few tables. We use a autogenerated SQL statement for every report to populate it. The SP looks like this:
@iParam varchar(100)  AS 
SELECT 
ipkClientsID AS [ID], 
tblClients.sClientName AS [Client: Client Name], 
(SELECT CONVERT(varchar(8000), sTextValue) FROM tblReportSummary WHERE       ifkID = tblClients.ipkClientsID AND       iParam = @iParam AND       sFieldName = 'Client: Postal Address Group (R)')  AS [Client: Postal Address Group (R)] FROM tblClients 

WHERE ipkClientsID IN (SELECT ifkSelectedItemsID from tblSelectedItems where sID = @iParam)



as you can see the select statement is quite simple BUT for some reason the performance has gradually deteriorated over time to the point where every report that runs, times out or crashes the application (?).

I am hoping that you can take one look at it and say: That won't work well - try THIS!, as it might be a simple way of improving the select statement.

Much obliged!!! for any help or comments.

regards
Hawk
AnswerRe: SQL query optimization Pin
WoutL9-Dec-09 2:30
WoutL9-Dec-09 2:30 
GeneralRe: SQL query optimization [modified] Pin
Member 46483709-Dec-09 3:02
Member 46483709-Dec-09 3:02 
GeneralRe: SQL query optimization Pin
Member 46483709-Dec-09 3:47
Member 46483709-Dec-09 3:47 
GeneralRe: SQL query optimization Pin
WoutL9-Dec-09 20:46
WoutL9-Dec-09 20:46 
AnswerRe: SQL query optimization Pin
_Damian S_9-Dec-09 19:24
professional_Damian S_9-Dec-09 19:24 
Questionsystem error code 126 Pin
T21029-Dec-09 1:21
T21029-Dec-09 1:21 
Question"Syscomments" system table corrupted Pin
www.Developerof.NET9-Dec-09 0:28
www.Developerof.NET9-Dec-09 0:28 
AnswerRe: "Syscomments" system table corrupted Pin
Ashfield9-Dec-09 1:17
Ashfield9-Dec-09 1:17 
QuestionSQL Copy Table in C# Pin
bxlorenz8-Dec-09 13:40
bxlorenz8-Dec-09 13:40 
AnswerRe: SQL Copy Table in C# Pin
loyal ginger8-Dec-09 15:49
loyal ginger8-Dec-09 15:49 
AnswerRe: SQL Copy Table in C# Pin
Niladri_Biswas8-Dec-09 21:36
Niladri_Biswas8-Dec-09 21:36 
AnswerRe: SQL Copy Table in C# Pin
Paul Voicu10-Dec-09 2:06
Paul Voicu10-Dec-09 2:06 
QuestionINSTEAD OF trigger Pin
Member 47041438-Dec-09 13:34
Member 47041438-Dec-09 13:34 
AnswerRe: INSTEAD OF trigger Pin
David Skelly8-Dec-09 23:43
David Skelly8-Dec-09 23:43 
GeneralRe: INSTEAD OF trigger [modified] Pin
Member 47041439-Dec-09 0:30
Member 47041439-Dec-09 0:30 
Questionsqlserver apostrophe problem. Pin
gerrybrennan7-Dec-09 20:54
gerrybrennan7-Dec-09 20:54 
AnswerRe: sqlserver apostrophe problem. Pin
Ashfield7-Dec-09 20:56
Ashfield7-Dec-09 20:56 

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.