Information générale
Catégorie:
Bases de données 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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement