Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Using Calandar

Re: Using Calandar

From: Yass Khogaly <ykhogaly_at_us.oracle.com>
Date: Tue, 16 Nov 1999 20:57:21 -0800
Message-ID: <80t8vd$k3p$1@inet16.us.oracle.com>


You can use something like :

/**************
/*

SET HEADING OFF
SET VERIFY OFF
SET FEEDBACK OFF SELECT TO_CHAR(TO_DATE('&1-&2-&3', 'DD-MON-YYYY'), 'fmDay') FROM dual;

/*
/****************
/*
/*

CREATE TABLE monthname(
name VARCHAR2(12));

/*
  week_tab   DateTableType;         /* table to store dates for a week */
  i          BINARY_INTEGER := 0;   /* index to table */
  first      VARCHAR2(12);          /* first day of the month */
  numericDay NUMBER(2);             /* numeric indicator of above */
  lastDay    NUMBER(2);             /* date of last day of the month */
  dayCount   NUMBER(2) := 1;        /* current date in the month */

BEGIN

/*
/*

  SELECT DECODE(first, 'Sunday', 1, 'Monday', 2, 'Tuesday', 3, 'Wednesday', 4,

                'Thursday', 5, 'Friday', 6, 7)
    INTO numericDay
    FROM dual;
/*
/*
/*
  INSERT INTO calendar VALUES(
    week_tab(1),
    week_tab(2),
    week_tab(3),
    week_tab(4),
    week_tab(5),
    week_tab(6),
    week_tab(7));

/*
    INSERT INTO calendar VALUES(
      week_tab(1),
      week_tab(2),
      week_tab(3),
      week_tab(4),
      week_tab(5),
      week_tab(6),
      week_tab(7));

  END LOOP;
/*
END;
/
/*
/*
/*
/***************

/* call getmonth.sql 12 times */

START getmonth &&1 jan
START getmonth &&1 feb
START getmonth &&1 mar
START getmonth &&1 apr
START getmonth &&1 may
START getmonth &&1 jun
START getmonth &&1 jul
START getmonth &&1 aug
START getmonth &&1 sep
START getmonth &&1 oct
START getmonth &&1 nov
START getmonth &&1 dec





"The Views expressed here are my own and not necessarily those of Oracle Corporation"
<ould_at_my-deja.com> wrote in message news:80riua$r4s$1_at_nnrp1.deja.com...

> Hello all Gurous,
>
> My question is just how I can create a calandar
> simular to that of SCOTT EMP table in WebDB.
> Or  how I can change that of SCOTT for my
> proper needs.
>
> I Creating the table below using standard
> SQL*PLUS,
> but it do not work as a SCOTT Calandar.
>
>
> January, 1999
> ---------------
> |   01 |   02 |  03 |......
> ................................
> ---------------
> Febriary, 1999
> ---------------
> |   01 |   02 |  03 |......
> ................................
> ---------------
> ...etc.
>
> with the possibility to add a field for comment
> in each day.
>
> Any attempt to modify Scoot Calandars
> to intoduce my proper fields and data fails
>
> Please escuse errors and english.
>
> Thank You.
>
> Ould
>
>
> Sent via Deja.com http://www.deja.com/

> Before you buy.


Received on Tue Nov 16 1999 - 22:57:21 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US