• 1 reply
  • Latest Post - ‏2013-02-14T09:00:34Z by nivanov1
99 Posts

Pinned topic Handling Informix SET data type in DB2 LUW

‏2013-02-13T09:02:51Z |
In Informix we have SET data type. This is an unordered collection type that stores unique elements. The number of elements in a SET data type can vary, but no nulls are allowed.

An example or a table & row contents are given below:

>>>> Table DDL

name char(30),
address char(40),
children SET (varchar(30) NOT NULL)
>>>> Table data contents

Muriel|5555 SW Merry
Sailing Dr.|02/06/1926|SET{'Karen','Lauren','Andrea'}|
Larry|1234 Indian Lane|07/31/1927|SET{'Martha',

We see above that data is delimited by | and the first row has set with 3 elements (Karen, Lauren, and Andrea), the second with 4 elements (Martha, Melissa, Craig and Larry).

Now, how do we handle this Informix SET data type in DB2 LUW?

Thanks in advance.
Updated on 2013-02-14T09:00:34Z at 2013-02-14T09:00:34Z by nivanov1
  • nivanov1
    231 Posts

    Re: Handling Informix SET data type in DB2 LUW

    There's no such datatype in DB2. You could approximate this by using an XML datatype, storing an XML document that contains a sequence of your elements.