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

Home -> Community -> Usenet -> c.d.o.misc -> Re: sqlload: columns that are keywords

Re: sqlload: columns that are keywords

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 03 Sep 1998 13:07:35 GMT
Message-ID: <35ff945c.87246964@192.86.155.100>


A copy of this was sent to sfsheath_at_my-dejanews.com (if that email address didn't require changing) On Wed, 02 Sep 1998 21:31:28 GMT, you wrote:

>Hi,
>
> I'm trying to load into a table that has a column 'count'. Sql load
>responds with "Expecting column name, found keyword count". Is there any way
>to get sqlload to interpret 'count' as a column name and not as a keyword?
>
>Thanks,
>
>Sebastian.
>
>p.s.
>
>Here is the whole ctl file: LOAD DATA INFILE rmp.txt REPLACE INTO TABLE rmp
>FIELDS TERMINATED BY ' ' TRAILING NULLCOLS (chronology, collection, context,
>count, decoration, diameter, end_date, end_per iod, form, id, location,
>loc_id, method, more_info, notes, rmp.part, published, pub_ref, qsem,
>quanitifed, release, rmp_id, rmp_notes, start_date, start_period, sub_ware,
>variant, ware, weight)
>
>
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

Quote the identifier, for example:

LOAD DATA
INFILE *
INTO TABLE T
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ("COUNT" )
begindata
1
2
3
4


the double quotes will take care of it. You may really want to rethink naming a column "COUNT" tho -- various tools and utilities are going to take issue with it and some may not supporting quoted identifiers...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu Sep 03 1998 - 08:07:35 CDT

Original text of this message

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