Can I sort on a lookup? i4gl basics
Posted in 1997
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
I'm trying to display data from two tables and want to make use of the asterisk (*) convention when defining RECORD. Also, I want to sort on the column coming from the subservient/child table. I'm able to use the asterisk in the SQL statement: SELECT table1.*, table2.col1 FROM table1, OUTER table2 ORDER BY table2.col1, table1.col1 I haven't see a correlation to this for the DEFINE RECORD statement. DEFINE pr_table1 RECORD LIKE table1.* won't let me integrate table2.col1. (Keyword THRU doesn't seem to be an option as it is with SCREEN RECORD.) Can I avoid explicitly naming all the fields in table1? DEFINE pr_form1 RECORD col1 LIKE table1.col1, col2 LIKE table1.col2, ... col1 LIKE table2.col1 END RECORD Originally (hours ago), I defined a record on table1, then did a lookup on table2.col1. Then I realized how nifty it would be to sort on this looked up column. Thanks for your angles, Nelson Nelson Fredsell Cornerstone Capital Atlanta, GA nfredsel@cornercap.com