Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help! Simple Oracle Question!
On Wed, 24 Feb 1999 12:33:33 -0800, Vipul Desai <desai65_at_ixnetcom.com>
wrote:
>I am a new user to Oracle 8.05 coming from a Visual Basic/SQL Server
>background. I am trying to create a template for a table within SQL Plus and
>I run the following command from my script. I am have trouble a table
>whereby my script is crashing with the following code. The compiler is not
>liking the datatype Boolean, which to my understanding is a valid data type
>for the Oracle server. Can someone please help? Also, can someone tell me
>whether or not I can put this into a PL/SQL procedure. I am having trouble
>with this as well. Thanks, Vipul
>
>
>CREATE TABLE COLLAPSED (
> STUDY_NUM_DATE VARCHAR2(15),
> STUDY_NUM_DATE VARCHAR2(10),
> LOGISTIC_NUM VARCHAR2(15),
> SUBMIT_NAME VARCHAR2(25),
> STUDY_DATE DATE,
> LOT_NUM VARCHAR2(25),
> AUDIT_REQUESTED BOOLEAN,
> CHEMIST_NAME VARCHAR(25),
> DATE_GIVEN_TO_CHEMIST DATE,
> DATE_REPORTED_TO_CHEMIST DATE,
> FINISH_DATE DATE,
> PULL_DATE DATE,
> AUDIT_DATE DATE) ;
BOOLEAN is not a valid datatype. You could implement this multiple
ways (NUMBER of 0 or 1, VARCHAR2) with your own semantics.
Chapter 2 of the Oracle8 SQL Reference lists all of the valid Oracle datatypes.
To put this in a PL/SQL procedure, you will have to use dynamic SQL (check out the Dynamic SQL chapter of the Oracle8 Application Developer's Guide). BTW, this becomes a lot easier in Oracle8i.
Thanks!
Joel
Joel R. Kallman Oracle Service Industries
Columbus, OH jkallman@us.oracle.com http://www.oracle.com