SHAPE {select au_lname, state from authors} APPEND
((SHAPE
(SHAPE
{select * from authors where state = ?} rs
COMPUTE rs, ANY(rs.state) state, ANY(rs.au_lname) au_lname
BY au_id) rs2
COMPUTE rs2, ANY(rs2.state) BY au_lname)
RELATE state TO PARAMETER 0)
Then use a Shape command with SQL strings:
sSQL = "SHAPE {select * from authors} " & _
"APPEND ({select * from titleauthor} AS chapter " & _
"RELATE au_id TO au_id)"
Or use a Shape command that calls Stored Procedures:
sSQL = "SHAPE {exec spAuthors_LoadAll} " & _
"APPEND ({exec spTitleAuthor_LoadAll} AS chapter " & _
"RELATE au_id TO au_id)"