Skip to Content

Expression type not compatible with Object type- error- UDT

Hi guys

we recently migrated our database from oracle to SQL. So now I am trying to fix the universes . There is a datetime object in one of the tables and it needs to be converted to Date. The old oracle sql was TRUNC(table1.field1)

Now I have to convert it into SQL so I am trying this:

CAST(table1.field1 as DATE) but it gives me the error "

Expression type not compatible with Object type"

It works fine when I run it in sql server...

Any idea?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 26 at 07:30 PM

    Hello,

    You need to change the Data Type from DateTime to Date.

    Thanks,

    Sonet

    Add comment
    10|10000 characters needed characters exceeded

    • If you did not convert his object, would the object parse? if yes, what is the data type you select?

      Normally, DATETETIME and SMALLDATETIME in SQL Server should convert to DATE in UDT.

      And CHAR, VARCHAR and TEXT should convert to Char in UDT.