Just a question on the proper syntax of a SQL state when embedding it and using multiple tables (three). I understand SQL and for the most part, the embedding of the SQL (only for a single table), but no so much within the 400 when using multiple tables. For example, when writing SQL using SQL Server or MySQL, I usually write it using joins like this:
As you can tell, I take advantage of SQL's shortcut when naming tables (using the A, B, and C). How can I write this when embedding SQL and do I need to, and if so, how I tell it what library the files are in (with my case, they tables are located in one library). I wish to do this using RPG IV code.
Thank you
Code:
SELECT A.Column1, B.Column2, C.Column3 FROM Table1 A, INNER JOIN Table2 B ON A.Column2 = B.Column2 INNER JOIN Table3 C ON B.Column5 = C.Column5 WHERE C.Column4 = "abc" GROUP BY A.Column1 ORDER BY B.Column2
Thank you





Comment