Unix Technical Forum

INSERT Binary Data

This is a discussion on INSERT Binary Data within the Informix forums, part of the Database Server Software category; --> Hi, I would like to INSERT Byte-Data INTO a BYTE-Coolumn using SQL This is how it works for SQL-Server: ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 07:49 AM
Martin Steinwender
 
Posts: n/a
Default INSERT Binary Data

Hi,

I would like to INSERT Byte-Data INTO a BYTE-Coolumn using SQL

This is how it works for SQL-Server:

INSERT INTO tblSlime ( ID, Name, Slime )
VALUES (2, 'Fritz', 0x234323432343234323fc4350fc4350fc4350fc4350fc);

Is something like this possible for INFORMIX

Thx,

Peter

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 07:49 AM
June C. Hunt
 
Posts: n/a
Default Re: INSERT Binary Data

Martin Steinwender wrote:
> Hi,
>
> I would like to INSERT Byte-Data INTO a BYTE-Coolumn using SQL
>
> This is how it works for SQL-Server:
>
> INSERT INTO tblSlime ( ID, Name, Slime )
> VALUES (2, 'Fritz', 0x234323432343234323fc4350fc4350fc4350fc4350fc);
>
> Is something like this possible for INFORMIX


From the IBM Informix Guide to SQL: Reference (Version 9.4, Part No.
CT1SPNA):


You can insert data into BYTE columns in the following ways:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 07:49 AM
June C. Hunt
 
Posts: n/a
Default Re: INSERT Binary Data

June C. Hunt wrote:

> Martin Steinwender wrote:
>
>> Hi,
>>
>> I would like to INSERT Byte-Data INTO a BYTE-Coolumn using SQL
>>
>> This is how it works for SQL-Server:
>>
>> INSERT INTO tblSlime ( ID, Name, Slime )
>> VALUES (2, 'Fritz', 0x234323432343234323fc4350fc4350fc4350fc4350fc);
>>
>> Is something like this possible for INFORMIX

>



Seem to be having problems sending mail this morning. The full response
should be...

From the IBM Informix Guide to SQL: Reference (Version 9.4, Part No.
CT1SPNA):


You can insert data into BYTE columns in the following ways:
- With the dbload or onload utilities
- With the LOAD statement (DB-Access)
- From BYTE host variables (IBM Informix ESQL/C)

You cannot use a quoted text string, number, or any other actual value
to insert or update BYTE columns.


If you don't already have it, you can find Informix documentation online
at http://www.ibm.com/software/data/informix/library

--
June Hunt
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 07:49 AM
My Name Is Bruce and I'm A Sock Puppet
 
Posts: n/a
Default Re: INSERT Binary Data

June C. Hunt wrote:

> June C. Hunt wrote:
>
>> Martin Steinwender wrote:
>>
>>> Hi,
>>>
>>> I would like to INSERT Byte-Data INTO a BYTE-Coolumn using SQL
>>>
>>> This is how it works for SQL-Server:
>>>
>>> INSERT INTO tblSlime ( ID, Name, Slime )
>>> VALUES (2, 'Fritz', 0x234323432343234323fc4350fc4350fc4350fc4350fc);
>>>
>>> Is something like this possible for INFORMIX

>>

>
>
> Seem to be having problems sending mail this morning. The full response
> should be...
>
> From the IBM Informix Guide to SQL: Reference (Version 9.4, Part No.
> CT1SPNA):
>
>
> You can insert data into BYTE columns in the following ways:
> - With the dbload or onload utilities
> - With the LOAD statement (DB-Access)
> - From BYTE host variables (IBM Informix ESQL/C)
>
> You cannot use a quoted text string, number, or any other actual value
> to insert or update BYTE columns.
>
>
> If you don't already have it, you can find Informix documentation online
> at http://www.ibm.com/software/data/informix/library


Strewth Sheila, can't ya just abbreviate that as RTFM???? You don't half go
on...

--
Strewth! Stick a sock in it, Sheila!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 07:49 AM
TBP
 
Posts: n/a
Default Re: INSERT Binary Data

My Name Is Bruce and I'm A Sock Puppet wrote:
> June C. Hunt wrote:
>
>
>>June C. Hunt wrote:
>>
>>
>>>Martin Steinwender wrote:
>>>
>>>
>>>>Hi,
>>>>
>>>>I would like to INSERT Byte-Data INTO a BYTE-Coolumn using SQL
>>>>
>>>>This is how it works for SQL-Server:
>>>>
>>>>INSERT INTO tblSlime ( ID, Name, Slime )
>>>>VALUES (2, 'Fritz', 0x234323432343234323fc4350fc4350fc4350fc4350fc);
>>>>
>>>>Is something like this possible for INFORMIX
>>>

>>
>>Seem to be having problems sending mail this morning. The full response
>>should be...
>>
>> From the IBM Informix Guide to SQL: Reference (Version 9.4, Part No.
>>CT1SPNA):
>>
>>
>>You can insert data into BYTE columns in the following ways:
>>- With the dbload or onload utilities
>>- With the LOAD statement (DB-Access)
>>- From BYTE host variables (IBM Informix ESQL/C)
>>
>>You cannot use a quoted text string, number, or any other actual value
>>to insert or update BYTE columns.
>>
>>
>>If you don't already have it, you can find Informix documentation online
>>at http://www.ibm.com/software/data/informix/library

>
>
> Strewth Sheila, can't ya just abbreviate that as RTFM???? You don't half go
> on...
>

echo "2|Fritz|234323432343234323FC4350FC4350FC4350FC435 0FC" > byte.unl
create table tblslime(id int, name char(8), slime byte);
load from byte.unl insert into tblslime;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:34 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com