SQL> SELECT sysdate FROM Dual;
SYSDATE
---------
01-JUN-09
SQL> SELECT MONTHS_BETWEEN (SYSDATE,
2 TO_DATE ('01/01/2009', 'DD/MM/YYYY')
3 ) diff_in_months
4 FROM DUAL;
DIFF_IN_MONTHS
--------------
5
SQL>
Friday, May 9, 2014
Oracle MONTHS_BETWEEN
Why don't you just use MONTHS_BETWEEN Function? Doesn't that help?
Friday, May 2, 2014
SQL function DataLength
SELECT CompanyName
, len(CompanyName) as 'length'
, datalength(CompanyName) as 'RealLength'
FROM TempfinanceCompanyList
WHERE right(Companyname,1) = ' '
ORDER by CompanyName
You cannot count on LEN function to count trailing spaces, at least not in SQL 2012.
ORDER by CompanyName
You cannot count on LEN function to count trailing spaces, at least not in SQL 2012.
Subscribe to:
Posts (Atom)