Problematic Queries
well i m facing a time out prob in my databse and server
i think that there is oem prob in quaer plz check an do let me know plz
declare @id uniqueidentifier
declare @type varchar(50)
set @id = '048E29F9-29BF-4ABD-B24E-05ADE41FCFF9'
set @type = 'BM'
--CREATE PROCEDURE proInComingTransactionsCOC(@type varchar(50), @id varchar(50)) AS
--BEGIN
--if @type='MUTHOOT'
--BEGIN
Select
td.Id,
td.PayinDateTime,
td.TransactionNumber,
td.Status,
td.RecommendedPayOutAgentId,
cd.BFName +' '+ cd.BLName as Name,
td.PayOutAmount as PayOutAmount,
ll.Name as City
From
TransactionDetails td
inner join PaymentModeList pml on td.Paymentmode=pml.Value
inner join CustomerDetails cd on td.ID=cd.TransactionID
inner join LocationList ll on ll.ID=td.PayoutLocationID
Where td.RecommendedPayOutAgentId
In (Select Id From AgentLocationList Where AgentAccountId=@Id and Name like '%Muthoot%')
And td.Status = 'Processed' --And PaymentMode Not Like '%Draft%'
and pml.Prefix = 'COC' order by td.PayinDatetime;
|