Dariusz Tomczyk2021-12-22T08:51:49Z11.8132
9090
13260
480
45
False
False
Project/Opp Number
Account
Account Number (Account)
Project Name
Contact
Priority
Source Campaign
Project Success
Currency Name (Currency)
Info from
Decision date
Sales area
Responsible
application technology
Back office
Presales
halfenspecified
Project hierarchy
Potential Customer
Country
Postcode
Town
Types of Project
Street
Project phase
Created On
Import Number
Date of Submission
BIM designed
International Project
HALFEN Specified
competitor
User Provided
System Calculated
Estimation (Base)
(opportunityid)
Currency
3
4
4
False
False
Query from Microsoft CRM
DRIVER=SQL Server;APP=Microsoft Office 2003;Network=DBMSSOCN;Trusted_Connection=Yes;SERVER=BEBRS01DB067\P_CRM_HAL;DATABASE=HalfenPROD_MSCRMselect
top 10000 "opportunity0".name as "name"
, "opportunity0".orb_projectnumber as "orb_projectnumber"
, "opportunity0".orb_stepcodename as "orb_stepcodename"
, "opportunity0".owneridname as "owneridname"
, "opportunity0".orb_city as "orb_city"
, "opportunity0".createdon as "createdon"
, "opportunity0".opportunityid as "opportunityid"
, "opportunity0".orb_postalcode as "orb_postalcode"
, "opportunity0".orb_countrycodename as "orb_countrycodename"
, "opportunity0".orb_objecttypecodename as "orb_objecttypecodename"
, "opportunity0".orb_territoryidname as "orb_territoryidname"
, "opportunity0".orb_typesofpojectname as "orb_typesofpojectname"
, "opportunity0".orb_projectsuccessname as "orb_projectsuccessname"
, "opportunity0".prioritycodename as "prioritycodename"
, "opportunity0".customeridname as "customeridname"
, "opportunity0".orb_importnumber as "orb_importnumber"
, "opportunity0".orb_halfenspecifiedname as "orb_halfenspecifiedname"
, "opportunity0".new_applicationtechnologyname as "new_applicationtechnologyname"
, "opportunity0".parentaccountidname as "parentaccountidname"
, "opportunity0".parentcontactidname as "parentcontactidname"
, "opportunity0".campaignidname as "campaignidname"
, "opportunity0".new_orb_bimdesignedname as "new_orb_bimdesignedname"
, "opportunity0".orb_dateofrequest as "orb_dateofrequest"
, "opportunity0".orb_stepcodechangedon as "orb_stepcodechangedon"
, "opportunity0".orb_dateofsubmission as "orb_dateofsubmission"
, "opportunity0".orb_internationalobjectname as "orb_internationalobjectname"
, "opportunity0".new_halfenspecifiedname as "new_halfenspecifiedname"
, "opportunity0".new_competitorname as "new_competitorname"
, "opportunity0".new_objektmanagername as "new_objektmanagername"
, "opportunity0".new_kamftwname as "new_kamftwname"
, "opportunity0".new_userprovided as "new_userprovided"
, "opportunity0".orb_potential_base as "orb_potential_base"
, "opportunity0".new_systemcalculated as "new_systemcalculated"
, "opportunity0".orb_street as "orb_street"
, "opportunity0".transactioncurrencyidname as "transactioncurrencyidname"
, "a_76946cd0245c4349bbb98a1ed211155a".accountnumber as "a_76946cd0245c4349bbb98a1ed211155a.accountnumber"
, "a_c00caa54ac8841f99b16c4efd0edbb08".currencyname as "a_c00caa54ac8841f99b16c4efd0edbb08.currencyname"
from
FilteredOpportunity as "opportunity0" left outer join FilteredAccount as "a_76946cd0245c4349bbb98a1ed211155a" on ("opportunity0".parentaccountid = "a_76946cd0245c4349bbb98a1ed211155a".accountid) left outer join FilteredTransactionCurrency as "a_c00caa54ac8841f99b16c4efd0edbb08" on ("opportunity0".transactioncurrencyid = "a_c00caa54ac8841f99b16c4efd0edbb08".transactioncurrencyid)
where
("opportunity0".statecode = 0 and "opportunity0".statuscode = 1 and ("opportunity0".orb_stepcode != 169810004 or "opportunity0".orb_stepcode is null) and ("opportunity0".orb_objecttypecode in (169810001
, 169810002
, 169810000)) and opportunity0.createdonutc >= '20171231 23:00:00' and "opportunity0".orb_projectsuccess = 169810000 and ("opportunity0".orb_territoryid in (N'82B6DC26-77B1-E211-B0FD-02BF0AFE00B4'
, N'CC6C1D45-76B1-E211-B0FD-02BF0AFE00B4'
, N'F91E580D-77B1-E211-B0FD-02BF0AFE00B4'
, N'202293EE-76B1-E211-B0FD-02BF0AFE00B4'
, N'3AD6EF1A-77B1-E211-B0FD-02BF0AFE00B4'
, N'BF60F3BC-76B1-E211-B0FD-02BF0AFE00B4'
, N'425736FF-76B1-E211-B0FD-02BF0AFE00B4'
, N'CDC7BDEB-77B1-E211-B0FD-02BF0AFE00B4'
, N'DE6DEA2C-9C59-E211-9351-02BF0AFE00B4'
, N'AEBF7BAA-77B1-E211-B0FD-02BF0AFE00B4'
, N'193167D0-77B1-E211-B0FD-02BF0AFE00B4'
, N'146704A3-86EF-E211-B0FD-02BF0AFE00B4'
, N'0BBD8206-78B1-E211-B0FD-02BF0AFE00B4'
, N'3FBB1322-C301-E411-B0FD-02BF0AFE00B4'
, N'52DCEEE1-77B1-E211-B0FD-02BF0AFE00B4'
, N'5BBB1322-C301-E411-B0FD-02BF0AFE00B4'
, N'97BB1322-C301-E411-B0FD-02BF0AFE00B4'
, N'B3BB1322-C301-E411-B0FD-02BF0AFE00B4'
, N'C9BB1322-C301-E411-B0FD-02BF0AFE00B4'
, N'D5BB1322-C301-E411-B0FD-02BF0AFE00B4'))) order by
"opportunity0".orb_projectnumber desc
, "opportunity0".opportunityid asc2
2
1
orb_projectnumber
2
parentaccountidname
3
a_76946cd0245c4349bbb98a1ed211155a.accountnumber
4
name
5
parentcontactidname
6
prioritycodename
7
campaignidname
8
orb_projectsuccessname
9
a_c00caa54ac8841f99b16c4efd0edbb08.currencyname
10
orb_dateofrequest
11
orb_stepcodechangedon
12
orb_territoryidname
13
owneridname
14
new_applicationtechnologyname
15
new_objektmanagername
16
new_kamftwname
17
orb_halfenspecifiedname
18
orb_objecttypecodename
19
customeridname
20
orb_countrycodename
21
orb_postalcode
22
orb_city
23
orb_typesofpojectname
24
orb_street
25
orb_stepcodename
26
createdon
27
orb_importnumber
28
orb_dateofsubmission
29
new_orb_bimdesignedname
30
orb_internationalobjectname
31
new_halfenspecifiedname
32
new_competitorname
33
new_userprovided
34
new_systemcalculated
35
orb_potential_base
36
opportunityid
37
transactioncurrencyidname
38