Inserting a text field in Informix
Posted in 1999
Topics: General Discussion
Hi there
Could you please help with a simple problem of inserting a record containing a
TEXT field as one of the columns using a simple SQL INSERT statement? None of
the documentation seems to tell one anything about this, it seems that using
LOAD to get data from a text file is common.
Thanks very much,
Anjana
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
anjana@iname.com wrote:
>
> Hi there
>
> Could you please help with a simple problem of inserting a record containing a
> TEXT field as one of the columns using a simple SQL INSERT statement? None of
> the documentation seems to tell one anything about this, it seems that using
> LOAD to get data from a text file is common.
You cannot do it. You must use a 4GL or ESQL program to insert into a
TEXT or DATA column.
Art S. Kagel
In article <7cjhh9$6ef$1@nnrp1.dejanews.com>,
anjana@iname.com wrote:
> Hi there
>
> Could you please help with a simple problem of inserting a record containing a
> TEXT field as one of the columns using a simple SQL INSERT statement? None of
> the documentation seems to tell one anything about this, it seems that using
> LOAD to get data from a text file is common.>
> Thanks very much,
> Anjana
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
You could use the DBLOAD utility, wich is able to insert fields on a text file
into a table. See the example below:
Text file:
----------
1|SMT|baseball gloves|450.00|case|10 gloves/case
2|HRO|baseball|126.00|case|24/case
3|SHK|baseball bat|240.00|case|12/case
Table columns:
--------------
Prod_code integer
Description char(40)
Price dec(16,2)
Script to be created:
---------------------
FILE stock.unl DELIMITER '|' 6;
INSERT INTO stock
Take a look at your Informix Migration Guide (please, ask for more examples if
you do not have this book, we can find the one you need, be sure of that!!)
Good Luck !!!
Paulo Roberto Marelli de Amorim
TS&0 Consulting
Brasil
5511-9900-3644
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Hi Anjana,
Have you considered using an esql/c program to perform these blob inserts....
Pradeep.
anjana@iname.com wrote:
> Hi there
>
> Could you please help with a simple problem of inserting a record containing a
> TEXT field as one of the columns using a simple SQL INSERT statement? None of
> the documentation seems to tell one anything about this, it seems that using
> LOAD to get data from a text file is common.>
> Thanks very much,
> Anjana
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own