Jyothsna Nayak Posted September 20, 2019 Share Posted September 20, 2019 I am trying to apply the RIGHT function to return the last "n" characters of a string. However the following error is thrown. Column COL_NAME of type VARCHAR(255) does not match column RIGHT(TBL_NAME.COL_NAME, 1) of type VARCHAR(9223372036854775807).[parser-2902045] [Log ID: 271bcf53-caf4-4d25-88cb-c5b9810df7fd] How can I rectify this and allow the function to execute Link to comment Share on other sites More sharing options...
Jyothsna Nayak Posted September 20, 2019 Author Share Posted September 20, 2019 Statement worked successfully. I opened the grid view of the query and then applied the RIGHT function to the column using the function dropdown(FUNCTION->CHARACTER->RIGHT). Then thequery ran successfully. However the newly generated query is exactly the same as the old version. Not sure why the error was thrown the first time around. Link to comment Share on other sites More sharing options...
Motsu Aboshi Posted September 20, 2019 Share Posted September 20, 2019 I can't test this, but given the large size value, is the original column by any chance a CLOB/LONGVARCHAR/other larger text value Wondering if the view menu changed the data type so that it worked with the function. Link to comment Share on other sites More sharing options...
Jyothsna Nayak Posted September 23, 2019 Author Share Posted September 23, 2019 The original column is a VARCHAR(255). I found it odd that it is trying to perform any type of conversion at all. I also agree that the view menu did some sort of remap of the datatype and size. I will probably stick with utilizing the function dropdowns to write queries instead of manually typing in the keywords. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now