Shape Recordsets


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Shape Recordsets

  1. #1
    Brent Guest

    Shape Recordsets


    I'm having problems getting a Shape Recordset to populate. Anyone have an
    idea as to what the problem is with the following?

    SHAPE {SELECT DISTINCT
    div_id,
    div_descr AS DIVISION
    FROM AEO_CLS_DEP_DIV},
    ((SHAPE APPEND {SELECT DISTINCT
    div_id,
    dep_id,
    dep_descr
    FROM AEO_CLS_DEP_DIV},
    ((SHAPE APPEND {SELECT DISTINCT
    dep_id,
    cls_id,
    cls_descr
    FROM AEO_CLS_DEP_DIV})
    RELATE dep_id TO dep_id) AS CLS)
    RELATE div_id TO div_id) AS DEP

    The error is occuring around position 75 "AEO_CLS_DEP_DIV}, ((SHAPE APPEND".
    At its first occurance.

  2. #2
    Q*bert Guest

    Re: Shape Recordsets


    I think your syntax between Append/shape is incorrect
    Each shape has to have an append so the first shape statement is complaining
    that it can not find your append. To resolve I would try
    SHAPE {SELECT DISTINCT
    div_id,
    div_descr AS DIVISION
    FROM AEO_CLS_DEP_DIV},
    APPEND ((SHAPE {SELECT DISTINCT)

    "Brent" <vb.@127.0.0.1> wrote:
    >
    >I'm having problems getting a Shape Recordset to populate. Anyone have

    an
    >idea as to what the problem is with the following?
    >
    >SHAPE {SELECT DISTINCT
    > div_id,
    > div_descr AS DIVISION
    > FROM AEO_CLS_DEP_DIV},
    > ((SHAPE APPEND {SELECT DISTINCT
    > div_id,
    > dep_id,
    > dep_descr
    > FROM AEO_CLS_DEP_DIV},
    > ((SHAPE APPEND {SELECT DISTINCT
    > dep_id,
    > cls_id,
    > cls_descr
    > FROM AEO_CLS_DEP_DIV})
    > RELATE dep_id TO dep_id) AS CLS)
    > RELATE div_id TO div_id) AS DEP
    >
    >The error is occuring around position 75 "AEO_CLS_DEP_DIV}, ((SHAPE APPEND".
    > At its first occurance.



  3. #3
    Q*bert Guest

    Re: Shape Recordsets


    Forgot to site my source ...
    http://www.fawcette.com/vsm/2002_04/...default_pf.asp

    "Q*bert" <luke_davis_76@hotmail.com> wrote:
    >
    >I think your syntax between Append/shape is incorrect
    >Each shape has to have an append so the first shape statement is complaining
    >that it can not find your append. To resolve I would try
    >SHAPE {SELECT DISTINCT
    > div_id,
    > div_descr AS DIVISION
    > FROM AEO_CLS_DEP_DIV},
    >APPEND ((SHAPE {SELECT DISTINCT)
    >
    >"Brent" <vb.@127.0.0.1> wrote:
    >>
    >>I'm having problems getting a Shape Recordset to populate. Anyone have

    >an
    >>idea as to what the problem is with the following?
    >>
    >>SHAPE {SELECT DISTINCT
    >> div_id,
    >> div_descr AS DIVISION
    >> FROM AEO_CLS_DEP_DIV},
    >> ((SHAPE APPEND {SELECT DISTINCT
    >> div_id,
    >> dep_id,
    >> dep_descr
    >> FROM AEO_CLS_DEP_DIV},
    >> ((SHAPE APPEND {SELECT DISTINCT
    >> dep_id,
    >> cls_id,
    >> cls_descr
    >> FROM AEO_CLS_DEP_DIV})
    >> RELATE dep_id TO dep_id) AS CLS)
    >> RELATE div_id TO div_id) AS DEP
    >>
    >>The error is occuring around position 75 "AEO_CLS_DEP_DIV}, ((SHAPE APPEND".
    >> At its first occurance.

    >



  4. #4
    Brent Guest

    Re: Shape Recordsets


    Q*bert,
    Thanks for the help. I actually found the answer in the same article and
    it still didn't work. So I created the SQL using the Data Environment.
    Here is the result:

    SHAPE {SELECT DISTINCT div_id, div_descr AS DIVISION FROM AEO_CLS_DEP_DIV}
    AS DIV
    APPEND ((SHAPE {SELECT DISTINCT dep_id, div_id, dep_descr FROM
    AEO_CLS_DEP_DIV}
    AS DEP
    APPEND ({SELECT DISTINCT class_id, dep_id,
    class_descr FROM
    AEO_CLS_DEP_DIV}
    AS CLS
    RELATE 'DEP_ID' TO 'DEP_ID') AS CLS) AS DEP
    RELATE 'DIV_ID' TO 'DIV_ID') AS DEP

    It works great, just don't understand why I have to RELATE the GrandChild
    as GrandChild and then again as Child 'AS CLS) AS DEP'.

    Looks like I've got some reading to do!

    "Q*bert" <luke_davis_76@hotmail.com> wrote:
    >
    >Forgot to site my source ...
    >http://www.fawcette.com/vsm/2002_04/...default_pf.asp
    >
    >"Q*bert" <luke_davis_76@hotmail.com> wrote:
    >>
    >>I think your syntax between Append/shape is incorrect
    >>Each shape has to have an append so the first shape statement is complaining
    >>that it can not find your append. To resolve I would try
    >>SHAPE {SELECT DISTINCT
    >> div_id,
    >> div_descr AS DIVISION
    >> FROM AEO_CLS_DEP_DIV},
    >>APPEND ((SHAPE {SELECT DISTINCT)
    >>
    >>"Brent" <vb.@127.0.0.1> wrote:
    >>>
    >>>I'm having problems getting a Shape Recordset to populate. Anyone have

    >>an
    >>>idea as to what the problem is with the following?
    >>>
    >>>SHAPE {SELECT DISTINCT
    >>> div_id,
    >>> div_descr AS DIVISION
    >>> FROM AEO_CLS_DEP_DIV},
    >>> ((SHAPE APPEND {SELECT DISTINCT
    >>> div_id,
    >>> dep_id,
    >>> dep_descr
    >>> FROM AEO_CLS_DEP_DIV},
    >>> ((SHAPE APPEND {SELECT DISTINCT
    >>> dep_id,
    >>> cls_id,
    >>> cls_descr
    >>> FROM AEO_CLS_DEP_DIV})
    >>> RELATE dep_id TO dep_id) AS CLS)
    >>> RELATE div_id TO div_id) AS DEP
    >>>
    >>>The error is occuring around position 75 "AEO_CLS_DEP_DIV}, ((SHAPE APPEND".
    >>> At its first occurance.

    >>

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center