से अधिक DATE शीर्षक के अनुसार, मैं यह जांचने का एक तरीका ढूंढना चाहता हूं कि मेरे डेटा सेट कौन से प्रश्नों के माध्यम से SYSDATE से 6 महीने पहले हैं।ओरेकल एसक्यूएल - कथन
SELECT * FROM OrderArchive
WHERE OrderDate <= '31 Dec 2014';
मैंने निम्नलिखित की कोशिश की है लेकिन यह एक त्रुटि देता है कि मेरा दिनांक प्रारूप गलत है। हालांकि, उस डेटा को सम्मिलित करने के लिए मैंने उस दिनांक प्रारूप का उपयोग अनुरोध/इच्छित के रूप में किया था और इसमें कोई समस्या नहीं थी।
Error at Command Line : 10 Column : 25
Blockquote
Error report -
SQL Error: ORA-01861: literal does not match format string 01861. 00000 - "literal does not match format string"
*Cause: Literals in the input must be the same length as literals in the format string (with the exception of leading whitespace). If the "FX" modifier has been toggled on, the literal must match exactly, with no extra whitespace.
*Action: Correct the format string to match the literal.
अपनी तिथि 'DATE' के रूप में या' VARCHAR' के रूप में जमा कर रहे हैं की तरह है कि स्तंभ पर
to_date()
समारोह लागू करना चाहिए? –'DATE' उस के रूप में संग्रहीत है, और मैं उन्हें to_date का उपयोग करके परिवर्तित नहीं कर सकता – user3521826