Loading ...
Sorry, an error occurred while loading the content.

2 small questions

Expand Messages
  • Etienne Orliac
    Dear all, there are two small questions I d like to ask the group: 1. I saw that the issue was already reported, but is there a way now to ask for UPDATE
    Message 1 of 2 , Nov 25, 2004
    • 0 Attachment
      Dear all,

      there are two small questions I'd like to ask the group:

      1. I saw that the issue was already reported, but is there a way now to ask for "UPDATE" instead of "INSERT" that leads to an error due to duplicate keys?

      2. Considering the small xml document hereafter:
      <?xml version="1.0" encoding="UTF-8"?>
      <logFile>
      <blockA>
      <el1>aaaa</el1>
      <el2>bbbb</el2>
      <el3>cccc</el3>
      </blockA>
      <blockB>
      <el4>dd</el4>
      <el5>ee</el5>
      </blockB>
      </logFile>

      Is there a way to map el4 from blockB to a column of the table on which blockA is mapped onto? (The reason I ask the question is that blockB contains the ID of what the all document represents)

      Many thanks,

      Etienne.


      This message has been scanned but we cannot guarantee that it and any
      attachments are free from viruses or other damaging content: you are
      advised to perform your own checks. Email communications with the
      University of Nottingham may be monitored as permitted by UK legislation.
    • Ronald Bourret
      1) Use version 2.0 alpha 3. This supports an action document that allows you to specify what to do with the data in an incoming XML document -- insert it,
      Message 2 of 2 , Nov 26, 2004
      • 0 Attachment
        1) Use version 2.0 alpha 3. This supports an "action" document that
        allows you to specify what to do with the data in an incoming XML
        document -- insert it, use it to update existing data, etc. You'll want
        to use either the UPDATE or UPDATEORINSERT actions.

        2) You'll need to use XSLT or SAX to transform the incoming document so
        that el4 is a child of blockA. For example, if you don't care about
        blockB/el5, transform the document into:

        <logFile>
        <blockA>
        <el1>aaaa</el1>
        <el2>bbbb</el2>
        <el3>cccc</el3>
        <el4>dd</el4>
        </blockA>
        </logFile>

        If you also want to store blockB/el5, transform the document into:

        <logFile>
        <blockA>
        <el1>aaaa</el1>
        <el2>bbbb</el2>
        <el3>cccc</el3>
        <el4>dd</el4>
        </blockA>
        <blockB>
        <el4>dd</el4>
        <el5>ee</el5>
        </blockB>
        </logFile>

        The ability to do what you wanted was originally planned for version
        2.0, but was not implemented due to technical difficulties. (It turned
        out to be much more complex than I had imagined.)

        -- Ron

        Etienne Orliac wrote:

        > Dear all,
        >
        > there are two small questions I'd like to ask the group:
        >
        > 1. I saw that the issue was already reported, but is there a way now to ask for "UPDATE" instead of "INSERT" that leads to an error due to duplicate keys?
        >
        > 2. Considering the small xml document hereafter:
        > <?xml version="1.0" encoding="UTF-8"?>
        > <logFile>
        > <blockA>
        > <el1>aaaa</el1>
        > <el2>bbbb</el2>
        > <el3>cccc</el3>
        > </blockA>
        > <blockB>
        > <el4>dd</el4>
        > <el5>ee</el5>
        > </blockB>
        > </logFile>
        >
        > Is there a way to map el4 from blockB to a column of the table on which blockA is mapped onto? (The reason I ask the question is that blockB contains the ID of what the all document represents)
      Your message has been successfully submitted and would be delivered to recipients shortly.