General information
Category:
Database DAO/RDO/ODBC/ADO
>I'm trying to use the data shaping command. I combine APPEND and COMPUTE in order to do grouping of the child table. It works ok unless I pass a parameter from parent table to the child table.
>
>SHAPE {SELECT ParentTable.* FROM ParentTable} AS Command1 APPEND (( SHAPE {select *, ? as newField from ChildTable} AS Command2 COMPUTE Command2 BY 'ChildField1') AS Command2_Grouping RELATE 'ParentField1' TO PARAMETER 0,'ParentField2' TO 'ChildField2') AS Command2_Grouping"
I think you are use a parameterized hierarchy incorrectly. The question mark should appear in a WHERE clause. So your 2nd SHAPE clause should be something like:
(SHAPE {select * as newField from ChildTable WHERE 'ParentField1' = ?} AS Command2 COMPUTE Command2 BY 'ChildField1'} AS Command2_Grouping RELATE 'ParentField1' TO PARAMETER 0
etc.
Let me know how it goes.
best,
jody
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only