select *
from qryItems
where rowNumber =
select *
from qryItems
where salesubjectid =
select interactiondate, partnerid, partnertype
from tbl_crm_interactions
where interactionid =
and ownerid =
and ownertype =
select *
from qmd_stages
where statusCode = 'I'
select *
from qmd_stages
where statusCode != 'I'
select sku, skuDesc, mfrid
from tbl_prd_skus with (nolock)
where ownerid =
and fsl_tablecode =
and skuid =
select product, shortDesc, mfrid
from tbl_prd_products with (nolock)
where ownerid =
and fsl_tablecode =
and prodid =
select reasonid
from qcf_getNoSaleReasonsForItem
where requireCompetitor = 'Y'
select reasonid
from qcf_getNoSaleReasonsForItem
where requireComment = 'Y'
select *
from qryPurchProfileAB
where updateid <>
select osd.subjectDetailId as skuid, opp.availabledate, opp.stageid, QuantityAmt, QuantityUnit,
DurationAmt, DurationUnit, UpdateDate, caseAmt, opp.typeCode
from tbl_spl_opportunities opp
inner join tbl_SPL_OpportunitySubjectDetails osd
on osd.opportunityid = opp.opportunityid
where opp.ownerid =
and opp.ownertype =
and opp.partnertype =
and opp.partnerid =
and opp.stageid in ()
and osd.SubjectDetailType = 'sku'
and osd.subjectDetailId =
select skuid, sampleStatus, sampleDate
from tbl_OPR_ProductStatus
where ownerId =
and ownerType =
and operatorid =
and skuid =
and updateid <>
select int.interactiondate as sampleDate
from tbl_crm_interactions int with (nolock)
inner join tbl_crm_interactionsaledetails isd with (nolock)
on isd.interactionid = int.interactionid
and isd.ownerid = int.ownerid
and isd.ownertype = int.ownertype
and isd.salesubjecttype = 'prd'
and isd.salesubjectid =
and isd.samplestatus = 's'
where int.ownerid =
and int.ownertype =
and int.partnerid =
and int.partnertype =
and int.interactionid <>
and int.disposition <> '?'
order by int.interactionDate desc