# Liquibase deploy error when having an insert containing a (Oracle) SYS.ANYDATA type column

**URL:** <https://forum.liquibase.org/t/liquibase-deploy-error-when-having-an-insert-containing-a-oracle-sys-anydata-type-column/7486>\
**Category:** Liquibase Development\
**Tags:** error, datatypes, insert\
**Created:** [November 2, 2022, 10:43am UTC](https://forum.liquibase.org/t/liquibase-deploy-error-when-having-an-insert-containing-a-oracle-sys-anydata-type-column/7486 "2022-11-02T10:43:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![EduardUta](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/eduarduta/32/324_2.png) [@EduardUta](https://forum.liquibase.org/u/EduardUta)\
**Post date:** [November 2, 2022, 10:43am UTC](https://forum.liquibase.org/t/liquibase-deploy-error-when-having-an-insert-containing-a-oracle-sys-anydata-type-column/7486/1 "2022-11-02T10:43:41Z")

</div>

Hello Team,

I am encountering an issue and I need your help and/or guidance (fix, workaround, not fixable… I’ll take anything 😃 ).

Here are the facts (example):

Having an Oracle table (TestTable) containing a SYS.ANYDATA type column:

```auto
TestTable:
Id (NUMBER(3)), SysAnyDataCol (SYS.ANYDATA)

```

When trying to run a liquibase update containing a changeset of the following format:

```auto
    <changeSet author="Eduard" id="1">
        <insert tableName="TestTable">
            <column name="Id" valueNumeric="1"/>
            <column name="SysAnyDataCol" valueNumeric="30"/>
        </insert>
    </changeSet>

```

The deploy fails with the following error:

```auto
Running Changeset: data/TestTable.xml::1::Eduard
 ORA-00932: inconsistent datatypes: expected ANYDATA got NUMBER
 [Failed SQL: (932) INSERT INTO EDUARD.TestTable (Id, SysAnyDataCol) VALUES (1, 30)]

```

Any ideas how to address this ? I am open to any workaround, the end goal is to make that numeric value fit the SYS.ANYDATA col.

I also tried the following with no success:

```
<column name="SysAnyDataCol" value="1"/> (errors out, same error)
<column name="SysAnyDataCol" valueComputed="SYS.ANYDATA.convertNumber(30)"/> (this works BUT the value inserted in the DB is actually: "(OPAQUE)" ). 
<sql> type changeset, containing plain SQL Insert (errors out, same error)

```

Thanks in advance for any given input on this!  
Eduard

---

<div class="post-metadata">

**Author:** ![EduardUta](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/eduarduta/32/324_2.png) [@EduardUta](https://forum.liquibase.org/u/EduardUta)\
**Post date:** [November 2, 2022, 1:37pm UTC](https://forum.liquibase.org/t/liquibase-deploy-error-when-having-an-insert-containing-a-oracle-sys-anydata-type-column/7486/2 "2022-11-02T13:37:37Z")

</div>

> [@EduardUta](#):
>
> `valueComputed="SYS.ANYDATA.convertNumber(30)"`

Update (solution found): this is actually the solution/workaround as it seems the value that is inserted _(OPAQUE)_ is correct (the thing is, a function is needed to be written to fetch back numeric value 30 from Oracle - that’s a separate story altogether).

So like a nice to have would be if this can be the default behavior of Liquiabase at gen data:  
if the target column is SYS.ANYDATA then place a

```
 valueComputed="SYS.ANYDATA.convertNumber(<current value>)" 

```

instead of

```
 value="<current value>"

```

in the generated changeset / insert / column node.

Thanks,  
Eduard
