Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

Version 8.0.19 JDBC & Server problem with view (no replies)

$
0
0
I have discovered a problem when selecting data from a mySQL view that contains one or more calculated fields.

I am using a PreparedStatement to query a view.

Example Table Called XXX
Column AAA Decimal(22,3)
Column BBB Decimal(22,3)

View Called YYY
Columns AAA & BBB from Table XXX plus calculated field as below
Column CCC = (AAA * BBB)

If my prepared statement does a SELECT * FROM XXX it works.
If my prepared statement does a SELECT * FROM YYY if fails with S0001

If I drop the calculated column CCC from the view then the SELECT works
again.

All rows in the table have number values populated with values.

As as workaround I use a VIEW without a calculated field then perform
the following from JDBC

SELECT *,(AAA * BBB) AS CCC from YYY

Its very odd - any ideas ?

Dave

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>