Implicit type conversion in DB/2 inserts?
Posted
by IronGoofy
on Stack Overflow
See other posts from Stack Overflow
or by IronGoofy
Published on 2010-06-09T11:49:34Z
Indexed on
2010/06/09
11:52 UTC
Read the original article
Hit count: 147
db2
|type-conversion
We're using SQL Inserts to insert some data via a script into DB/2 tables, e.g.
CREATE TABLE TICKETS (TICKETID VARCHAR(10) NOT NULL);
On my home installation, this statement works fine (note that I'm using an integer which is autoatically cast into a VarChar):
INSERT INTO TICKETS (TICKETID) VALUES (1);
while at my customer's site I get a type error.
My question(s):
- Is this behavior version dependent? (I use a DB2 Express V9.7, while the customer has an Enterprise V9.5)
- Is there a config option to change the behavior? (I would like my home install to behave as close as possible as the production environment is going to be.)
© Stack Overflow or respective owner