18. Januar 2010 16:01
18. Januar 2010 16:06
18. Januar 2010 16:56
Select FilteredOpportunity.name, FilteredOpportunity.opportunityid, FilteredQuote.opportunityid
FROM FilteredOpportunity LEFT OUTER JOIN FilteredQuote ON FilteredOpportunity.opportunityid = FilteredQuote.opportunityid
WHERE FilteredQuote.opportunityid = null
DECLARE @SQL nvarchar(max)
SET @SQL = 'select opportunity0.owneridname as ''owneridname'', opportunity0.ownerid as ''ownerid'', opportunity0.name as ''name'', opportunity0.new_gewumsatz_base as ''new_gewumsatz_base'', opportunity0.crm_moneyformatstring as ''crm_moneyformatstring'', opportunity0.new_gewumsatz as ''new_gewumsatz'', opportunity0.estimatedvalue_base as ''estimatedvalue_base'', opportunity0.estimatedvalue as ''estimatedvalue'', opportunity0.customeridname as ''customeridname'', opportunity0.customerid as ''customerid'', opportunity0.closeprobability as ''closeprobability'', opportunity0.estimatedclosedate as ''estimatedclosedate'', opportunity0.opportunityid as ''opportunityid'', LE_B1C3FC20.parentcustomeridname as ''LE_B1C3FC20_parentcustomeridname'', LE_B1C3FC20.parentcustomerid as ''LE_B1C3FC20_parentcustomerid'', FilteredQuote.opportunityid as "QuoteOpportunityId" from
FilteredOpportunity as opportunity0 left outer join FilteredContact as LE_B1C3FC20 on (opportunity0.customerid = LE_B1C3FC20.contactid) left outer join FilteredQuote on (opportunity0.opportunityid = FilteredQuote.opportunityid) WHERE FilteredQuote.opportunityid = null ' EXEC (@SQL)
18. Januar 2010 17:10
Select * from FilteredOpportunity where FilteredOpportunity nit in (Select FilteredOpportunity from FilteredQuote
18. Januar 2010 17:27