Solved

insert text into a blob field

Posted on 2009-05-18
1
552 Views
Last Modified: 2012-05-07
Good morning, I am trying to replicate the northwind sample database in oracle 11.1.0.7.
The employees table is set up with 2 blob fields, one of which (NOTES)should contain a text string.
The inserts fail on this column with the error: " ORA-01465 Invalid hex number"

This is one of the insert statements:
INSERT INTO Employees(EmployeeID, LastName, FirstName, Title, TitleOfCourtesy, BirthDate, HireDate, Address, City, Region, PostalCode, Country, HomePhone, Extension, Photo, Notes, ReportsTo, PhotoPath) VALUES (2, 'Fuller', 'Andrew', 'Vice President, Sales', 'Dr.', TO_DATE('1952-02-19 00:00:00','yyyy-mm-dd hh24:mi:ss'), TO_DATE('1992-08-14 00:00:00','yyyy-mm-dd hh24:mi:ss'), '908 W. Capital Way', 'Tacoma', 'WA', '98401', 'USA', '(206) 555-9482', '3457', null, 'Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of Dallas in 1981.  He is fluent in French and Italian and reads German.  He joined the company as a sales representative, was promoted to sales manager in January 1992 and to vice president of sales in March 1993.  Andrew is a member of the Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.', null, 'http://accweb/emmployees/fuller.bmp');
Here is the DDL of the table:
CREATE TABLE "NORTHWIND"."EMPLOYEES" 
   (	"EMPLOYEEID" NUMBER(10,1) NOT NULL ENABLE, 
	"LASTNAME" VARCHAR2(20) NOT NULL ENABLE, 
	"FIRSTNAME" VARCHAR2(10) NOT NULL ENABLE, 
	"TITLE" VARCHAR2(30), 
	"TITLEOFCOURTESY" VARCHAR2(25), 
	"BIRTHDATE" DATE, 
	"HIREDATE" DATE, 
	"ADDRESS" VARCHAR2(60), 
	"CITY" VARCHAR2(15), 
	"REGION" VARCHAR2(15), 
	"POSTALCODE" VARCHAR2(10), 
	"COUNTRY" VARCHAR2(15), 
	"HOMEPHONE" VARCHAR2(24), 
	"EXTENSION" VARCHAR2(4), 
	"PHOTO" BLOB, 
	"NOTES" BLOB, 
	"REPORTSTO" NUMBER, 
	"PHOTOPATH" VARCHAR2(255)
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "NORTWIND" 
 LOB ("PHOTO") STORE AS BASICFILE (
  TABLESPACE "NORTWIND" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION 
  NOCACHE NOLOGGING 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) 
 LOB ("NOTES") STORE AS BASICFILE (
  TABLESPACE "NORTWIND" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION 
  NOCACHE NOLOGGING 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) ;
 
  CREATE INDEX "NORTHWIND"."LASTNAME" ON "NORTHWIND"."EMPLOYEES" ("LASTNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 NOLOGGING 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "NORTWIND" ;
 
  CREATE INDEX "NORTHWIND"."POSTALCODE" ON "NORTHWIND"."EMPLOYEES" ("POSTALCODE") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 NOLOGGING 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "NORTWIND" ;
 
  CREATE UNIQUE INDEX "NORTHWIND"."SYS_IL0000072054C00015$$" ON "NORTHWIND"."EMPLOYEES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "NORTWIND" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
 
  CREATE UNIQUE INDEX "NORTHWIND"."SYS_IL0000072054C00016$$" ON "NORTHWIND"."EMPLOYEES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "NORTWIND" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
 
  ALTER TABLE "NORTHWIND"."EMPLOYEES" MODIFY ("EMPLOYEEID" NOT NULL ENABLE);
 
  ALTER TABLE "NORTHWIND"."EMPLOYEES" MODIFY ("LASTNAME" NOT NULL ENABLE);
 
  ALTER TABLE "NORTHWIND"."EMPLOYEES" MODIFY ("FIRSTNAME" NOT NULL ENABLE);

Open in new window

0
Comment
Question by:ODOTServer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
ODOTServer earned 0 total points
ID: 24412920
Changed Blob to Clob.

You can close this question.
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Suggested Courses

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question