Generating DDL from SQL Workshop

I'm using the Database Cloud Service and am trying to see how I can generate DDL for my tables.
I looked into the online help, which led me to this:
http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35128/sql_utl.htm#AEUTL256
Says to click SQL Workshop -> Utilities -> Generate DDL, but there is no Generate DDL option.  Has the option moved or the name changed?
Thanks,
Rick

Hello Rick -
The easiest way to get DDL for the tables in your Database Cloud Service is to go to the Cloud Management UI for your Service and click on the Data  Export tab. Click on the Export Data button and just do not check the box for exporting data.  This will give you DDL for your Service.
Hope this helps.
- Rick Greenwald

Similar Messages

  • How to generate XML from SQL query

    possible ways to generate XML from SQL qury.
    i want to generate XML of following query. "Select * from emp,dep wher emp.deptno=dept.deptno"

    Hello.
    Can you try:
    SQL> set pages 0
    SQL> set linesize 150
    SQL> set long 9999999
    SQL> set head off
    SQL> select dbms_xmlgen.getxml('Select * from emp,dep wher emp.deptno=dept.deptno') from dual;
    It works fine for me.
    Octavio

  • Generating XML from SQL queries and saving to an xml file?

    Hi there,
    I was wondering if somebody could help with regards to the following:
    Generating XML from SQL queries and saving to a xml file?
    We want to have a procedure(PL/SQL) that accepts an order number as an input parameter(the procedure
    is accessed by our software on the client machine).
    Using this order number we do a couple of SQL queries.
    My first question: What would be our best option to convert the result of the
    queries to xml?
    Second Question: Once the XML has been generated, how do we save that XML to a file?
    (The XML file is going to be saved on the file system of the server that
    the database is running on.)
    Now our procedure will also have a output parameter which returns the filename to us. eg. Order1001.xml
    Our software on the client machine will then ftp this XML file(based on the output parameter[filename]) to
    the client hard drive.
    Any information would be greatly appreciated.
    Thanking you,
    Francois

    If you are using 9iR2 you do not need to do any of this..
    You can create an XML as an XMLType using the new SQL/XML operators. You can insert this XML into the XML DB repository using DBMS_XDB.createResource. You can then access the document from the resource. You can also return the XMLType containing the XML directly from the PL/SQL Procedure.

  • Generating XML from SQL queries and saving to a xml file?

    Hi there,
    I was wondering if somebody could help with regards to the following:
    Generating XML from SQL queries and saving to a xml file?
    We want to have a stored procedure(PL/SQL) that accepts an order number as an input parameter(the procedure
    is accessed by our software on the client machine).
    Using this order number we do a couple of SQL queries.
    My first question: What would be our best option to convert the result of the
    queries to xml?
    Second Question: Once the XML has been generated, how do we save that XML to a file?
    (The XML file is going to be saved on the file system of the server that
    the database is running on.)
    Now our procedure will also have a output parameter which returns the filename to us. eg. Order1001.xml
    Our software on the client machine will then ftp this XML file(based on the output parameter[filename]) to
    the client hard drive.
    Any information would be greatly appreciated.
    Thanking you,
    Francois

    Hi
    Here is an example of some code that i am using on Oracle 817.
    The create_file procedure is the one that creates the file.
    The orher procedures are utility procedures that can be used with any XML file.
    PROCEDURE create_file_with_root(po_xmldoc OUT xmldom.DOMDocument,
    pi_root_tag IN VARCHAR2,
                                            po_root_element OUT xmldom.domelement,
                                            po_root_node OUT xmldom.domnode,
                                            pi_doctype_url IN VARCHAR2) IS
    xmldoc xmldom.DOMDocument;
    root xmldom.domnode;
    root_node xmldom.domnode;
    root_element xmldom.domelement;
    record_node xmldom.domnode;
    newelenode xmldom.DOMNode;
    BEGIN
    xmldoc := xmldom.newDOMDocument;
    xmldom.setVersion(xmldoc, '1.0');
    xmldom.setDoctype(xmldoc, pi_root_tag, pi_doctype_url,'');
    -- Create the root --
    root := xmldom.makeNode(xmldoc);
    -- Create the root element in the file --
    create_element_and_append(xmldoc, pi_root_tag, root, root_element, root_node);
    po_xmldoc := xmldoc;
    po_root_node := root_node;
    po_root_element := root_element;
    END create_file_with_root;
    PROCEDURE create_element_and_append(pi_xmldoc IN OUT xmldom.DOMDocument,
    pi_element_name IN VARCHAR2,
                                            pi_parent_node IN xmldom.domnode,
                                            po_new_element OUT xmldom.domelement,
                                            po_new_node OUT xmldom.domnode) IS
    element xmldom.domelement;
    child_node xmldom.domnode;
    newelenode xmldom.DOMNode;
    BEGIN
    element := xmldom.createElement(pi_xmldoc, pi_element_name);
    child_node := xmldom.makeNode(element);
    -- Append the new node to the parent --
    newelenode := xmldom.appendchild(pi_parent_node, child_node);
    po_new_node := child_node;
    po_new_element := element;
    END create_element_and_append;
    FUNCTION create_text_element(pio_xmldoc IN OUT xmldom.DOMDocument, pi_element_name IN VARCHAR2,
    pi_element_data IN VARCHAR2, pi_parent_node IN xmldom.domnode) RETURN xmldom.domnode IS
    parent_node xmldom.domnode;                                   
    child_node xmldom.domnode;
    child_element xmldom.domelement;
    newelenode xmldom.DOMNode;
    textele xmldom.DOMText;
    compnode xmldom.DOMNode;
    BEGIN
    create_element_and_append(pio_xmldoc, pi_element_name, pi_parent_node, child_element, child_node);
    parent_node := child_node;
    -- Create a text node --
    textele := xmldom.createTextNode(pio_xmldoc, pi_element_data);
    child_node := xmldom.makeNode(textele);
    -- Link the text node to the new node --
    compnode := xmldom.appendChild(parent_node, child_node);
    RETURN newelenode;
    END create_text_element;
    PROCEDURE create_file IS
    xmldoc xmldom.DOMDocument;
    root_node xmldom.domnode;
    xml_doctype xmldom.DOMDocumentType;
    root_element xmldom.domelement;
    record_element xmldom.domelement;
    record_node xmldom.domnode;
    parent_node xmldom.domnode;
    child_node xmldom.domnode;
    newelenode xmldom.DOMNode;
    textele xmldom.DOMText;
    compnode xmldom.DOMNode;
    BEGIN
    xmldoc := xmldom.newDOMDocument;
    xmldom.setVersion(xmldoc, '1.0');
    create_file_with_root(xmldoc, 'root', root_element, root_node, 'test.dtd');
    xmldom.setAttribute(root_element, 'interface_type', 'EXCHANGE_RATES');
    -- Create the record element in the file --
    create_element_and_append(xmldoc, 'record', root_node, record_element, record_node);
    parent_node := create_text_element(xmldoc, 'title', 'Mr', record_node);
    parent_node := create_text_element(xmldoc, 'name', 'Joe', record_node);
    parent_node := create_text_element(xmldoc,'surname', 'Blogs', record_node);
    -- Create the record element in the file --
    create_element_and_append(xmldoc, 'record', root_node, record_element, record_node);
    parent_node := create_text_element(xmldoc, 'title', 'Mrs', record_node);
    parent_node := create_text_element(xmldoc, 'name', 'A', record_node);
    parent_node := create_text_element(xmldoc, 'surname', 'B', record_node);
    -- write the newly created dom document into the buffer assuming it is less than 32K
    xmldom.writeTofile(xmldoc, 'c:\laiki\willow_data\test.xml');
    EXCEPTION
    WHEN xmldom.INDEX_SIZE_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Index Size error');
    WHEN xmldom.DOMSTRING_SIZE_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'String Size error');
    WHEN xmldom.HIERARCHY_REQUEST_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Hierarchy request error');
    WHEN xmldom.WRONG_DOCUMENT_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Wrong doc error');
    WHEN xmldom.INVALID_CHARACTER_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Invalid Char error');
    WHEN xmldom.NO_DATA_ALLOWED_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Nod data allowed error');
    WHEN xmldom.NO_MODIFICATION_ALLOWED_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'No mod allowed error');
    WHEN xmldom.NOT_FOUND_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Not found error');
    WHEN xmldom.NOT_SUPPORTED_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Not supported error');
    WHEN xmldom.INUSE_ATTRIBUTE_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'In use attr error');
    WHEN OTHERS THEN
    dbms_output.put_line('exception occured' || SQLCODE || SUBSTR(SQLERRM, 1, 100));
    END create_file;

  • Generating DDL from ResultSetMetaData

    Hi, I'm new to this forum although you can occasionally spot me on some of the other forums at java.sun.com. So if this is not the correct place for my question, I would appreciate a pointer to a more appropriate location.. -- Thanks
    I was wondering if anyone knew of a utility to create a DDL from a ResultSetMetaData. I'm sure I could develop one with some time, but it's for a one-off project. There is a huge Stored Procedure that someone else is going to analyze for performance. But it's speed is slowing down my testing, and I would like to create a temporary table with the results from that SP, but I don't want to manually format the hundreds of columns involved. The information needed to create the table is clearly stored in the ResultSetMetaData associated with a call to the StoredProcedure, but I don't know any way to convert that into some sort of script.
    Any suggestions?
    This is on SQL Server, and I'm not particularly familiar with it, so if anyone knows a native trick for this DBMS, that would be appreciated too.
    Thanks,
    -- Scott

    Never mind. I got it. When I came back to this after lunch, I realized both that this would likely not be a one-off, and that it shouldn't be too hard for my limited needs. The code I used is below. This is specific to SQL Server, and only to a limited number of data types, but it would be easy to extend to other's simple needs. I'm sure there are robust versions easily available, but I didn't find them. In the following code, rs is a ResultSet:
            ResultSetMetaData rsmd = rs.getMetaData();
            int colCount = rsmd.getColumnCount();
            System.out.println("IF EXISTS (SELECT * FROM dbo.sysobjects WHERE" +
                    " id = object_id(N'[dbo].["
                + tableName + "]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)");
            System.out.println("DROP TABLE [dbo].[" + tableName + "]");
            System.out.println("GO");
            System.out.println();
            System.out.println("CREATE TABLE [dbo].[" + tableName + "] (");
            for(int i = 1; i <= colCount; i++) {
                String type = rsmd.getColumnTypeName(i);
                System.out.print("\t" + ((i > 1) ? "[" : ""));
                System.out.print(rsmd.getColumnName(i) + ((i > 1) ? "]  [" : "  "));
                System.out.print(type + ((i > 1) ? "] " : " "));
                if (type.equals("varchar") || type.equals("char")) {
                    System.out.print("(" + rsmd.getPrecision(i) + ") ");
                } else if (type.equals("decimal")) {
                    System.out.print("(" + rsmd.getPrecision(i) + ", " + rsmd.getScale(i) + ") ");
                } else if (!(type.equals("uniqueidentifier")
                            || type.equals("datetime") || type.equals("int"))) {
                    throw new IllegalArgumentException(
                            "stupid DDL generator can't handle type \"" + type + "\".");
                int nullableInt = rsmd.isNullable(i);
                if (nullableInt == ResultSetMetaData.columnNoNulls) {
                    System.out.print("NOT NULL");
                } else if (nullableInt == ResultSetMetaData.columnNullable) {
                    System.out.print("NULL");
                if (i < colCount) {
                    System.out.print(" ,");
                System.out.println();
            System.out.println(")");
            System.out.println("GO");
            System.out.println();
            while(rs.next()) {
                System.out.print("INSERT INTO " + tableName + " VALUES (");
                for(int i = 1; i <= colCount; i++) {
                    String type = rsmd.getColumnTypeName(i);
                    boolean quoted = (type.equals("char") || type.equals("varchar") ||
                             type.equals("uniqueidentifier") || type.equals("datetime"));
                    if (i > 1) System.out.print(",");
                    Object temp = rs.getObject(i);
                    String value = (temp == null) ? "NULL" : temp.toString();
                    if (quoted && temp != null) {
                        System.out.print("'");
                    System.out.print(value);
                    if (quoted && temp != null) {
                        System.out.print("'");
                System.out.println(");");
            }I know this is far from elegant, and too specific to my small problem, but anyone who needs something similar should be able to modify it rather easily.
    -- Scott

  • Java Stored Procedure via Function Give 0RA 600 from SQL Workshop and App

    Hi,
    Anyone experienced stored procedures or functions failing when called from APEX app or SQL Workshop ( ora 600 ) yet they work fine when called from SQLPlus?
    Sqlplus connected as my apex workspace schema owner:
    select net_services.test_db_connection_via_ldap(
    'APEXPRD1', 'test1', 'test1', null ) as result from dual;
    RESULT
    The database connection attempt was SUCCESSFUL
    From Apex Sql Worshop:
    select net_services.test_db_connection_via_ldap(
    'APEXPRD1', 'test1', 'test1', null ) as result from dual;
    ORA-00600: internal error code, arguments: [16371], [0x434B08150], [0], [], [], [], [], [], [], [], [], []
    NOTE: Same result when run in response to button push on page in application.
    Apex Version: 3.2.1.00.10
    Oracle Version: 11.1.0.7.0
    NOTE: I am using the embedded plsql gateway; was going to try NOT using it to see if it was shared server related (seemed to be from trc files)
    Any ideas?
    Since the code works from sqlplus, I know that it's good: Here some snippets
    -- ========================================================================================
    public class NetServices extends Object {
    public static String doTestDbConnectionViaLdap
    String piDbConnUrl,
    String piUserName,
    String piUserPassword
         String vResult = null;
    try
         Connection conn = null;
         OracleDataSource ods = new OracleDataSource();
         ods.setUser( piUserName );
         ods.setPassword( piUserPassword );
         ods.setURL( piDbConnUrl );
         conn = ods.getConnection();
         conn.close();
         vResult = "The database connection attempt was SUCCESSFUL";
    } catch ( SQLException e )
         int vErrCode = e.getErrorCode();
         String vErrMsg = e.toString();
              if ( vErrCode == 1017 ) {
              vResult = "The database connection attempt FAILED! Incorrect Username or Password";
         } else if ( vErrCode == 17433 ) { // Null Username or Password
              vResult = "The database connection attempt FAILED! You must provide both a Username and a Password";
         } else if ( vErrCode == 17002 ) {
              vResult = "The database connection attempt FAILED! Net Service Name was Not Found";
         } else if ( vErrCode == 17067 ) { // NULL Net Service Name
              vResult = "The database connection attempt FAILED! You must provide a Net Service Name";
         } else {
              vResult = "The database connection attempt FAILED! Error " + vErrCode;
    return vResult;
    } // method: doTestDbConnectionViaLdap
    -- ========================================================================================
    function do_test_db_connection_via_ldap
    pi_db_conn_url IN VARCHAR2,
    pi_user_name IN VARCHAR2,
    pi_user_password IN VARCHAR2
    return VARCHAR2
    is -- PRIVATE to the net_services package
    language java -- NOTE: See cr_java_class_NetServices.sql for actual java implementation
    name 'NetServices.doTestDbConnectionViaLdap
    ( java.lang.String, java.lang.String, java.lang.String ) return java.lang.String ';
    -- ========================================================================================
    function test_db_connection_via_ldap
    pi_net_service_name IN VARCHAR2,
    pi_user_name IN VARCHAR2,
    pi_user_password IN VARCHAR2,
    pi_search_base IN VARCHAR2
    return VARCHAR2
    is -- PUBLIC procedure
    v_url      VARCHAR2(256);
    begin
    g_err_source := 'NET_SERVICES.test_db_connection_via_ldap';
    g_err_action := 'build_jdbc_conn_url_using_oid';
    /*     NOTE: We don't want to assert the parameters because we don't want to raise
    an exception;
    -- Get the jdbc connection url that uses oid info
    v_url := build_jdbc_conn_url_using_oid( pi_net_service_name, pi_search_base );
    return( do_test_db_connection_via_ldap( v_url, pi_user_name, pi_user_password ) );
    end test_db_connection_via_ldap;
    -- ========================================================================================
    Thanks in advance for your consideration.
    Troy

    Troy:
    You could be right in your guess that the error is related to MTS. Search Metalink for '16371'. Why not switch your APEX app to use OHS and test whether the error persists. ?
    varad

  • Generating DDL from Server Model

    I would like to generate DDL that matches ERDs from the server model in Designer. However, when selecting an application folder, and expanding Relational Tables, I see a lot of tables I don't recognize - they aren't entities in the ERD. I don't know where they came from, and some of the ERD entities aren't showing up in the server model. I just want to generate DDL that creates only the tables shown in the ERD. Any way to do this?

    About your question for more complex constraints. That is not possible in Designer.
    If you are using Headstart, you can achieve this by using CDM RuleFrame. This is a way to record all types of (complex) constraints (business rules).
    see http://www.oracle.com/technology/products/headstart/index.html for more information.

  • Run procedure from SQL Workshop Command window?

    hi, this one is simple.
    how to run a created procedure from APEX SQL Workshop SQL Command window?
    simon

    Simon,
    begin [proc_name]; end;
    -Carsten

  • Why it's so inefficient to generate XML from SQL queries?

    I am learning to use Oracle9i XML DB to generate XML document using SQL queries. According to the document, there are multiple ways to do it (SQLX, DBMS_XMLGEN, SYS_XMLGEN, XSU). I am using SQLX to do it, but find it's so inefficient. Could someone point out what could be the problem?
    I generate XML from TPC-H database, using the query as shown below. The indexes and primary key/foreign keys are created and specified. The system is Pentium IV 2GHz, Linux 2.4.18 with 512MB memory and 1GB swap. With database size 5MB, it spends about 300 seconds (TKPROF result) to generate the XML document. But for 10MB TPCH database, I cannot get the xml document after a long time. I find that all almost physical memory are used up by it. Therefore I stop it.
    It seems that nested-loop join is used to evaluate the query, therefore it's very inefficient. I don't know whether there is a efficient way to do it.
    Wish to get your help. Thank you very much!
    Chengkai Li
    ===================================================================================================================
    SELECT XMLELEMENT (
    "region",
    XMLATTRIBUTES ( r_regionkey AS "regionkey", r_name AS "name", r_comment AS "comment"),
    (SELECT XMLAGG(
    XMLELEMENT (
    "nation",
    XMLATTRIBUTES ( n_nationkey AS "nationkey", n_name AS "name", n_regionkey AS "regionkey", n_comment AS "comment"),
    XMLConcat ((SELECT XMLAGG(XMLELEMENT (
    "supplier",
    XMLATTRIBUTES ( s_suppkey AS "suppkey", s_name AS "name", s_address AS "address", s_nationkey AS "nationkey", s_phone AS "phone", s_acctbal AS "acctbal", s_comment AS "comment"),
    (SELECT XMLAGG(XMLELEMENT (
    "part",
    XMLATTRIBUTES ( p_partkey AS "partkey", p_name AS "name", p_mfgr AS "mfgr", p_brand AS "brand", p_type AS "type", p_size AS "size", p_container AS "container", p_retailprice AS "retailprice", p_comment AS "comment", ps_availqty AS "ps_availqty", ps_supplycost AS "ps_supplycost", ps_comment AS "ps_comment")))
    FROM PART p, PARTSUPP ps
    WHERE ps.ps_partkey = p.p_partkey
    AND ps.ps_suppkey = s.s_suppkey
         FROM SUPPLIER s
    WHERE s.s_nationkey = n.n_nationkey
    (SELECT XMLAGG(XMLELEMENT(
    "customer",
    XMLATTRIBUTES ( c_custkey AS "custkey", c_name AS "name", c_address AS "address", c_nationkey AS "nationkey", c_phone AS "phone", c_acctbal AS "acctbal", c_mktsegment AS "mktsegment", c_comment AS "comment"),
    (SELECT XMLAGG(XMLELEMENT (
    "orders",
    XMLATTRIBUTES ( o_orderkey AS "orderkey", o_custkey AS "custkey", o_orderstatus AS "orderstatus", o_totalprice AS "totalprice", o_orderdate AS "orderdate", o_orderpriority AS "orderpriority", o_clerk AS "clerk", o_shippriority AS "shippriority", o_comment AS "ps_comment"),
    (SELECT XMLAGG(XMLELEMENT (
    "lineitem",
    XMLATTRIBUTES ( l_orderkey AS "orderkey", l_partkey AS "partkey", l_suppkey AS "suppkey", l_linenumber AS "linenumber", l_quantity AS "quantity", l_extendedprice AS "extendedprice", l_discount AS "discount", l_tax AS "tax", l_returnflag AS "returnflag", l_linestatus AS "linestatus", l_shipdate AS "shipdate", l_commitdate AS "commitdate", l_receiptdate AS "receiptdate", l_shipinstruct AS "shipinstruct", l_shipmode AS "shipmode", l_comment AS "comment")
    FROM LINEITEM l
    WHERE l.l_orderkey = o.o_orderkey
    FROM ORDERS o
    WHERE o.o_custkey = c.c_custkey
         FROM CUSTOMER c
    WHERE c.c_nationkey = n.n_nationkey
    FROM NATION n
    WHERE n.n_regionkey = r.r_regionkey
    FROM REGION r;

    Tim,
    Oracle Reports was the orginal way to do this in an Oracle Apps environment. However, the XML Publisher team built a tool called data templates to do this as well. You can read several articles on how to use data templates on the XMLP blog. Here's the first arcticle in a series: http://blogs.oracle.com/xmlpublisher/2006/11/08#a127.
    Bryan

  • Purge Sql history from sql workshop

    in APEX decelopment-->SQL Workshops--> sql commands
    you can execute sql commands.
    is there a way to purge the history?

    Hi,
    Instance admin can do that
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35129/adm_mg_service_set.htm#sthref329
    Regards,
    Jari

  • Generate XML from SQL

    Hi I wan to create XML from SQL using XMLElement and XMLAttribute as per below Format
    *<field name="AccountNumber">TEST01</field>*
    is it possible?
    Thanks in advance
    waiting for yours positive reply

    Parth Panjabi wrote:
    Thanks in AdvanceWhy don't you open Oracle docs and read it. If you want to beautify, XMLSerialize supports INDENT:
    SQL> SELECT XMLSerialize(document
      2           XMLElement("ROWS",
      3             XMLAgg(
      4               XMLElement("ROW",
      5                 XMLElement("field",
      6                   XMLAttributes('AccountNumber' AS "name")
      7                 , ename
      8                 )
      9               , XMLElement("field",
    10                   XMLAttributes('CBAccountNumber' AS "name")
    11                 , null
    12                 )
    13               )
    14             )
    15           )
    16         )
    17  FROM EMP
    18  WHERE deptno = 10
    19  /
    XMLSERIALIZE(DOCUMENTXMLELEMENT("ROWS",XMLAGG(XMLELEMENT("ROW",XMLELEMENT("FIELD
    <ROWS><ROW><field name="AccountNumber">CLARK</field><field name="CBAccountNumber
    "></field></ROW><ROW><field name="AccountNumber">KING</field><field name="CBAcco
    untNumber"></field></ROW><ROW><field name="AccountNumber">MILLER</field><field n
    ame="CBAccountNumber"></field></ROW></ROWS>
    SQL> SELECT XMLSerialize(document
      2           XMLElement("ROWS",
      3             XMLAgg(
      4               XMLElement("ROW",
      5                 XMLElement("field",
      6                   XMLAttributes('AccountNumber' AS "name")
      7                 , ename
      8                 )
      9               , XMLElement("field",
    10                   XMLAttributes('CBAccountNumber' AS "name")
    11                 , null
    12                 )
    13               )
    14             )
    15           )
    16          INDENT
    17         )
    18  FROM EMP
    19  WHERE deptno = 10
    20  /
    XMLSERIALIZE(DOCUMENTXMLELEMENT("ROWS",XMLAGG(XMLELEMENT("ROW",XMLELEMENT("FIELD
    <ROWS>
      <ROW>
        <field name="AccountNumber">CLARK</field>
        <field name="CBAccountNumber"/>
      </ROW>
      <ROW>
        <field name="AccountNumber">KING</field>
        <field name="CBAccountNumber"/>
      </ROW>
      <ROW>
        <field name="AccountNumber">MILLER</field>
    XMLSERIALIZE(DOCUMENTXMLELEMENT("ROWS",XMLAGG(XMLELEMENT("ROW",XMLELEMENT("FIELD
        <field name="CBAccountNumber"/>
      </ROW>
    </ROWS>
    SQL>
    {code}
    SY.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Possible to generate DDL from outside of JDeveloper?

    Hi:
    I was wondering if it is possible to have a build script somehow generate the DDL for a database from the model files that JDeveloper creates (in the same way one would run a SQL Plus script from the command line passing a .sql file for it). This is desirable because my project wants to keep a database schema under CM but not multiple files that have to be kept in sync (like the model files AND the DDL).
    Thanks.

    Got it! I was able to extend the "New Presentation" sample to allow users to save their newly-created presentations back to the BI catalog. Here's how:
    1) add a menu item for "Save"; add a listener for it
    m_mnuSave = new JMenuItem("Save...");
    m_mnuSave.setMnemonic('S');
    fileMenu.add(m_mnuSave, 4);
    m_mnuSave.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    mnuSave_ActionPerformed(e);
    2) in mnuNew_ActionPerformed, add code to save the presentation to a module-level variable
    Dataview dv = npw.getDataview();
    m_objPresentation = npw.getDataview(); // new code
    3) write the Save action handler
    void mnuSave_ActionPerformed(ActionEvent e) {
    String sName = "";
    int result = 0;
    if (m_objPresentation == null)
    JOptionPane.showMessageDialog(null, "No presentation to be saved");
    return;
    /* Create InitialPersistenceManager */
    InitialPersistenceManager pmRoot = (InitialPersistenceManager)getPersistenceManager();
    /* Create PersistenceObjectChooser */
    PersistenceObjectChooser dialog = new PersistenceObjectChooser(pmRoot);
    JFrame frame = new JFrame();
    result = dialog.showSaveDialog(frame);
    if (result == PersistenceObjectChooser.OK_OPTION)
    PersistenceManager pmCurrent = (PersistenceManager)dialog.getCurrentDirectory();
    sName = dialog.getSelectedObjectName();
    if (sName != null)
    try
    //if name is not bound, then rebind will bind it
    pmCurrent.rebind(sName, m_objPresentation);
    catch (Exception ex) {
    showExceptionDialog(this, ex);
    } // if sName != null
    }// if result == OK_OPTION  

  • Generate Report from SQL Query with Parameter

    I have a web application that needs to generate static PDF reports. What I want to do is:
    1. Use Acrobat to create a form
    2. Open the form programmatically on the webserver
    3. Pass it a parameter such as a "clientID"
    4. Automatically populate the rest of the form using a SQL stored procedure with the clientID as the parameter
    5. Save the form as a static, non-editable PDF and display it for the client to either view/save/print
    Example:
    Database would contain a table called Clients
    ID LastName Location Phone
    1 Doe New York 111-111-1111
    2 Smith California 222-222-2222
    Stored Procedure
    CREATE PROCEDURE GetClient
    @id int
    AS
    SELECT LastName, Location FROM Clients WHERE ID = @id
    GO
    Acrobat Form
    Last Name: [txtLastName]
    Location: [txtLocation]
    Website user requests report for clientID=1. Result is a PDF that looks like this:
    Last Name: Doe
    Location: New York
    I am very new to Acrobat, so please explain in detail how I can go about doing this. Thanks very much in advance.

    Good morning. Did you find a solution to your problem? I'm looking for something to do the same for a from created in Live Cycle 7.0. If you can share some information or examples, I would greatly appreciate it.
    Thanks
    Ernest

  • Generate JSPs from SQL query

    Hello all,
    I am currently creating a web application that will allow a user to create a homepage from a template that is displayed to them. If the user is logging into the system for the first time, the template to create their homepage is displayed to them. However, if the user is logging in and has already used the template to set their homepage options, they are then forwarded to their homepage.
    The users options for their homepage are stored in a database. The problem I am having is trying to generate the jsp page ( with HTML inside also ) using SQL statements that query the table that store the users options.
    Eg. an SQL query queries the DB to see wht options the user has selected. Can anyone help me / advise me how to use these queries to generate the homepage. Thanks in advance!

    Hi aniseed,
    Thanks for a prompt reply.
    So for example can you tell me if the following sample approach is ok.
    <html>
    <head>
    <body>
    <sql:query name="query">
    SELECT * FROM SettingsTable WHERE links == "yes"
    </sql:query>
    <%-- Then to use this query result to insert selected hyperlinks that the user wants in their homepage, I would do the following ....... ? --%>
    <% if (query.size() == 0)
    <table>
    <td>
    <tr>
    </tr>
    </td>
    </table>
    %>
    Thanks again

  • Generating DDL From Designer In a Set Order

    Hi,
    Designer Version is 10.1.2.0.2.
    Whenever I generate the schema/ddl creation scripts after making minor
    changes, I like to compare the new scripts against the last set just to
    make sure the changes are as I expect. The trouble is each time I
    regenerate, the order of the items is different each time, making
    comparisons difficult.
    I've tried looking for a setting in the preference sets but there isn't
    anything obvious . Anyone know how to tell it to set the order of the
    tables during generation?
    Regards
    Sandeep

    What has "Designer" got to do with SQL and PL/SQL? Please ask your question in the correct forum.

Maybe you are looking for

  • Data betwen PSA and Cube

    Hi experts, I can see data in all the fields in PSA, but I don't see data for some of the fields in the Cube. The DTP ran succesfully and double checked transformations are mapped correctly. I am struggling to understand why this is happening? Please

  • How to use dynamic column fields in formulas

    Hi, we changed from CR 8.5 to CR XI R2. Many of our reports use dynamic queries with different count of columns. These reports are designed for the maximum count of columns. This works fine with CR 8.5 but with CR XI R2 it seems to be that if one of

  • How Scroll Table control in BDC (TCode =  SR11)

    Hi Gurus, I'm trying to insert lines in a table control via batch. Unfortunately I must be able to insert more lines than the table control can show (4 lines at the same time). I am not able to get the good OkCode trough SHDB. I tried to add a line v

  • Traffic in SXMS_XI_AUDIT_DISPLAY doesn't match traffic in RWB Perf Mon

    I have got a traffic log in RWB: Time Interval: last month Agregation Interval: one month Other options initial. So the traffic is Size*Number. But that value doesn't match  result of SXMS_XI_AUDIT_DISPLAY  report in XI ABAP... What the cause of this

  • Hitting Q key no longer triggers Quick Mask Mode as expected

    Having made a selection with the Magnetic Lasso tool, I am currently unable to enter Quick Mask Mode through triggering Quick Mask Mode and instead the selection set disappears when I hit Q. Thanks!