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: Oracle Create Table Error

Re: Oracle Create Table Error

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 1 Jan 1999 00:20:07 GMT
Message-ID: <368f08fa.3373759@netnews.worldnet.att.net>


On Wed, 30 Dec 1998 06:44:42 GMT, a_aaron_at_hotmail.com wrote:

>hi, we are facing a strange problem. the following query runs on sqlplus but
>when ran from sqlplus in telnet session gives the error 1723 "zero-length
>columns are not allowed"
>
>create table xyz as
>select account_id,
> bill_seq_num,
> service_id,
> TO_NUMBER(0) AS meter_reading,
> TO_DATE(NULL) AS meter_reading_dt
>from table_name;

Not sure why you are getting that error. I would probably not use the TO_DATE function, and would just use "NULL aS meter_reading_dt" instead. You could also try creating the table first, using CREATE TABLE, and then insert just the columns tthat you want.

CREATE TABLE xyz (

	bill_seq_num	number,
	service_id		number,
	meter_reading	number,
	meter_reading_dt	date
	);

insert into xyz 
	(bill_seq_num, service_id, meter_reading)
select account_id,
       bill_seq_num,
       service_id,
       0 ,

from table_name;

regards,

Jonathan Received on Thu Dec 31 1998 - 18:20:07 CST

Original text of this message

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