Re: Getting the last_day in a SQL variable

From: Nigel Thomas <nigel.cl.thomas_at_googlemail.com>
Date: Fri, 10 Jul 2009 13:20:14 +0100
Message-ID: <53258cd50907100520p1c2a7915ked136fbf6aff8f4a_at_mail.gmail.com>



Ian has solved David's immediate problem, but just to answer the original question

I'm trying to do a sql script (please see below) but i cant figure out how
>> to get in a variable the value of the LAST_DAY in a month... any tips?
>>
>>

If you ever really need to get query result into a SQL*Plus variable (for example, so you can use it in another SQL*Plus directive like TTITLE or a SPOOL filename), you want to use COLUMN x .... NEW_VALUE. See Rene Nyffenegger's example <http://www.adp-gmbh.ch/ora/sqlplus/new_value.html> or this OTN example<http://www.oracle.com/technology/support/tech/sql_plus/htdocs/sub_var9.html> .

NEW_VALUE is a part of the SQL*Plus COLUMN command<http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12013.htm#i2697128> .

Regards Nigel

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jul 10 2009 - 07:20:14 CDT

Original text of this message