Re: Nested SHAPE statements
here is my idea:
SHAPE {select * from publishers} AS publishers APPEND (( SHAPE {select * from titles} AS books APPEND ({select * from sales} AS stores RELATE 'title_id' TO 'title_id') AS stores) AS books RELATE 'pub_id' TO 'pub_id') AS books
I didn't get any syntax errors.
I think, some of the tables you mentioned don't make sense.
You need to join publishers, books and sales IMHO.
Re: Nested SHAPE statements
...actually, this final version is better:
SHAPE {select * from publishers} AS publ APPEND (( SHAPE {select * from titles} AS titles APPEND ({select * from sales} AS sales RELATE 'title_id' TO 'title_id') AS sales) AS titles RELATE 'pub_id' TO 'pub_id') AS titles
I tested the output with a Hierarchical Flexgrid...
Re: Nested SHAPE statements
I was wondering whether or not an extra set of parens were needed - apparently they were.
Thank you!
John
John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org
Re: Nested SHAPE statements
the best way to find the "right" syntax is, add a data environment to your project and construct the hierarchy in the DE. Then, when you are finished just right-click on the top-level command and view the "hierarchy properties" to get the complete ADO shape command.
Copy and paste it in your project if you don't want to use the DE.
Re: Nested SHAPE statements
I almost never use the DE, so I wasn't aware that it could handle hierarchical rs's. I do use to build connectionstrings to unfamiliar data sources, though. :)
thanks for the tip.
John
John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org