Hi all,
There was a post earlier ("Schema Annotation on Element",
2003-09-02) about not wanting to map a complex-type element to a
database BUT wanting to map one or more of its attributes to a
database. Meaning for something like this:
<xsd:element name="CompanyInformation"
sql:relation="AnnualMultexFund" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Company" sql:is-constant="1">
<xsd:complexType>
<xsd:attribute name="Name" type="xsd:string"
sql:field="name" />
<xsd:attribute name="ActiveStatus"
type="xsd:unsignedByte" sql:mapped="false" />
</xsd:complexType>
</xsd:element>
...
What would you place instead of sql:is-constant="1" for "Company",
which doesn't work because if you do that then you can no longer
process its attributes?
In other words, I want "Name" without actually creating another
column for "Company."
Actually, even doing something like
<xsd:element name="Company" sql:field="name_t">
won't work with the error: "the annotation 'field' on the empty content
element 'Company' is not supported" This is an error because "Company" does
not have anything but attributes.
"Sam" <refracti0n@.yahoo.com> wrote in message
news:1c2a5727.0408161409.79652eac@.posting.google.c om...
> Hi all,
> There was a post earlier ("Schema Annotation on Element",
> 2003-09-02) about not wanting to map a complex-type element to a
> database BUT wanting to map one or more of its attributes to a
> database. Meaning for something like this:
> <xsd:element name="CompanyInformation"
> sql:relation="AnnualMultexFund" >
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="Company" sql:is-constant="1">
> <xsd:complexType>
> <xsd:attribute name="Name" type="xsd:string"
> sql:field="name" />
> <xsd:attribute name="ActiveStatus"
> type="xsd:unsignedByte" sql:mapped="false" />
> </xsd:complexType>
> </xsd:element>
> ...
> What would you place instead of sql:is-constant="1" for "Company",
> which doesn't work because if you do that then you can no longer
> process its attributes?
> In other words, I want "Name" without actually creating another
> column for "Company."
|||A suggestion from Irwin:
He could just put the sql:relation annotation on the Company element and
make CompanyInformation constant.
HTH
Michael
"Sam Chou" <sam.chou@.acinvestors.net> wrote in message
news:uZgwrB%23gEHA.3928@.TK2MSFTNGP11.phx.gbl...
> Actually, even doing something like
> <xsd:element name="Company" sql:field="name_t">
> won't work with the error: "the annotation 'field' on the empty content
> element 'Company' is not supported" This is an error because "Company"
> does
> not have anything but attributes.
> "Sam" <refracti0n@.yahoo.com> wrote in message
> news:1c2a5727.0408161409.79652eac@.posting.google.c om...
>
Saturday, February 25, 2012
Annotated Schema Problem for BulkLoad
Labels:
2003-09-02,
adatabase,
annotated,
annotation,
bulkload,
complex-type,
database,
element,
map,
microsoft,
mysql,
oracle,
schema,
server,
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment