Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Pocket Guide
Jon,
just fooling around, I came up with this. run it thru sqlplus. obviously, change the table reference to your table.
set serveroutput on
spool results.xls
DECLARE
l_date DATE;
start_date DATE := to_date('&s_date','mm/dd/yyyy');
end_Date DATE := to_date('&e_Date','mm/dd/yyyy');
loc_sum number;
BEGIN
l_date := start_date;
LOOP
SELECT SUM(col1)
INTO loc_sum
FROM TOM3
WHERE crdate = l_date;
dbms_output.put_line(TO_CHAR(l_date,'mm/dd/yyyy') || CHR(9) ||
nvl(loc_sum,0));
l_date := l_date + 1;
EXIT WHEN l_date > end_date;
END LOOP;
END;
/
hope this helps
Tom Mercadante
Oracle Certified Professional
-----Original Message-----
Sent: Friday, June 29, 2001 2:26 PM
To: Multiple recipients of list ORACLE-L
Was this an upgrade from a previous version? Or new install?
What script did you run to get the SQL command help. I know where the one for SQL*Plus resides, but it does not contain SQL help.
Jon
Mohammad Rafiq wrote:
>
> Hi Jonathan,
>
> We still have HELP facility with 8.1.6.2. See below please...
> Regards
> Rafiq
>
> Connected to:
> Oracle8i Enterprise Edition Release 8.1.6.2.0 - Production
> With the Partitioning option
> JServer Release 8.1.6.2.0 - Production
>
> SQL> help create table
> CREATE TABLE command
>
> PURPOSE:
> To create a table, the basic structure to hold user data, specifying
> this information:
>
> * column definitions
> * integrity constraints
> * the table's tablespace
> * storage characteristics
> * an optional cluster
> * data from an arbitrary query
>
> SYNTAX:
>
> CREATE TABLE [schema.]table
> ( { column datatype [DEFAULT expr] [column_constraint] ...
> | table_constraint}
> [, { column datatype [DEFAULT expr] [column_constraint] ...
> | table_constraint} ]...)
> [ [PCTFREE integer] [PCTUSED integer]
> [INITRANS integer] [MAXTRANS integer]
> [TABLESPACE tablespace]
> [STORAGE storage_clause]
> [ RECOVERABLE | UNRECOVERABLE ]
> [ PARALLEL ( [ DEGREE { integer | DEFAULT } ]
> [ INSTANCES { integer | DEFAULT } ]
> )
> | NOPARALLEL ]
> [ CACHE | NOCACHE ]
> | [CLUSTER cluster (column [, column]...)] ]
> [ ENABLE enable_clause
> | DISABLE disable_clause ] ...
> [AS subquery]
>
> Reply-To: ORACLE-L_at_fatcity.com
> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> Date: Thu, 28 Jun 2001 15:45:59 -0800
>
> Thursday, June 28, 2001, 4:15:56 PM, you wrote:
> jb> help works for sqlplus, if you installed, but if there is a script for
> jb> building sql command structure, please pass that on. At least 'help
> jb> index' is only showing the sqlplus commands.
>
> When 8i was released, the SQL statements were removed from the help.
>
> Best regards,
>
> Jonathan Gennick
> mailto:jonathan_at_gennick.com * 906.387.1698
> http://Gennick.com * http://MichiganWaterfalls.com * http://MetalDrums.org
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: jon baker INET: jcb_at_netsec.net Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Mercadante, Thomas F INET: NDATFM_at_labor.state.ny.us Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Fri Jun 29 2001 - 13:11:02 CDT