473,651 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

seek trick to insert a clob value from the command line

Is there a command line trick that inserta ascii text into a CLOB
column?

Thanks.

Aug 14 '06 #1
1 7841
gi************* ******@yahoo.co m wrote:
Is there a command line trick that inserta ascii text into a CLOB
column?
No, there isn't. CLOBs are just like any other data type:

CREATE TABLE t (
id INT,
lob CLOB(1M)
)@
DB20000I The SQL command completed successfully.

INSERT INTO t VALUES ( 1, 'lob data' )@
DB20000I The SQL command completed successfully.

Things are a bit different if you have UDFs in the picture. Then you may
have to tell DB2 the specific type so that function resolution works
properly.

INSERT INTO t VALUES ( 2, CLOB('lob data') )@

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Aug 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4598
by: Pernell Williams | last post by:
Hi all: I am new to Python, and this is my first post (and it won't be my last!), so HELLO EVERYONE!! I am attempting to use "xreadlines", an outer loop and an inner loop in conjunction with "file.tell() and file.seek() in order to navigate through a file in order to print specific lines (for example, every 5th line). Allow me to illustrate by example:
1
14414
by: rabbit | last post by:
Hi all, I want to know, how can i insert the xml data using createXML() with CLOB in the xmltype column? I store the xml data at first in the clob column und want to import these data in the xmltype column in another table. But i get always the error message: java.sql.SQLException: ORA-00600: internal error code, arguments: , , , , , , , ORA-06512: in "SYS.XMLTYPE", line 0
1
4899
by: Dark | last post by:
Im trying to insert a clob into the database and I get the following error. DBD::DB2::st execute failed: SQL0804N The application program input parameters for the current request are not valid. Reason code "103". If a host variable or S QLVAR in the SQLDA is invalid then: host variable/SQLVAR number = "5", SQLTYPE = "393", SQLLEN = "33", host variable/SQLVAR type = "INPUT". SQLSTATE=07002
5
5323
by: gimme_this_gimme_that | last post by:
In Oracle you can have a statement such as insert into foo (foo_id,some_clob) values (100,empty_clob()) where empty_clob() inserts a clob address. What is the approach in DB2 (8.1) to creating a row having with a CLOB and no contents but with no null?
4
21700
by: Nina via DBMonster.com | last post by:
Hi, I'm trying to insert a clob / blob from the local file system into a basic table. This can be quite easily accomplished in Oracle but I have not found any wquivalent way on how to do this in DB2. I have the following table: create table docs( doc_id integer, docs clob(), constraint pk PRIMARY KEY (doc_id))
3
2008
by: gimme_this_gimme_that | last post by:
I'm driving Windows XP and could use a tip on installing a function written in Java. 1. I created the a Java jar file, named UdfUtils.jar, from the Java source file shown below: 2. I copied the jar file to c:\Program Files\IBM\SQLLIB\FUNCTION 3. From the db2 command line I exectued call sqlj.refresh_classes() 4. I defined a function using the ddl also shown below Now ...
0
2651
by: *Davide* | last post by:
Hello, This query (PHP+Oracle) works: global $user,$pass,$sid; $db_charset = 'UTF8'; $db = OCILogon($user, $pass, $sid, $db_charset); $clob = OCINewDescriptor($db, OCI_D_LOB); $txt_clob = $arguments;
3
4164
by: andrewkl | last post by:
hi, I have the following Perl code that inserts a string to an Oracle DB via a stored procedure: #!/usr/local/bin/perl ## Perl v5.8.6 built for sun4-solaris use strict; BEGIN { $ENV{'TNS_ADMIN'} = '/auto/engweb/oracle/sqlnet'; $ENV{'ORACLE_HOME'} = '/usr/packages/dbdoracle/9.2.0'; }
1
8144
by: Veeru71 | last post by:
When I am SELECT'ing a CLOB column from command prompt, the output is getting truncated after a certail limit (8 K ??) How do I get the full data out of a CLOB column? Are there any string manipuration functions for CLOB fields to read it in multiple chunks ? Thanks in advance.
0
8357
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8700
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8581
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4285
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1910
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.