Back
I am having the following code that results with error:
SELECT A.SETMOD, B.DESCRP FROM PMS.PSBSTTBL A JOIN PMS.PR029TBL B ON A.SETMOD = B.PAYMOD
Paymod is of datatype VARCHAR, SETMOD of datatype decimal.
The best way is to convert the decimal to string and compare it with the string value. You can do needed adjustments on the decimal part.
SELECT A.SETMOD, B.DESCRP FROM PMS.PSBSTTBL A JOIN PMS.PR029TBL B ON CONVERT(VARCHAR(50),A.SETMOD) = B.PAYMOD
Want to know more about SQL? Join this SQL Course by Intellipaat.
31k questions
32.8k answers
501 comments
693 users