使用Oracle 11g,我有以下LDAP字符串,它只是我在此嘗試演示的一個子集。Oracle字符串文字太長 - 字符串中的數據提取
基本上我有一個非常長的字符串,導致我'字符串文字太長'的問題,基本上在這個字符串,我希望能夠去掉我不想或甚至更好的位,去掉我需要的唯一一點。
這僅僅是字符串內容/長度的短版本:
Member of = CN=aTIGERAdmin-Admin, CN=D0902498, CN=ea90045052, CN=aTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=aTIGERAdmin-Admin, CN=ea90045052, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=aTIGERCall-Admin, CN=aTIGERAdmin-Admin, CN=D0902498, CN=ea90045052, CN=aTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=aTIGERAdmin-Admin, CN=ea90045052, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=DAaTIGERCall-Admin, CN=aTIGERCall-Admin,
假設上面的比長4000個字符。我的問題是,使用Oracle SQL和PL/SQL以及上面的「字符串成員」,我需要以某種方式過濾只看起來像'CN = aTIGER%'的位,並完全忽略類似' CN = DAaTIGER%',我相信,我們解決了我的字符串文字問題,但我無法首先過濾出來,因爲我的原始字符串已經超過4000個字符長。
有人可以幫助一種方式使用pl/sql,一種只會返回「CN = aTIGER%」中的「成員」內的條目,並完全忽略類似'CN = DAaTIGER% '同時,確保結果最後還有一個逗號。
我是否需要將它分配給CLOB,然後處理我需要的條目 - 只是不確定如何處理這個問題並解決我的問題?
謝謝。
「CN = D0902498」或「CN = ea90045052」這樣的條目怎麼樣? –
引起錯誤的文字有多長?你有沒有嘗試將字符串分成一個varray? – ipip