
Signature
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
>> Hi!
>>
[quoted text clipped - 8 lines]
>
> INSERT INTO table(id, bytes) VALUES (1, x'3334')
I get SQL0408 : A value is not compatible with the data type of its
assignment target. Target name is "bytes".
for this one.
The column bytes is defined like BLOB(1M) .
Best regards,
Kovi

Signature
____________________________
|http://kovica.blogspot.com|
-----------------------------~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Gregor Kovač - 25 Aug 2007 20:51 GMT
>>> Hi!
>>>
[quoted text clipped - 16 lines]
> Best regards,
> Kovi
Tis works if the column is defined like VARCHAR(2000) FOR BIT DATA, for
exmaple.
What to do for BLOB columns ?
Best regars,
Kovi

Signature
____________________________
|http://kovica.blogspot.com|
-----------------------------~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Knut Stolze - 26 Aug 2007 17:24 GMT
>>>> Hi!
>>>>
[quoted text clipped - 17 lines]
> exmaple.
> What to do for BLOB columns ?
I just use prepared statements for those.
But you should still be able to convert the binary data to its hex
representation and then use the above INSERT statement as is. However, you
have to be aware that the hex representation is a string literal to the SQL
compiler and must not exceed the length limits.

Signature
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
4.spam@mail.ru - 27 Aug 2007 15:30 GMT
> Tis works if the column is defined like VARCHAR(2000) FOR BIT DATA, for
> exmaple.
> What to do for BLOB columns ?
INSERT INTO table(id, bytes) VALUES (1, blob(x'3334') )
Gregor Kovač - 30 Aug 2007 18:50 GMT
>> Tis works if the column is defined like VARCHAR(2000) FOR BIT DATA, for
>> exmaple.
>> What to do for BLOB columns ?
>
> INSERT INTO table(id, bytes) VALUES (1, blob(x'3334') )
Thank you both. :))
This is what I've been looking for.

Signature
____________________________
|http://kovica.blogspot.com|
-----------------------------~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-