Here is an example of a CLOB, not sure if that will help.
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
create table MYSCHEMA.usr_tbl_sec (
schemaname varchar(18) not null,
tablename varchar(18) not null,
username varchar(18) not null,
approver varchar(60) not null,
approval_dt date not null,
approval_text clob (2k),
eff_dt date not null default '1900-01-01',
exp_dt date not null default '9999-12-31')
in USERSPACE1?
insert into prodiadm.usr_tbl_sec (schemaname, tablename, username, approver,
approval_dt, approval_text)
values
('MYSCHEMA', 'MYTABLE', 'MYUSERID', 'APPROVERS NAME', '2002-11-21', ' THIS
IS WHERE I INSERTED THE TEXT STRING THAT MADE UP AN EMAIL WHICH COULD BE UP
TO 2K LONG - THE ONLY GOTCHA WITH THE TEXT IS YOU HAVE TO WATCH OUT FOR
SPECIAL CHARACTERS, THIS IS WHY I TERMINATED THE STATEMENT WITH A QUESTION
MARK - OTHERWISE I WAS HAVING MANY PROBLEMS WITH THE INTERPRETATION OF
STRINGS' )?
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
John C. George
IBM Certified Solutions Expert - DB2 UDB Database Administration
-----Original Message-----
From: Joachim Mueller [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 11:37 AM
To: Alexandre Efremov
Cc: [EMAIL PROTECTED]; Joachim Mueller
Subject: Antwort: Re: Antwort: Re: Antwort: [DB2EUG] Insert BLOB value
Hi Alexandre,
AFAIK there is no way to insert blob's with 'normal SQL'
Best regards
Joachim M�ller
--
DOUGLAS Informatik & Service GmbH
Datenbankmanagement
Douglas Holding AG, Kabeler Str. 4, 58099 Hagen
Tel.:+49-2331-690-249,Fax:+49-2331-690-78-249
Mobile: +49-170-2221-249
--------------------------------+-------------------------------------------
---------------------------------
Alexandre Efremov|
<[EMAIL PROTECTED]| An: Joachim Mueller
<[EMAIL PROTECTED]>
om>| Kopie: [EMAIL PROTECTED]
| Thema: Re: Antwort: Re: Antwort:
[DB2EUG] Insert BLOB value
05.02.2003 17:28|
|
--------------------------------+-------------------------------------------
---------------------------------
Hi, Joachim!
> perhaps you find something within the
> /sqllib/samples directory.
> There are a lot of samples, working with blob's.
Unfortunately, all those samples are related to
embedded SQL code, and not SQL code executed via
command line interface and/or command center. I know
how to work with BLOBs in a C program etc., but hte
question is - how to do this using SQL in db2clp?
Is there a way to do this at all?
Alexandre.
>
> Best regards
>
> Joachim M�ller
> --
> DOUGLAS Informatik & Service GmbH
> Datenbankmanagement
> Douglas Holding AG, Kabeler Str. 4, 58099 Hagen
> Tel.:+49-2331-690-249,Fax:+49-2331-690-78-249
> Mobile: +49-170-2221-249
>
>
>
>
>
--------------------------------+-------------------------------------------
---------------------------------
>
> Alexandre Efremov|
>
>
> <[EMAIL PROTECTED]| An:
> Joachim Mueller
> <[EMAIL PROTECTED]>
> om>| Kopie:
> [EMAIL PROTECTED]
>
> | Thema:
> Re: Antwort: [DB2EUG] Insert BLOB value
>
> 05.02.2003 17:16|
>
>
> |
>
>
>
>
--------------------------------+-------------------------------------------
---------------------------------
>
>
>
>
>
> Thanks, Joachim, but I am specifically interested in
> running SQL code, not using DB2 commands.
>
> --- Joachim Mueller
> <[EMAIL PROTECTED]>
> wrote:
> >
> > Hi Alexandre,
> >
> > use db2's load commad...
> >
> > Best regards
> >
> > Joachim M�ller
> > --
> > DOUGLAS Informatik & Service GmbH
> > Datenbankmanagement
> > Douglas Holding AG, Kabeler Str. 4, 58099 Hagen
> > Tel.:+49-2331-690-249,Fax:+49-2331-690-78-249
> > Mobile: +49-170-2221-249
> >
> >
> >
> >
> >
>
--------------------------------+-------------------------------------------
---------------------------------
>
> >
> > Alexandre Efremov|
> >
> >
> > <[EMAIL PROTECTED]| An:
> > [EMAIL PROTECTED]
> >
> > om>| Kopie:
> >
> >
> > Gesendet von:| Thema:
> > [DB2EUG] Insert BLOB value
> >
> > [EMAIL PROTECTED]|
> >
> >
> > rg|
> >
> >
> > |
> >
> >
> > |
> >
> >
> > 05.02.2003 16:16|
> >
> >
> > Bitte antworten an|
> >
> >
> > Alexandre Efremov|
> >
> >
> > |
> >
> >
> >
> >
>
--------------------------------+-------------------------------------------
---------------------------------
>
> >
> >
> >
> >
> >
> > Hi, everyone!
> >
> > Is there a way to insert BLOB value to the table
> via
> > command line interface and/or command center? My
> > numerous attempts to do so failed. Then I used SQL
> > assist to generate INSERT statement. SQL assist
> > created the code like this:
> >
> > INSERT INTO
> > BLOBTAB
> > (
> > ID,
> > NAME,
> > TEXT
> > )
> > VALUES
> > (
> > 1,
> > 'One',
> > 41424241
> > )
> >
> > But on attempt to run it, it failed with the
> > following
> > error message:
> >
> > SQL0408N A value is not compatible with the data
> > type
> > of its assignment target. Target name is "TEXT".
> > SQLSTATE=42821
> >
> > So, how do I insert BLOB data using command line
> > interface? Another question - is there a way to
> > specify the name of disk file as a source for LOB
> > data?
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> > now.
> > http://mailplus.yahoo.com
> > -
> > ::: When replying to the list, please use
> > 'Reply-All' and make sure
> > ::: a copy goes to the list ([EMAIL PROTECTED]).
> > *** To unsubscribe, send 'unsubscribe' to
> > [EMAIL PROTECTED]
> > *** For more information, check
> > http://www.db2eug.uni.cc
> >
> >
> >
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> http://mailplus.yahoo.com
>
>
>
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-
::: When replying to the list, please use 'Reply-All' and make sure
::: a copy goes to the list ([EMAIL PROTECTED]).
*** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
*** For more information, check http://www.db2eug.uni.cc
CONFIDENTIALITY NOTICE: This E-Mail is intended only for the
use of the individual or entity to which it is addressed and
may contain information that is privileged, confidential and
exempt from disclosure under applicable law.
If you have received this communication in error, please
do not distribute and delete the original message.
Please notify the sender by E-Mail at the address shown.
Thank you for your compliance.
...
-
::: When replying to the list, please use 'Reply-All' and make sure
::: a copy goes to the list ([EMAIL PROTECTED]).
*** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
*** For more information, check http://www.db2eug.uni.cc