Monday, October 21, 2019

MySQL5で「Unknown column … in ‘on clause’」


■Error MySQL
Unknown column ... in 'on clause'

Error SQL statement

  • 「FROM a,b」 mutiple table to join
  • 「JOIN」include join statement
SELECT * FROM t1, t2 JOIN t3 ON (t1.i1 = t3.i3);
Unknown column ‘t1.i1’ in ‘on clause’ 

Solution:

1. SELECT * FROM (t1, t2) JOIN t3 ON (t1.i1 = t3.i3);
2. SELECT * FROM t1 JOIN t2 JOIN t3 ON (t1.i1 = t3.i3);

Saturday, October 19, 2019

Select logic with unconverted value

As the unconverted value is in VBAP table, below fetching logic failed.








CONVERSION_EXIT_VHUPI_INPUT         "300148811" -> "0300148811"
CONVERSION_EXIT_VHUPI_OUTPUT    "0300148811" -> "300148811"