You are on page 1of 2

Select top 10 *from CASEMANAGER.

PmCase with(nolock) where CaseTypeId=4 and StatusId


in(3230,3233) order by 1 desc

Select *from TOLLPLUS.REF_LOOKUPTYPECODES_HIERARCHY with(nolock) where


PARENT_LOOKUPTYPECODEID=3229--2015098514

select *from CASEMANAGER.PmCaseTypes with(nolock) where Parent_CaseTypeID=96

Select top 100 *from TOLLPLUS.MbsHeader m1 with(nolock)


where MbsGeneratedDate>='20220601'
and QACategory='002' and IsPresentMbs=0 and
exists (Select 1 from TOLLPLUS.MbsHeader m2 with(nolock) where
m1.CustomerId=m2.CustomerId and m2.IsPresentMbs=1 and m2.QACategory!='002' and
CurrentChargesToll>0)
order by 1

Select top 10 *from TOLLPLUS.MbsHeader mh with(nolock)

where
IsPresentMbs=1 and
exists(Select 1 from TOLLPLUS.MbsInvoices mi with(nolock) where mh.MbsId=mi.MbsId
and mi.AgeStageID=1 )
and exists(Select 1 from TOLLPLUS.MbsInvoices mi with(nolock) where
mh.MbsId=mi.MbsId and mi.AgeStageID=2 )
and exists(Select 1 from TOLLPLUS.MbsInvoices mi with(nolock) where
mh.MbsId=mi.MbsId and mi.AgeStageID=3 )
and not exists(Select 1 from TOLLPLUS.MbsInvoices mi with(nolock) where
mh.MbsId=mi.MbsId and mi.AgeStageID=4 )
and not exists(Select 1 from TOLLPLUS.MbsInvoices mi with(nolock) where
mh.MbsId=mi.MbsId and mi.AgeStageID=5 )
and not exists(Select 1 from TOLLPLUS.MbsInvoices mi with(nolock) where
mh.MbsId=mi.MbsId and mi.AgeStageID=6 )
order by 1 desc

Select top 100 *from TOLLPLUS.MbsHeader m1 with(nolock)


where
QACategory='002' and IsPresentMbs=1
order by 1 desc

select *from TOLLPLUS.STAGING_UNBILLEDTRANSACTIONS with(nolock)

select *from TOLLPLUS.STAGING_PREVIOUSINVOICES with(nolock)

select *from TOLLPLUS.STAGING_PREVIOUSINVOICETXNS with(nolock) where


INVOICEID=131009265

Select *from Tollplus.MbsFinanceTxnDetails

Select *from TOLLPLUS.MbsHeader with(nolock) where CustomerId=2015161266

Select *from TOLLPLUS.MbsInvoices with(nolock) where mbsid=1244398348

select *from TOLLPLUS.INVOICE_HEADER with(nolock) where INVOICEID=139100290


Select *from TOLLPLUS.InvoiceAttributes with(nolock) where
InvoiceNumber='1237482510'

Select *from FINANCE.ADJUSTMENTS with(nolock) where customerid=2009528172

Select *from FINANCE.ADJUSTMENT_LINEITEMS with(nolock) where ADJUSTMENTID in(Select


ADJUSTMENTID from FINANCE.ADJUSTMENTS with(nolock) where customerid=2009528172)

select AGESTAGEID,* from TOLLPLUS.INVOICE_HEADER with(nolock) where


customerid=2009528172 order by 1
Select *from TOLLPLUS.INVOICE_LINEITEMS with(nolock) where REFERENCEINVOICEID
in(select Invoicenumber from TOLLPLUS.INVOICE_HEADER with(nolock) where
customerid=2009528172) order by 1

select *from TOLLPLUS.TP_CUSTOMER_ACTIVITIES with(nolock) where


customerid=2009528172 order by 1 desc

Select *from TOLLPLUS.INVOICE_CHARGES_TRACKER with(nolock) where INVOICEID


in(select INVOICEID from TOLLPLUS.INVOICE_HEADER with(nolock) where
customerid=2009528172) order by 1

Select *from TOLLPLUS.TP_CUSTTXNS with(nolock) where customerid=2009528172 order


by 1 desc

Select *from TOLLPLUS.TP_CUSTOMER_BALANCES with(nolock) where


customerid=2009528172 order by 1 desc

You might also like