Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect query generation for cast integer to string for DB2 row validation. #799

Closed
piyushsarraf opened this issue Apr 10, 2023 · 1 comment · Fixed by #800
Closed
Assignees
Labels
priority: p1 High priority. Fix may be included in the next release.

Comments

@piyushsarraf
Copy link
Contributor

piyushsarraf commented Apr 10, 2023

There is incorrect query generation while doing row validation for DB. When casting to string we are casting to CLOB and query is:

SELECT t6.guestname AS guestname, t6.content AS content, t6.entryid AS entryid, t6.guestname AS cast__guestname, t6.content AS cast__content, CAST(t6.entryid AS CLOB) AS cast__entryid 
FROM db2inst1.entries AS t6

But we are facing an error that:
A value with data type "SYSIBM.INTEGER" cannot be CAST to type "SYSIBM.CLOB".

I think instead of casting to CLOB casting to VARCHAR(n) will be a solution.

Some samples from DB2 terminal:
image
image

@Raniksingh Raniksingh added the priority: p1 High priority. Fix may be included in the next release. label Apr 10, 2023
@ngdav
Copy link
Collaborator

ngdav commented Apr 10, 2023

What's the exact DVT command/config you're using when getting this error?

@ngdav ngdav linked a pull request Apr 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 High priority. Fix may be included in the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants