You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

53 lines
1.6 KiB

------------------------------------
--用途:得到?体?象的??信息
--?目名?:
--?明:
--??:2015/11/2 下午 05:38:35
------------------------------------
ALTER PROCEDURE [dbo].[OSP_OTB_SAL_BusinessChance_GetModel]
@OrganizationID VARCHAR(50) ,
@CaseID VARCHAR(10)
AS
SELECT OrganizationID ,
CaseID ,
ProjectName ,
Department ,
dbo.OFN_SYS_DepartmentNameByDepartmentID(OrganizationID,
Department) AS DepartmentName ,
Person ,
ContractCustomers ,
ActualCustomer ,
ProjectContent ,
OpenTo ,
OpenToAuthority ,
PartDeptName ,
Status ,
UndoneReason ,
GetOrderDate ,
DeliveryDate ,
AcceptanceDate ,
Confidence ,
AllAmounts ,
OutCosts ,
InsideCosts ,
Profit ,
Memo ,
AttachmentID ,
CreateUser ,
CreateDate ,
ModifyUser ,
ModifyDate ,
( SELECT DepartmentName + '|'
FROM dbo.OTB_SYS_Departments
WHERE CHARINDEX(',' + DepartmentID + ',',
',' + PartDeptName + ',') > 0
AND OrganizationID = OrganizationID
FOR
XML PATH('')
) AS PartDept,
CustomerID,
PrjType
FROM [OTB_SAL_BusinessChance]
WHERE OrganizationID = @OrganizationID
AND CaseID = @CaseID