cancel
Showing results for 
Search instead for 
Did you mean: 

Data Type Conversion Fails in IQ 16

mustafa_kutlu
Explorer
0 Kudos

Hi,

Below code works fine in 15.4 but fails in 16.

Any comments are greatly appreciated.

Create table test (a numeric(10));

update test set a = convert(numeric(10),'')

---data type conversion is not possible---

Interestingly,

select convert(numeric(10),'') works fine in both versions and gives 0 as the output.

Best

Mustafa

Accepted Solutions (0)

Answers (1)

Answers (1)

tayeb_hadjou
Advisor
Advisor
0 Kudos

Hi Mustafa,

Which  ESD# of 15.4 you tested on ?

The first statement fails in my 15.4 ESD3 and ESD4 tests.

The second one is processed by SA not IQ.

To test actually IQ ,  add "from iq_dummy" :

select convert(numeric(10),'') from iq_dummy ;

This select query fails as well.

Regards,

Tayeb.

mustafa_kutlu
Explorer
0 Kudos

Hi Tayeb,

we tested it on 15.4 esd3 and esd4.

select convert(numeric(10),'')

and

the update command worked fine in both esd versions of 15.4

Yes. I forgot the iq_dummy stuff. It is in SQLA.


Is there any behavior change in v16?

tayeb_hadjou
Advisor
Advisor
0 Kudos

Hi Mustafa,

As said, it doesn't work in 15.4 neither for me :

select @@version

Sybase IQ/15.4.0.3038/140226/P/ESD 4/Sun_Sparc/OS 5.10/64bit/2014-02-26 10:23:28

select convert(numeric(10),'') from iq_dummy ;

Could not execute statement.
Data exception - data type conversion is not possible.
-- (dfe_Cast.cxx 918)
SQLCODE=-1001006, ODBC 3 State="HY000"

Same error in IQ16. So, no change behavior here !

Have you a specific setting ?

What is your sp_iqcheckoptions output ?

Regards,

Tayeb.

mustafa_kutlu
Explorer
0 Kudos

Hi Tayeb,

Sorry, we tested it on esd3. Actually, esd4 was installed but alter database upgrde has not been performed yet.

select convert(numeric(10),'') from iq_dummy  works fine in esd3.

Best regards

Mustafa

tayeb_hadjou
Advisor
Advisor
0 Kudos

You probably tested with a specific setting. ESD3 nor 15.4 GA does't accept that conversion :

select @@version

Sybase IQ/15.4.0.3027/130221/P/ESD 3/Enterprise Linux64

select convert(numeric(10),'') from iq_dummy ;

Could not execute statement.
Data exception - data type conversion is not possible.
-- (dfe_Cast.cxx918)

Regards,

Tayeb.