Oracle Query - help

來源: Risk 2012-08-08 13:41:08 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (26910 bytes)

Why the following code not work -invalid identifier  on documentation_level_desc .


 


SELECT  TO_NUMBER (l.loan_number) AS srvcnum,


         l.product_type_id AS cmdm_Market_Type_num,


        


         (SELECT documentation_level_desc


            FROM CMDMmgr.documentation_level_type d


           WHERE o.documentation_level_id = d.documentation_level_id)


            AS cmdm_doc_type,


           


         (SELECT SPECIAL_FEATURE_CODE


            FROM CMDMmgr.SPECIAL_FEATURE sf


           WHERE TO_NUMBER (lsf.SPECIAL_FEATURE_ID) = sf.SPECIAL_FEATURE_ID)


            AS Harp_CODE


           


    FROM CMDMmgr.loan l


         LEFT JOIN CMDMmgr.loan_origination o


            ON l.loan_number = o.loan_number


         LEFT JOIN CMDMmgr.LOAN_SPECIAL_FEATURE lsf


            ON l.loan_number = lsf.loan_number


   WHERE (product_type_id in (103, 104, 108, 116, 117, 119, 123,


                                                                                    731, 732, 733, 734, 735, 737, 738, 739)


                                                or documentation_level_desc in ('Signature NCO New Value' 'Signature NCO Orig Value')


                                                or SPECIAL_FEATURE_CODE in ('X908' 'T746' 'T786' 'T839' 'T840')


                )

所有跟帖: 

Add a 逗號 in the in clause of last two lines. -美國老土- 給 美國老土 發送悄悄話 美國老土 的博客首頁 (0 bytes) () 08/08/2012 postreply 14:00:10

回複:still not working -Risk- 給 Risk 發送悄悄話 (30174 bytes) () 08/08/2012 postreply 14:16:38

put table name in front of -gchai- 給 gchai 發送悄悄話 gchai 的博客首頁 (772 bytes) () 08/08/2012 postreply 15:12:38

先看一下這個 -安心草- 給 安心草 發送悄悄話 安心草 的博客首頁 (2611 bytes) () 08/08/2012 postreply 15:24:24

你所指代的 o and lsf 分別在這兩個 -JJGL- 給 JJGL 發送悄悄話 (6629 bytes) () 08/08/2012 postreply 16:50:20

o, lsf沒有問題,是main query的兩個table alias. 問題出在 -布衣之才- 給 布衣之才 發送悄悄話 布衣之才 的博客首頁 (428 bytes) () 08/08/2012 postreply 20:09:14

回複:Oracle Query - help -nopanic- 給 nopanic 發送悄悄話 (1104 bytes) () 08/08/2012 postreply 18:49:54

回複:Oracle Query - help -花心野趣- 給 花心野趣 發送悄悄話 花心野趣 的博客首頁 (20609 bytes) () 08/08/2012 postreply 19:01:24

為啥不都用join呢? -smile2- 給 smile2 發送悄悄話 (2538 bytes) () 08/08/2012 postreply 19:36:05

回複:Oracle Query - help -布衣之才- 給 布衣之才 發送悄悄話 布衣之才 的博客首頁 (25703 bytes) () 08/08/2012 postreply 20:12:35

the issues of the query -ffppyy- 給 ffppyy 發送悄悄話 (1467 bytes) () 08/08/2012 postreply 22:15:23

2nd line from last, need d.documentation_level_desc since your ' -kamioka- 給 kamioka 發送悄悄話 kamioka 的博客首頁 (0 bytes) () 08/09/2012 postreply 16:18:34

since your 'from' is file l but documentation_level_desc is from -Kamioka- 給 Kamioka 發送悄悄話 Kamioka 的博客首頁 (0 bytes) () 08/09/2012 postreply 16:21:02

documentation_level_desc is from d. also need sf. in front of th -Kamioka- 給 Kamioka 發送悄悄話 Kamioka 的博客首頁 (0 bytes) () 08/09/2012 postreply 16:22:52

also need sf. in front of the variable in last line. -Kamioka- 給 Kamioka 發送悄悄話 Kamioka 的博客首頁 (0 bytes) () 08/09/2012 postreply 16:24:09

請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”