These are tables that I did not design (and would not have in this fashion), but I 
have to make do with them
 
Table 1 structure:
id_num number,
descr1 varchar(30),
descr2 varchar(30),
descr3 varchr(30)
 
Table 2 structure
id_name varchar(15),
ext_descr varchar(30)
 
Table 2 is a child of table 1 (sort of) id_name in table 2 = id_num from table 1, 
preceeded by zero fill, superceeded by a three digit number (1 - 999).
For example if id_num = 1234567, id_name might be 000001234567001 and there might also 
be a 000001234567002, etc.
 
I need to produce a query (so that I can do a report) that has the following result:
 
id_num
    descr1
    descr2
   descr3
        ext_descr
        ext_descr
        ext_descr
        ...ETC...
 
The bottom line here is that I need to get a select on the id_num in table 1 and all 
corresponding records in table 2. I know I build the first 12 characters of the 
id_name by using the id_num, zero filling and inquiring on substr(id_name,1,12). 
However, I am having a little trouble building the sql statement itself.
 
Any thoughts would be appreciated. Thanks.
 

Mark Roberts 
Sr. Systems Analyst 
Corporate Compliance & Governance Applications 


Reply via email to