監(jiān)理公司管理系統(tǒng) | 工程企業(yè)管理系統(tǒng) | OA系統(tǒng) | ERP系統(tǒng) | 造價(jià)咨詢(xún)管理系統(tǒng) | 工程設(shè)計(jì)管理系統(tǒng) | 甲方項(xiàng)目管理系統(tǒng) | 簽約案例 | 客戶(hù)案例 | 在線(xiàn)試用
X 關(guān)閉

更新未到訪(fǎng)視圖FZJView

申請(qǐng)免費(fèi)試用、咨詢(xún)電話(huà):400-8352-114

    SELECT   dbo.Clue.uClu_ID, dbo.Clue.dClu_CreateTime, dbo.Clue.cClu_Num, dbo.Clue.cClu_CName, dbo.Clue.iClu_Age,
                dbo.Clue.cClu_Phone, dbo.Grade.cGra_Name AS 年級(jí), dbo.ExtensionWorkers.cExtW_Num AS 推廣人員,
                dbo.Clue.cClu_State, dbo.Clue.cClu_KCGW, dbo.Channel.cCha_Name AS 渠道,
                TMKRecord.cTMKR_Intention AS 意向狀態(tài), dbo.Clue.dClu_CreateTime AS 創(chuàng)建時(shí) 間, dbo.Clue.cClu_HFRY
FROM      dbo.Clue LEFT OUTER JOIN
                dbo.Channel ON dbo.Clue.uClu_ChaId = dbo.Channel.uCha_ID LEFT OUTER JOIN
                    (SELECT   uCha_CluId
                     FROM      dbo.Charge AS Charge_1
                     GROUP BY uCha_CluId) AS Charge ON dbo.Clue.uClu_ID = Charge.uCha_CluId LEFT OUTER JOIN
                dbo.Grade ON dbo.Grade.uGra_ID = dbo.Clue.uClu_GraId LEFT OUTER JOIN
                dbo.ExtensionWorkers ON dbo.ExtensionWorkers.uExtW_ID = dbo.Clue.uClu_ExtWId LEFT OUTER JOIN
                    (SELECT   TMKRecord_1.uTMKR_CluId, MAX(TMKRecord_1.cTMKR_Intention) AS cTMKR_Intention,
                                     MAX(TMKRecord_1.dTMKR_ContactTime) AS dTMKR_ContactTime, COUNT(*) AS TMKCount,
                                     MAX(dbo.[User].cUser_Name) AS cUser_Name
                     FROM      dbo.TMKRecord AS TMKRecord_1 LEFT OUTER JOIN
                                     dbo.[User] ON TMKRecord_1.uTMKR_TMKId = dbo. [User].uUser_ID
                     GROUP BY TMKRecord_1.uTMKR_CluId) AS TMKRecord ON TMKRecord.uTMKR_CluId = dbo.Clue.uClu_ID
WHERE   (dbo.Clue.cClu_State = '未到訪(fǎng)') AND (Charge.uCha_CluId IS NULL)   FZJView
發(fā)布:2007-03-30 10:26    編輯:泛普軟件 · xiaona    [打印此頁(yè)]    [關(guān)閉]