प्रयास करें कि इस तरह की गाड़ी वापसी या खड़ी टैब या पंक्ति के अंत के रूप में प्रिंट न हो सकने वर्ण हैं एक मूल्य जानने के लिए आप regexp_like फ़ंक्शन का उपयोग कर सकते हैं। आपके मामले में पंक्तियां प्रदर्शित करने के लिए जहां किसी विशेष कॉलम के स्ट्रिंग मान में अंत में कैरिज रिटर्न होता है, उसी तरह की क्वेरी का उपयोग किया जा सकता है।
select *
from your_table_name
where regexp_like(trim(string_column), '[[:space:]]$')
Demo
टिप्पणी
Trim
समारोह डिफ़ॉल्ट रूप से, प्रमुख और रिक्त स्थान अनुगामी हटाने से करने के लिए उत्तर और यह पंक्ति का गाड़ी वापसी या अंत नहीं हटेंगे अक्षर। एक साधारण परीक्षण बाहर ले जाने की सुविधा देता है:
SQL> create table Test_Table(
2 id number,
3 col1 varchar2(101)
4 );
Table created
SQL> insert into Test_Table (id, col1)
2 values(1, 'Simple string');
1 row inserted
SQL> commit;
Commit complete
SQL> insert into Test_Table (id, col1)
2 values(1, 'Simple string with carriage return at the end' || chr(13));
1 row inserted
SQL> commit;
Commit complete
SQL> insert into Test_Table (id, col1)
2 values(1, ' Simple string with carriage return at the end leading and trailing spaces' || chr(13)||' ');
1 row inserted
SQL> commit;
Commit complete
SQL> insert into Test_Table (id, col1)
2 values(1, ' Simple string leading and trailing spaces ');
1 row inserted
SQL> commit;
Commit complete
SQL> select *
2 from test_table;
ID COL1
--------------------------------------------------------------------------------
1 Simple string
1 Simple string with carriage return at the end
1 Simple string with carriage return at the end leading and trailing spaces
1 Simple string leading and trailing spaces
SQL>
SQL> select *
2 from test_table
3 where regexp_like(trim(col1), '[[:space:]]$')
4 ;
ID COL1
----------------------------------------------------------------------------------
1 Simple string with carriage return at the end
1 Simple string with carriage return at the end leading and trailing spaces
SQL>
स्रोत
2012-10-03 16:27:12
'[[: space:]] $ 'का क्या हिस्सा वास्तव में कैरिज रिटर्न की जांच कर रहा है? क्या यह '$' है? – raffian
'[[: space:]]' - कैरिज रिटर्न की तलाश (और उत्तर में उल्लिखित अन्य गैर-प्रिंट करने योग्य वर्ण)। '$' - स्ट्रिंग के अंत में मैचों की खोज करें। –
मैंने कोशिश की, लेकिन यह अंत में रिक्त स्थान के साथ कॉलम उठा रहा है, निश्चित रूप से कैरिज रिटर्न वाले लोगों पर छोड़ रहा है ... बीटीडब्लू, एसक्यूएलफ़िल्ड के लिए +1! – raffian