Crazyfrog2005
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Crazyfrog2005
-
-
Hi everyoneI am having a problem with creating a mapping shema to bulk load a xml data file to sql server 2000 enterprise manager. I am new to xml schema. I have read some online examples, however, can't solve it. My case is a bit more complicated. After 2 hours debugging, not yet finished. My xml file is like that below:<details> <manager> <id>0</id> <sign_id>104</sign_id> <staff_no>532257</staff_no> <sign_name>Carolyn Ng</sign_name> <sign_title>Director Relationships</sign_title> <sign_phone>empty</sign_phone> <sign_fax>empty</sign_fax> <email_addr>carolyn_ng@westpac.co.nz</email_addr> <signature> <image file="I:\Analytics\Campaigns\Signatures\104.tif"> </image> </signature> </manager> ...</details>And there is a table 'tblSignature' in sql server database, which is to be filled in with the data in xml file.I feel the hardest part is the elements <signature> and <image>, and the attribute "file". What i am thinking now is I may have to create 3 tables in order to load this xml file to database. One for element <manager>, one for element <signature>, and one for <image>. And there is a relationship among those 3. But since every table should have a primary key, whereas <signature> obiviously has only a link to <image>, it makes me screwed up here. In addition, all i want is to load all the data in xml file into 1 table rather than 3. Can anyone help me with this please? Many thanks.
How to creat a mapping schema in this case?
in Schema
Posted