Man know tool to create XML map table structrure in RDB
I want to create XML files that map my tables in database in my application.
I just need the table column structrues/foreign reference/PK.
Some good frame like Hibernate is good, but is too complicated and large like a big bull. I just need a little sheep to help the problem.
So some guide for this type tools?
You are appreciated.
Thanks for your reading.
Here is the relationship: They both contain geographic coordinates that produce a point on a map. I will use the rest of the information in the second xml file (company name, address, link, etc.) to produce the information for the bubble that will pop up once the marker is clicked.
My problem is that I need to try to keep the second xml file in a relatively similar format, so the rest of my records will still be accepted. If I had a smaller amount of records I could place them directly into the javascript, but because there are so many records, I need to use an xml file that can be retrieved by the java script. I chose to use the second type of xml file because I can easily copy and past the 14,000+ records that are now in excel document.
After the xml issue is corrected I need to rework the javascript that is now emboldened so that it will read the new xml file correctly. I included the first xml file so that the readers will understand what type of xml format is currently being used to produce the markers in the tutorial map.
Similar Messages
-
Tool to create XML definition, a tool for creating XSD
I need a tool to create XML definition, a tool for creating XSD.
I was trying to do this with Oracle packages. But again there are some problems. Could you tell me which one, I should use?
Can I do it with the Oracle SQL Developer?Hello,
i get the error message and I don't know, what I can do
The user have the permissions to use DBMS_LOB package.
Is it the sofware, do I need a license version tool for XML generation
SQL> select DBMS_XMLSCHEMA.GENERATESCHEMA( 'HR', 'EMP_DATA' )
2 from dual;
select DBMS_XMLSCHEMA.GENERATESCHEMA( 'HR', 'EMP_DATA' )
ERROR at line 1:
ORA-00904: "DBMS_XMLSCHEMA"."GENERATESCHEMA": invalid identifier -
Where is CopyEvolve trying to create the mapping table?
SQL*Plus: Release 10.2.0.1.0
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning and Data Mining options
I am trying to use DBMS_XMLSCHEMA.copyEvolve .
ORA-30945: Could not create mapping table 'XDB$MAPTAB481'
ORA-01031: insufficient privileges
I can create a table in my own schema. I am left to assume copyEvolve is trying to create the table someplace else, but where?
The oracle docs say "If there are schema-based XMLType tables or columns in other database schemas, you need privileges such as the following: CREATE ANY TABLE" I have CREATE TABLE but not CREATE ANY TABLE (and have little hope of getting it from our DBAs!) but I didn't think this would be an issue since the XML schema I am trying to evolve is only used by an object in my schema. Anyone have any idea what privilige it is that I am missing?
Thanks,
ggbHi,
There is a LastActiveTime column in collection views(such as dbo._RES_COLL_SMS00001).
It records the date of last communication.
Best Regards,
Joyce Li
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
** Not able to create Value Mapping Table in Integration Directory
Hi friends,
I am not able to create value mapping entries like below in ID.
Agency : Computer1 Agency : Computer2
Scheme: Country Scheme: CountryCode
Value for Computer1 Value for Computer2
Australia AU
India IN
Austria AU
Note that I have assigned the same country code 'AU' for the Countries 'Australia' & 'Austria'. But, when we assign 'AU' to 'Austria', the system asks question as below:
Value mapping already exists
Australia | AU
Austria | AU
Do you want to delete it from the existing group and assign it to the current group instead?
Continue Cancel
Though choose any of the option, I am not able to assign 'AU' to 'Austria'.
Friends, this is my requirement. How do we solve this ?
Kindly help me.
Kind Regards,
Jeg P.Hi Koen,
I tried this. Its working fine now. Thanks for giving guidance to me. Then, I have another doubt. Suppose if we create 2 sets of VM table, (First Receiver will act as 2nd one how do we achieve this). For Ex:
Set 1:
Source Agency: SYS1 Target Agency: SYS2
Source Scheme: CODE Scheme : DEPT
A HR
B Accts
C Finance
Set 2:
Source Agency: SYS2 Target Agency: SYS3
Source Scheme: DEPT Scheme : GRADE
HR Second
Accts First
Finance First
In this case, I followed the same logic which you said, but I am not able to create. I think the main point is GUID here. If you have any idea, kindly tell me.
Kind Regards,
Jegathees -
Ora3113 trying to create xml type table
I registered a rather large schema. When I try to create an XML type table either using OEM or via sqlplus I get an end of file on communication error.
SQL*Plus: Release 9.2.0.1.0 - Production on Tue Aug 27 15:24:01 2002
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected.
CREATE TABLE "SYSTEM"."XMLTEXT" OF SYS.XMLTYPE XMLSCHEMA "http://xmlns.oracle.com/xdb/schemas/SYSTEM/www.oracle.com/xsd/visora.xsd" ELEMENT "Text"
ERROR at line 1:
ORA-03113: end-of-file on communication channelI registered a rather large schema. When I try to create an XML type table either using OEM or via sqlplus I get an end of file on communication error.
SQL*Plus: Release 9.2.0.1.0 - Production on Tue Aug 27 15:24:01 2002
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected.
CREATE TABLE "SYSTEM"."XMLTEXT" OF SYS.XMLTYPE XMLSCHEMA "http://xmlns.oracle.com/xdb/schemas/SYSTEM/www.oracle.com/xsd/visora.xsd" ELEMENT "Text"
ERROR at line 1:
ORA-03113: end-of-file on communication channel -
How create a Value Mapping Table in XI 3.0?
Hi:
I wish make a single sample scenario where receiving data must be converted according to convertion table:
01 -
Legacy A | Legacy B -
M
Male: 01 | M
Female: 02 | F
And I don´t know how build it. Must I create anything in Integration Repository? (any special message mapping or function?).
Anyone know about weblog where explain step by step for "value mapping group" and "value mapping tables" creation?
Help me please.
Regards!!
David.Hi David,
You can create value mapping tables in Integration Directory.
First you have to create Value mapping group using menu Object>new>Value mapping Group
to Display value mapping you have to use Tools--> Value mapping.
Also refer to following link on help.sap.com
http://help.sap.com/saphelp_nw04/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/content.htm
In IR Graphical mapping tool, use the standard function Conversions-->Value mapping.
Hope this helps.
Rgds,
Sam Raju
Message was edited by: Sam Raju
Message was edited by: Sam Raju -
DBMS_XMLSCHEMA.CopyEvolve produces ORA-30945: Could not create mapping tabl
Hi,
I am trying to update a XML Schema concerning the documents relaties.xsd (the old one) and relaties_v2.xsd (the new one containing only a minor change).
The document relaties.xsd looks like this:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb"
elementFormDefault="unqualified"
attributeFormDefault="unqualified"
version="1.0">
<xsd:element name="Relatie" xdb:defaultTable="">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Voornaam" type="xsd:string"/>
<xsd:element name="Achternaam" type="xsd:string"/>
<xsd:element name="Tussenvoegsel" type="xsd:string"/>
<xsd:element name="Geboortedatum" type="xsd:date"/>
<xsd:element name="Geslacht">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="M"/>
<xsd:enumeration value="V"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Sofinummer">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{9}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Straatnaam" type="xsd:string"/>
<xsd:element name="Huisnummer" type="xsd:string"/>
<xsd:element name="Woonplaats" type="xsd:string"/>
<!--xsd:element name="Postcode" type="xsd:string"/-->
<xsd:element name="Postcode">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{4} [A-Z]{2}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Zrn">
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="1000000"/>
<xsd:maxInclusive value="99999999999999"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Here are the steps I took.
DECLARE
res BOOLEAN;
BEGIN
res := DBMS_XDB.createResource('/xsd/relaties.xsd',
bfilename('XSDDIR', 'relaties.xsd')
END;
DECLARE
res BOOLEAN;
BEGIN
res := DBMS_XDB.createResource('/xsd/relaties_v2.xsd',
bfilename('XSDDIR', 'relaties_v2.xsd')
END;
BEGIN
DBMS_XMLSCHEMA.registerSchema(
'http://localhost:8080/xsd/relaties.xsd',
XDBURIType('/xsd/relaties.xsd').getClob(),
TRUE,
FALSE,
FALSE,
TRUE);
END;
CREATE
TABLE relatie_documenten OF XMLTYPE
XMLSCHEMA "http://localhost:8080/xsd/relaties.xsd"
ELEMENT "Relatie"
CREATE OR REPLACE
TRIGGER upo_rdt_ai
AFTER INSERT ON relatie_documenten
FOR EACH ROW
DECLARE
doc XMLType;
BEGIN
doc := :new.SYS_NC_ROWINFO$;
XMLType.schemaValidate(doc);
END;
Then I inserted some xml documents into the table relatie_documenten. The XSD worked fine.
Then I executed the following statement:
BEGIN
DBMS_XMLSCHEMA.copyEvolve
( schemaURLs => xdb$string_list_t('http://localhost:8080/xsd/relaties.xsd')
, newSchemas => XMLSequenceType(XDBURIType('/xsd/relaties_v2.xsd').getXML())
, preserveOldDocs => TRUE
, mapTabName => 'RELATIE_DOCUMENTEN_TEMP'
, generateTables => FALSE
END;
This resulted in:
ERROR at line 1:
ORA-30945: Could not create mapping table 'RELATIE_DOCUMENTEN_TEMP'
ORA-00600: internal error code, arguments: [kqludp2], [0x66AB407C], [0], [],
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 113
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 210
ORA-06512: at line 2
I checked system priviliges as documented in XML DB Developers Guide, Chapter 8 XML Schema Evolution. No other users were connected. The mapping table RELATIE_DOCUMENTEN_TEMP nor any other object named RELATIE_DOCUMENTEN_TEMP did not exist.
Anyone an idea why I cannot create my mapping table ?
GregorWhich release / platform are you working with
With 10.2.0.2.1 on Widows I get
SQL> var schemaURL varchar2(256)
SQL> var schemaPath varchar2(256)
SQL> --
SQL> begin
2 :schemaURL := 'http://localhost:8080/xsd/relaties.xsd';
3 :schemaPath := '/public/relaties.xsd';
4 end;
5 /
PL/SQL procedure successfully completed.
SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
2 /
Call completed.
SQL> declare
2 res boolean;
3 xmlSchema xmlType := xmlType(
4 '<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5 xmlns:xdb="http://xmlns.oracle.com/xdb"
6 elementFormDefault="unqualified"
7 attributeFormDefault="unqualified"
8 version="1.0">
9 <xsd:element name="Relatie" xdb:defaultTable="">
10 <xsd:complexType>
11 <xsd:sequence>
12 <xsd:element name="Voornaam" type="xsd:string"/>
13 <xsd:element name="Achternaam" type="xsd:string"/>
14 <xsd:element name="Tussenvoegsel" type="xsd:string"/>
15 <xsd:element name="Geboortedatum" type="xsd:date"/>
16 <xsd:element name="Geslacht">
17 <xsd:simpleType>
18 <xsd:restriction base="xsd:string">
19 <xsd:enumeration value="M"/>
20 <xsd:enumeration value="V"/>
21 </xsd:restriction>
22 </xsd:simpleType>
23 </xsd:element>
24 <xsd:element name="Sofinummer">
25 <xsd:simpleType>
26 <xsd:restriction base="xsd:string">
27 <xsd:pattern value="\d{9}"/>
28 </xsd:restriction>
29 </xsd:simpleType>
30 </xsd:element>
31 <xsd:element name="Straatnaam" type="xsd:string"/>
32 <xsd:element name="Huisnummer" type="xsd:string"/>
33 <xsd:element name="Woonplaats" type="xsd:string"/>
34 <!--xsd:element name="Postcode" type="xsd:string"/-->
35 <xsd:element name="Postcode">
36 <xsd:simpleType>
37 <xsd:restriction base="xsd:string">
38 <xsd:pattern value="\d{4} [A-Z]{2}"/>
39 </xsd:restriction>
40 </xsd:simpleType>
41 </xsd:element>
42 <xsd:element name="Zrn">
43 <xsd:simpleType>
44 <xsd:restriction base="xsd:integer">
45 <xsd:minInclusive value="1000000"/>
46 <xsd:maxInclusive value="99999999999999"/>
47 </xsd:restriction>
48 </xsd:simpleType>
49 </xsd:element>
50 </xsd:sequence>
51 </xsd:complexType>
52 </xsd:element>
53 </xsd:schema>');
54 begin
55 if (dbms_xdb.existsResource(:schemaPath)) then
56 dbms_xdb.deleteResource(:schemaPath);
57 end if;
58 res := dbms_xdb.createResource(:schemaPath,xmlSchema);
59 end;
60 /
PL/SQL procedure successfully completed.
SQL> BEGIN
2 DBMS_XMLSCHEMA.registerSchema(
3 :schemaURL,
4 XDBURIType(:schemaPath).getClob(),
5 TRUE,
6 FALSE,
7 FALSE,
8 TRUE);
9 END;
10 /
PL/SQL procedure successfully completed.
SQL> DROP TABLE relatie_documenten FORCE
2 /
Table dropped.
SQL> CREATE TABLE relatie_documenten OF XMLTYPE
2 XMLSCHEMA "http://localhost:8080/xsd/relaties.xsd"
3 ELEMENT "Relatie"
4 /
Table created.
SQL> CREATE OR REPLACE TRIGGER upo_rdt_ai
2 AFTER INSERT ON relatie_documenten
3 FOR EACH ROW
4 DECLARE
5 doc XMLType;
6 BEGIN
7 doc := :new.SYS_NC_ROWINFO$;
8 XMLType.schemaValidate(doc);
9 END;
10 /
Trigger created.
SQL> INSERT
2 INTO relatie_documenten
3 VALUES (XMLType
4 ('<Relatie>
5 <Voornaam>Johan</Voornaam>
6 <Achternaam>Hermans</Achternaam>
7 <Tussenvoegsel/>
8 <Geboortedatum>1978-01-02</Geboortedatum>
9 <Geslacht>M</Geslacht>
10 <Sofinummer>233300417</Sofinummer>
11 <Straatnaam>Stationstraat</Straatnaam>
12 <Huisnummer>10</Huisnummer>
13 <Woonplaats>Weesp</Woonplaats>
14 <Postcode>1383 AK</Postcode>
15 <Zrn>1234567</Zrn>
16 </Relatie>'
17 ).CreateSchemaBasedXML(:schemaURL))
18 /
1 row created.
SQL> commit
2 /
Commit complete.
SQL> INSERT
2 INTO relatie_documenten
3 VALUES (XMLType
4 ('<Relatie>
5 <Voornaam>Johanna</Voornaam>
6 <Achternaam>Gurts</Achternaam>
7 <Tussenvoegsel/>
8 <Geboortedatum>1975-11-12</Geboortedatum>
9 <Geslacht>V</Geslacht>
10 <Sofinummer>234109807</Sofinummer>
11 <Straatnaam>Stationstraat</Straatnaam>
12 <Huisnummer>10</Huisnummer>
13 <Woonplaats>Weesp</Woonplaats>
14 <Postcode>1383 AK</Postcode>
15 <Zrn>7654321</Zrn>
16 </Relatie>').CreateSchemaBasedXML(:schemaURL))
17 /
1 row created.
SQL> commit
2 /
Commit complete.
SQL> INSERT
2 INTO relatie_documenten
3 VALUES (XMLType
4 ('<Relatie>
5 <Voornaam>Johanna</Voornaam>
6 <Achternaam>Gurts</Achternaam>
7 <Tussenvoegsel/>
8 <Geboortedatum>1975-11-12</Geboortedatum>
9 <Geslacht>O</Geslacht>
10 <Sofinummer>234109807</Sofinummer>
11 <Straatnaam>Stationstraat</Straatnaam>
12 <Huisnummer>10</Huisnummer>
13 <Woonplaats>Weesp</Woonplaats>
14 <Postcode>1383 AK</Postcode>
15 <Zrn>7654321</Zrn>
16 </Relatie>').CreateSchemaBasedXML(:schemaURL))
17 /
VALUES (XMLType
ERROR at line 3:
ORA-31038: Invalid enumeration value: "O"
ORA-06512: at "SYS.XMLTYPE", line 345
ORA-06512: at "SCOTT.UPO_RDT_AI", line 5
ORA-04088: error during execution of trigger 'SCOTT.UPO_RDT_AI'
SQL> commit
2 /
Commit complete.
SQL> declare
2 xmlschema xmltype;
3 res boolean;
4 begin
5 select xdburitype(:schemaPath).getXML()
6 into xmlSchema
7 from dual;
8 dbms_xdb.deleteResource(:schemaPath);
9 select insertChildXML
10 (
11 xmlschema,
12 '/xsd:schema//xsd:element[@name="Geslacht"]/xsd:simpleType/xsd:restriction',
13 'xsd:enumeration',
14 xmltype('<xsd:enumeration xmlns:xsd="http://www.w3.org/2001/XMLSchema" value="O"/>'),
15 'xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
16 )
17 into xmlSchema
18 from dual;
19 res := dbms_xdb.createResource(:schemaPath,xmlSchema);
20 end;
21 /
PL/SQL procedure successfully completed.
SQL> commit
2 /
Commit complete.
SQL> set long 100000 pages 200 lines 140
SQL> --
SQL> select xdburitype(:schemaPath).getXML()
2 from dual
3 /
XDBURITYPE(:SCHEMAPATH).GETXML()
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="unqualified" attributeF
ormDefault="unqualified" version="1.0">
<xsd:element name="Relatie" xdb:defaultTable="">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Voornaam" type="xsd:string"/>
<xsd:element name="Achternaam" type="xsd:string"/>
<xsd:element name="Tussenvoegsel" type="xsd:string"/>
<xsd:element name="Geboortedatum" type="xsd:date"/>
<xsd:element name="Geslacht">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="M"/>
<xsd:enumeration value="V"/>
<xsd:enumeration xmlns:xsd="http://www.w3.org/2001/XMLSchema" value="O"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Sofinummer">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{9}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Straatnaam" type="xsd:string"/>
<xsd:element name="Huisnummer" type="xsd:string"/>
<xsd:element name="Woonplaats" type="xsd:string"/>
<!--xsd:element name="Postcode" type="xsd:string"/-->
<xsd:element name="Postcode">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{4} [A-Z]{2}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Zrn">
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="1000000"/>
<xsd:maxInclusive value="99999999999999"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
SQL> DROP TABLE RELATIE_DOCUMENTEN_TEMP
2 /
Table dropped.
SQL> BEGIN
2 DBMS_XMLSCHEMA.copyEvolve
3 ( schemaURLs => xdb$string_list_t(:schemaURL)
4 , newSchemas => XMLSequenceType(XDBURIType(:schemaPath).getXML())
5 , preserveOldDocs => TRUE
6 , mapTabName => 'RELATIE_DOCUMENTEN_TEMP'
7 , generateTables => FALSE
8 );
9 END;
10 /
PL/SQL procedure successfully completed.
SQL> CREATE TABLE relatie_documenten OF XMLTYPE
2 XMLSCHEMA "http://localhost:8080/xsd/relaties.xsd"
3 ELEMENT "Relatie"
4 /
Table created.
SQL> CREATE OR REPLACE TRIGGER upo_rdt_ai
2 AFTER INSERT ON relatie_documenten
3 FOR EACH ROW
4 DECLARE
5 doc XMLType;
6 BEGIN
7 doc := :new.SYS_NC_ROWINFO$;
8 XMLType.schemaValidate(doc);
9 END;
10 /
Trigger created.
SQL> declare
2 tablename varchar2(2000);
3 begin
4 select temp_tabname
5 into tablename
6 from RELATIE_DOCUMENTEN_TEMP
7 where table_name = USER || '.' || upper('relatie_documenten');
8 execute immediate 'insert into relatie_documenten select xmltype(data) from ' || tablename;
9 commit;
10 end;
11 /
PL/SQL procedure successfully completed.
SQL> select *
2 from relatie_documenten
3 /
SYS_NC_ROWINFO$
<Relatie>
<Voornaam>Johan</Voornaam>
<Achternaam>Hermans</Achternaam>
<Tussenvoegsel/>
<Geboortedatum>1978-01-02</Geboortedatum>
<Geslacht>M</Geslacht>
<Sofinummer>233300417</Sofinummer>
<Straatnaam>Stationstraat</Straatnaam>
<Huisnummer>10</Huisnummer>
<Woonplaats>Weesp</Woonplaats>
<Postcode>1383 AK</Postcode>
<Zrn>1234567</Zrn>
</Relatie>
<Relatie>
<Voornaam>Johanna</Voornaam>
<Achternaam>Gurts</Achternaam>
<Tussenvoegsel/>
<Geboortedatum>1975-11-12</Geboortedatum>
<Geslacht>V</Geslacht>
<Sofinummer>234109807</Sofinummer>
<Straatnaam>Stationstraat</Straatnaam>
<Huisnummer>10</Huisnummer>
<Woonplaats>Weesp</Woonplaats>
<Postcode>1383 AK</Postcode>
<Zrn>7654321</Zrn>
</Relatie>
SQL> INSERT
2 INTO relatie_documenten
3 VALUES (XMLType
4 ('<Relatie>
5 <Voornaam>Johanna</Voornaam>
6 <Achternaam>Gurts</Achternaam>
7 <Tussenvoegsel/>
8 <Geboortedatum>1975-11-12</Geboortedatum>
9 <Geslacht>O</Geslacht>
10 <Sofinummer>234109807</Sofinummer>
11 <Straatnaam>Stationstraat</Straatnaam>
12 <Huisnummer>10</Huisnummer>
13 <Woonplaats>Weesp</Woonplaats>
14 <Postcode>1383 AK</Postcode>
15 <Zrn>7654321</Zrn>
16 </Relatie>').CreateSchemaBasedXML(:schemaURL))
17 /
1 row created.
SQL> commit
2 /
Commit complete.
SQL> select *
2 from relatie_documenten
3 /
SYS_NC_ROWINFO$
<Relatie>
<Voornaam>Johan</Voornaam>
<Achternaam>Hermans</Achternaam>
<Tussenvoegsel/>
<Geboortedatum>1978-01-02</Geboortedatum>
<Geslacht>M</Geslacht>
<Sofinummer>233300417</Sofinummer>
<Straatnaam>Stationstraat</Straatnaam>
<Huisnummer>10</Huisnummer>
<Woonplaats>Weesp</Woonplaats>
<Postcode>1383 AK</Postcode>
<Zrn>1234567</Zrn>
</Relatie>
<Relatie>
<Voornaam>Johanna</Voornaam>
<Achternaam>Gurts</Achternaam>
<Tussenvoegsel/>
<Geboortedatum>1975-11-12</Geboortedatum>
<Geslacht>V</Geslacht>
<Sofinummer>234109807</Sofinummer>
<Straatnaam>Stationstraat</Straatnaam>
<Huisnummer>10</Huisnummer>
<Woonplaats>Weesp</Woonplaats>
<Postcode>1383 AK</Postcode>
<Zrn>7654321</Zrn>
</Relatie>
<Relatie>
<Voornaam>Johanna</Voornaam>
<Achternaam>Gurts</Achternaam>
<Tussenvoegsel/>
<Geboortedatum>1975-11-12</Geboortedatum>
<Geslacht>O</Geslacht>
<Sofinummer>234109807</Sofinummer>
<Straatnaam>Stationstraat</Straatnaam>
<Huisnummer>10</Huisnummer>
<Woonplaats>Weesp</Woonplaats>
<Postcode>1383 AK</Postcode>
<Zrn>7654321</Zrn>
</Relatie>
SQL>Here's the SQL, can you cut'n'paste and run the whole thing as XML_OWNER
var schemaURL varchar2(256)
var schemaPath varchar2(256)
begin
:schemaURL := 'http://localhost:8080/xsd/relaties.xsd';
:schemaPath := '/public/relaties.xsd';
end;
call dbms_xmlSchema.deleteSchema(:schemaURL,4)
declare
res boolean;
xmlSchema xmlType := xmlType(
'<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb"
elementFormDefault="unqualified"
attributeFormDefault="unqualified"
version="1.0">
<xsd:element name="Relatie" xdb:defaultTable="">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Voornaam" type="xsd:string"/>
<xsd:element name="Achternaam" type="xsd:string"/>
<xsd:element name="Tussenvoegsel" type="xsd:string"/>
<xsd:element name="Geboortedatum" type="xsd:date"/>
<xsd:element name="Geslacht">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="M"/>
<xsd:enumeration value="V"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Sofinummer">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{9}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Straatnaam" type="xsd:string"/>
<xsd:element name="Huisnummer" type="xsd:string"/>
<xsd:element name="Woonplaats" type="xsd:string"/>
<!--xsd:element name="Postcode" type="xsd:string"/-->
<xsd:element name="Postcode">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{4} [A-Z]{2}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Zrn">
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="1000000"/>
<xsd:maxInclusive value="99999999999999"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>');
begin
if (dbms_xdb.existsResource(:schemaPath)) then
dbms_xdb.deleteResource(:schemaPath);
end if;
res := dbms_xdb.createResource(:schemaPath,xmlSchema);
end;
BEGIN
DBMS_XMLSCHEMA.registerSchema(
:schemaURL,
XDBURIType(:schemaPath).getClob(),
TRUE,
FALSE,
FALSE,
TRUE);
END;
DROP TABLE relatie_documenten FORCE
CREATE TABLE relatie_documenten OF XMLTYPE
XMLSCHEMA "http://localhost:8080/xsd/relaties.xsd"
ELEMENT "Relatie"
CREATE OR REPLACE TRIGGER upo_rdt_ai
AFTER INSERT ON relatie_documenten
FOR EACH ROW
DECLARE
doc XMLType;
BEGIN
doc := :new.SYS_NC_ROWINFO$;
XMLType.schemaValidate(doc);
END;
INSERT
INTO relatie_documenten
VALUES (XMLType
('<Relatie>
<Voornaam>Johan</Voornaam>
<Achternaam>Hermans</Achternaam>
<Tussenvoegsel/>
<Geboortedatum>1978-01-02</Geboortedatum>
<Geslacht>M</Geslacht>
<Sofinummer>233300417</Sofinummer>
<Straatnaam>Stationstraat</Straatnaam>
<Huisnummer>10</Huisnummer>
<Woonplaats>Weesp</Woonplaats>
<Postcode>1383 AK</Postcode>
<Zrn>1234567</Zrn>
</Relatie>'
).CreateSchemaBasedXML(:schemaURL))
commit
INSERT
INTO relatie_documenten
VALUES (XMLType
('<Relatie>
<Voornaam>Johanna</Voornaam>
<Achternaam>Gurts</Achternaam>
<Tussenvoegsel/>
<Geboortedatum>1975-11-12</Geboortedatum>
<Geslacht>V</Geslacht>
<Sofinummer>234109807</Sofinummer>
<Straatnaam>Stationstraat</Straatnaam>
<Huisnummer>10</Huisnummer>
<Woonplaats>Weesp</Woonplaats>
<Postcode>1383 AK</Postcode>
<Zrn>7654321</Zrn>
</Relatie>').CreateSchemaBasedXML(:schemaURL))
commit
INSERT
INTO relatie_documenten
VALUES (XMLType
('<Relatie>
<Voornaam>Johanna</Voornaam>
<Achternaam>Gurts</Achternaam>
<Tussenvoegsel/>
<Geboortedatum>1975-11-12</Geboortedatum>
<Geslacht>O</Geslacht>
<Sofinummer>234109807</Sofinummer>
<Straatnaam>Stationstraat</Straatnaam>
<Huisnummer>10</Huisnummer>
<Woonplaats>Weesp</Woonplaats>
<Postcode>1383 AK</Postcode>
<Zrn>7654321</Zrn>
</Relatie>').CreateSchemaBasedXML(:schemaURL))
commit
declare
xmlschema xmltype;
res boolean;
begin
select xdburitype(:schemaPath).getXML()
into xmlSchema
from dual;
dbms_xdb.deleteResource(:schemaPath);
select insertChildXML
xmlschema,
'/xsd:schema//xsd:element[@name="Geslacht"]/xsd:simpleType/xsd:restriction',
'xsd:enumeration',
xmltype('<xsd:enumeration xmlns:xsd="http://www.w3.org/2001/XMLSchema" value="O"/>'),
'xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
into xmlSchema
from dual;
res := dbms_xdb.createResource(:schemaPath,xmlSchema);
end;
commit
set long 100000 pages 200 lines 140
select xdburitype(:schemaPath).getXML()
from dual
DROP TABLE RELATIE_DOCUMENTEN_TEMP
BEGIN
DBMS_XMLSCHEMA.copyEvolve
( schemaURLs => xdb$string_list_t(:schemaURL)
, newSchemas => XMLSequenceType(XDBURIType(:schemaPath).getXML())
, preserveOldDocs => TRUE
, mapTabName => 'RELATIE_DOCUMENTEN_TEMP'
, generateTables => FALSE
END;
CREATE TABLE relatie_documenten OF XMLTYPE
XMLSCHEMA "http://localhost:8080/xsd/relaties.xsd"
ELEMENT "Relatie"
CREATE OR REPLACE TRIGGER upo_rdt_ai
AFTER INSERT ON relatie_documenten
FOR EACH ROW
DECLARE
doc XMLType;
BEGIN
doc := :new.SYS_NC_ROWINFO$;
XMLType.schemaValidate(doc);
END;
declare
tablename varchar2(2000);
begin
select temp_tabname
into tablename
from RELATIE_DOCUMENTEN_TEMP
where table_name = USER || '.' || upper('relatie_documenten');
execute immediate 'insert into relatie_documenten select xmltype(data) from ' || tablename;
commit;
end;
select *
from relatie_documenten
INSERT
INTO relatie_documenten
VALUES (XMLType
('<Relatie>
<Voornaam>Johanna</Voornaam>
<Achternaam>Gurts</Achternaam>
<Tussenvoegsel/>
<Geboortedatum>1975-11-12</Geboortedatum>
<Geslacht>O</Geslacht>
<Sofinummer>234109807</Sofinummer>
<Straatnaam>Stationstraat</Straatnaam>
<Huisnummer>10</Huisnummer>
<Woonplaats>Weesp</Woonplaats>
<Postcode>1383 AK</Postcode>
<Zrn>7654321</Zrn>
</Relatie>').CreateSchemaBasedXML(:schemaURL))
commit
select *
from relatie_documenten
/ -
Create XML File from a specified XSD file
Hi,
I'd like to create an XML document with java. BUT How can we "bind" this creation with a XSD file. Hence, the creation may fail if the XSD binded file is not respected.
So I know how to create XML file but not bind to this creation my proper XSD file (XML schema). With which tool can I do this ?
Thanks.Hi,
I'd like to create an XML document with java. BUT How can we "bind" this creation with a XSD file. Hence, the creation may fail if the XSD binded file is not respected.
So I know how to create XML file but not bind to this creation my proper XSD file (XML schema). With which tool can I do this ?
Thanks. -
How to create a custom table in the below format
Dear Friends
can any one please let me know hot to create a custom table as below
outpatient
|employeeno | class | startdate | enddate | spouse |1stchild | 2nchild| Rate | amount|
My FO wants to enter in the SM30 as above ......i.e he wants to have spouse ,1st child and 2nd child under one group........so he asking me to make as one group
and give a heading as outpatient.........similary i have to give for in patient.
Please could any one tell is it possible.
regards
syamala...Under the SAP forums section, there is ABAP development and in That there is ABAP General.
SAP forums > ABAP development > ABAP General.
Post in that forum.
Regards
AK
Please reward if helpful -
How to Create a Temporary Table with SQL Server
I know you can create a temporary table in SQL Server 2000, but not quite sure how to do it in CFMX 7, i.e., does the SQL go inside a <CFQUERY dbtype="query"> tag?
I'm pulling the main set of records from an Oracle server (1st data source), but it does not contain employee names, only employee IDs. Since I need to show the employee name along with the Emp ID, I'm then pulling a list of "current" employee names from a SQL Server (2nd data source), which is the main database on our CF server.
I've got a QofQ that works fine, except it only matches EmpIDs that exist in both result sets. Employees who are no longer employed, don't match, and don't display. Since I can't do a LEFT OUTER JOIN with a QofQ, what I need to do is get the records from the Oracle server into the SQL Server. Preferably in a temporary table.
I was hoping if I could get those Oracle records written to a temp table on the main SQL Server, in same database as the Employee Name table, I could then write a normal <CFQUERY> that uses a LEFT OUTER JOIN.
I think I could probably write a Stored Procedure that would execute the SQL to create the temporary table, but am trying to avoid having to write the SP, and do it the simplest way.
This query will be a program that can be run hundreds of times per day, with a form that allows users to select date ranges, locations, and other options. That starts the queries, which creates the report. So I just need the temp table to exist only until all the SQL has run, and the <CFOUTPUT> has generated a report.
If the premise is right, I just need some help with the syntax for creating a SQL Server temp table, when you want to write records to it from an external data source. I'm trying the following, but getting an error:
<CFQUERY name="ITE_Temp" datasource="SkynetSQL">
CREATE TABLE #MyTemp
( INSERT INTO #MyTemp
ITE2.TrueFile char (7) NOT NULL,
ITE2.CountOfEmployee int NULL,
ITE2.DTL_SUBTOT decimal NULL,
ITE2.EMPTYPE char (3) NULL,
ITE2.ARPT_CD char (3) NULL
</CFQUERY>
So I actually created a permanent table on the SQL Server, and wrote the below SQL, which does work, and does write the records to table. I can then write another CFQUERY with a LEFT OUTER JOIN, and get all the records, including those that don't have matching employee name:
<CFQUERY datasource="SkynetSQL">
<CFLOOP index="i" from="1" to = "#ITE2.RecordCount#">
INSERT INTO ITE_Temp
(FullFile,
EmployeeCount,
DTL_Amount,
EmployeeType,
station)
VALUES ('#ITE2.TrueFile[i]#',
#ITE2.CountOfEmployee[i]#,
#ITE2.DTL_SUBTOT[i]#,
'#ITE2.EMPTYPE[i]#',
'#ITE2.ARPT_CD[i]#')
</CFLOOP>
</CFQUERY>
But, I hate to have to create a table and physically write to it. For one, it seems slower, and doing it in temp would be in memory, and probably much faster, correct? Is there some way to code the above, so that it does something similar, but in a TEMPORARY TABLE? If I can figure out how to do this, I can pull data from multiple data sources and servers, and using SQL Server temp tables, work with the data as if it was all on the same SQL Server, and do some cool reports.
Everything I've done for the past few years, has all been from data from a single source, whether SQL Server, or another server. Now I need to start writing reports where data can come from 3 or 4 different servers, and be able to do joins (inner and outer). Thanks for any advice/help. Much appreciated.
GaryWhile waiting to hear back, I was able to write the query results from an outside Oracle server, to a table on the local SQL Server, and do the LEFT OUTER JOIN required for the final query and report to work. That was with this syntax:
<CFQUERY name="AddTableRecords" datasource="MyTable">
TRUNCATE TABLE ITE_Temp
<CFOUTPUT query="ITE2">
INSERT INTO ITE_Temp
(FullFile,EmployeeCount,DTL_Amount,EmployeeType,station)
VALUES
('#TrueFile#', #CountOfEmployee#, #DTL_SUBTOT#, '#EMPTYPE#', '#ARPT_CD#')
</CFOUTPUT>
</CFQUERY>
However, I was not able to write to a temporary table AND read the results. I got the syntax to run to write the above results to a temporary table. But when I tried to read and output the results from the temp table, I got an error. Also, it wouldn't take the single "#" (local) only the global "##" table var, using this syntax. Note that if I didn't have the DROP TABLE in the beginning, the 2nd time you run this query, you get an error telling you the table already exists.
<CFQUERY name="ITE_Temp2" datasource="MyTable">
DROP TABLE ##MyTemp2
CREATE TABLE ##MyTemp2
FullFile char (7) NOT NULL,
EmployeeCount int NULL,
DTL_Amount decimal NULL,
EmployeeType char (3) NULL,
station char (3) NULL
<CFOUTPUT query="ITE2">
INSERT INTO ##MyTemp2 VALUES
'#ITE2.TrueFile#',
#ITE2.CountOfEmployee#,
#ITE2.DTL_SUBTOT#,
'#ITE2.EMPTYPE#',
'#ITE2.ARPT_CD#'
</CFOUTPUT>
</CFQUERY>
So even though the above works, I could use some help in reading/writing the output. I've tried several things similar to below, but they don't work. It't telling me ITE_Temp2 does not exist. It's not easy to find good examples of creating temporary tables in SQL Server.
<CFQUERY name="QueryTest2" datasource="SkynetSQL">
SELECT *
FROM ITE_Temp2
</CFQUERY>
<CFOUTPUT query="ITE_Temp2">
Output from Temp Table<br>
<p>FullFile: #FullFile#, EmployeeCount: #EmployeeCount#</p>
</CFOUTPUT>
Thanks for any help/advice.
Gary. -
HOW TO create a temp table or a record group at run time
i have a a tabular form and i dont want to allow the user entering duplicate
records while he is in insert mode and the inserted records are new and not exsisting in the database.
so i want to know how to create a temp table or a record group at run time to hold the inserted valuse and compare if they are exsiting in previous rows or no.
please help!As was stated above, there are better ways to do it. But if you still wish to create a temporary block to hold the inserted records, then you can do this:
Create a non-database block with items that have the same data types as the database table. When the user creates a new record, insert the record in the non-database block. Then, before the commit, compare the records in the non-database block with those in the database block, one at a time, item by item. If the record is not a duplicate, copy the record to the database block. Commit the records, and delete the records in the non-database block. -
How to create a booking table (make online reservation)
Hi everyone,
I'm just wondering if any of you know how to create a booking
table, like a booking seat for an airplane... I have to do the
booking table as I'm doing a Japanese Restaurant website for my
project.. At the moment, I'm using PHP, MySQL and HTML..
Could anyone help me, please?
Cheers,
NovaYou first need to check with your host to see which type of
server side
scripting language they support. If they support PHP, try,
http://www.jellyform.com/
Shane H
[email protected]
http://www.avenuedesigners.com
=============================================
Blog:
http://avenuedesigners.com/blog/
Web dev articles, photography, and more:
http://sourtea.com
=============================================
Proud GAWDS member
http://www.gawds.org/showmember.php?memberid=1495
Delivering accessible websites to all ...
=============================================
"mastacraft" <[email protected]> wrote in
message
news:f3pote$d16$[email protected]..
> Hello,
>
> I need to create a booking form for a website- So wen
they fill out form
> for
> bookings. Should have tab for club appearance. Magazine
ads. Etc It needs
> to
> lead to this email : [email protected]
>
> I'm really not sure how the best way is to do this, i
understand it's
> probably
> a really simple process.
>
> Regards,
> -
Creating XML files with the DME
Hi All,
I'm working on an integration project between my company and HSBC, they are requesting that we supply our AP payment files for foreign currency in XML format.
I have some limited experience with the DME and know it can create XML files, however, the elements available for XML files are different to standard flat files. Also it doesnt seem like I can create files with multiple levels? e.g.
<InitgPty>
......... <Id>
............... <OrgId>
...................... <BkPtyId>ABC00103003</BkPtyId>
.............. </OrgId>
........ </Id>
</InitgPty>
Does anyone have any documentation or experience with creating XML files with DME?
thanks
Phil.Hi,
Please ask any Implementation team in ABAB or Report painter team with your friends,
Thanks and REgards
N.Soma Sundaram -
pleae let me know how to create the fatc table by using pl/sql packages
Edited by: 792988 on Sep 6, 2010 3:34 AMPlease let us know something about your fact table.
There's no create_fact_table() procedure that could satisfy everybody. -
Create XML element without closing tag using Visual C++
I know how to create xml element with closing tag (using WriteStartElement and WriteEndElement methods)
<tag id="1234">
</tag>
but is there a way in Visual C++ to produce xml element like this
<tag id="1234"/>
i.e. without closing tag?Hi adamay,
Please refer to this thread.
http://stackoverflow.com/questions/8182245/create-xml-element-without-closing-tag-using-xslt
I think you could try the way of write your own class derived from XmlWriter.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Maybe you are looking for
-
T-code for getting consumptions / usage on special stock Q materials?
Hi, I am facing an issue: special stock Q is not included in all T-codes that I know for getting the consumptions / usage over a period. --> MC.9, MCBE etc.. are all not showing any results for those kind of materials. I found the explanation: it's d
-
Hi, I'm displaying a list in a grid using OOABAP Global classes. 1)Could anyone post how to handle the end-of-page events in this case. 2) Also in this case I've to code for Interactive Reporting, So also please say how to handle this parallelly for
-
A cd is stuck in the drive of my brand new IMAC 2.4 thingie. Impossible to retrieve it, despite all the "useful" tips in the Help section and the 'last resort' solution. Any suggestions?
-
Table for Reseved Stock in MMBE
Hi Expert In which table we will get the Reserved stock value in MMBE transaction Regards Manoj Kumar
-
Can't retrieve purchased music without a backup...
even though I have a reciept in my email showing that I made a purchase for a particular album. I have an order confirmation number. Can anyone verify wether or not this means that I have to purchase the album again or just enter my information and r