![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi to everybody! I'm trying to make the Bulk Load of an XML file with some tables and I want to make SQL Server 2000 to assign a PK to a column determined in the XSD file (I expecto to find an option that allows me to see the key icon on a column when I click the Design Table option.)I've been searching in the MSDN library and I haven't found anything. If anybody had any suggerence it'd be very wellcomed. These are the XML and XSD file: ?xml version="1.0" encoding="utf-8" ? IND_UNICO schemaVersion="1" DATOS NUM_DOC="3789" NOTARIO_ID>7</NOTARIO_ID DOC NUM_OBJ="14" NUM_OPE="781" NUM_SUJ="587" DOCUMENTO_ID>555</DOCUMENTO_ID OPE OPERACION_ID>4052</OPERACION_ID INMUEBLE INMUEBLE_ID>44</INMUEBLE_ID INMUEBLE_TIPO>casa</INMUEBLE_TIPO INMUEBLE_VALOR>37000000</INMUEBLE_VALOR /INMUEBLE /OPE /DOC /DATOS DATOS NUM_DOC="3791" NOTARIO_ID>9</NOTARIO_ID DOC NUM_OBJ="17" NUM_OPE="784" NUM_SUJ="589" DOCUMENTO_ID>666</DOCUMENTO_ID OPE OPERACION_ID>3036</OPERACION_ID INMUEBLE INMUEBLE_ID>99</INMUEBLE_ID INMUEBLE_TIPO>piso</INMUEBLE_TIPO INMUEBLE_VALOR>46000000</INMUEBLE_VALOR /INMUEBLE /OPE /DOC /DATOS /IND_UNICO And this is the XSD file: ?xml version="1.0" encoding="UTF-8"? xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema" version="2.1.3" xsd:annotation xsd:appinfo sql:relationship name="INDICE_DATOS" parent="tblINDICE" parent-key="idIndice" child="tblDATOS" child-key="idIndice" / sql:relationship name="DATOS_DOCUMENTOS" parent="tblDATOS" parent-key="idDatos" child="tblDOCUMENTOS" child-key="idDatos" / sql:relationship name="DOCUMENTOS_OPERACIONES" parent="tblDOCUMENTOS" parent-key="idDocumento" child="tblOPERACIONES" child-key="idDocumento" / sql:relationship name="OPERACIONES_INMUEBLES" parent="tblOPERACIONES" parent-key="idOperacion" child="tblINMUEBLES" child-key="idOperacion" / /xsd:appinfo /xsd:annotation xsd:element name="IND_UNICO" sql:relation="tblINDICE" xsd:complexType xsd:sequence xsd:element name="DATOS" maxOccurs="unbounded" sql:relation="tblDATOS" sql:relationship="INDICE_DATOS" xsd:complexType xsd:sequence xsd:element name="DOC" sql:relation="tblDOCUMENTOS" sql:relationship="DATOS_DOCUMENTOS" xsd:complexType xsd:sequence xsd:element name="OPE" sql:relation="tblOPERACIONES" sql:relationship="DOCUMENTOS_OPERACIONES" xsd:complexType xsd:sequence xsd:element name="INMUEBLE" sql:relation="tblINMUEBLES" sql:relationship="OPERACIONES_INMUEBLES" xsd:complexType xsd:sequence xsd:element name="INMUEBLE_ID" type="xsd:short"/ xsd:element name="INMUEBLE_TIPO" type="xsd:string"/ xsd:element name="INMUEBLE_VALOR" type="xsd:string"/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name="OPERACION_ID" type="xsd:short"/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name="DOCUMENTO_ID" type="xsd:short"/ /xsd:sequence xsd:attribute name="NUM_OBJ" type="xsd:short" use="required"/ xsd:attribute name="NUM_OPE" type="xsd:short" use="required"/ xsd:attribute name="NUM_SUJ" type="xsd:short" use="required"/ /xsd:complexType /xsd:element xsd:element name="NOTARIO_ID" type="xsd:short"/ /xsd:sequence xsd:attribute name="NUM_DOC" type="xsd:short" use="required"/ /xsd:complexType /xsd:element /xsd:sequence xsd:attribute name="schemaVersion" type="xsd:short" use="required"/ /xsd:complexType /xsd:element /xsd:schema Greetings, David Grant |
#3
| |||
| |||
|
|
-----Original Message----- The table is not created by the bulk load tool is it? From memory it isn't so I would expect you to have created the PK >in advance. I don't think a load should change the |
![]() |
| Thread Tools | |
| Display Modes | |
| |