SQL Query Data Model Question

Hi All,
I'm new to XMLPublisher so i'll try to explain the best i can the problem i'm having creating a Data Model for my report.
I'm using Database XE and have installed XMLPublisher, as XE is extremely flexible in creating apps i'm having huge trouble finding a reporting solution for my applicaiton. I have created an app to track and control time and expense which i want to generate timesheet, expense sheets, invoice etc from.
Having done some read i think XML is the best approach for me however i'm having huge troubles with my data model.
EXAMPLE:
I have 2 tables to start with, first table holds client information and the second table holds project information. One client can have many projects.
When i create the Data Model using SQL i get the obvious problem that when a client has more then one project my XML structure is incorrect.
SELECT gc.name AS CLIENT,
gp.name AS PROJECT
FROM gte_client gc,
gte_project gp
WHERE gc.client_id = gp.client_id(+)
The above SQL creates the following XML
- <ROWSET>
- <ROW>
<NAME>Symatrix Ltd</NAME>
<NAME>Symatrix Pre-Sales</NAME>
</ROW>
- <ROW>
<NAME>Aston Carter</NAME>
<NAME>MOD</NAME>
</ROW>
- <ROW>
<NAME>Symatrix Ltd</NAME>
<NAME>Fujitsu</NAME>
</ROW>
</ROWSET>
Obvious problem here is the fact that client Symatrix appears twice as there are 2 projects.
I have tried to write SQL/XML and i think i'm beginning to understand the structure of the XML functions however XMLPublisher doesn't appear to understand the syntax when creating a SQL Query for the data model.
I hope all this makes sense.
Kind Regards
Glen

Hi All,
Ok, so with a little searching through documents and articles on the web i found this information.
http://blogs.oracle.com/xmlpublisher/2006/05/05#a38
this details the exact thing i'm trying to achieve so anyone else who searches this forum with a similar problem check this out.
Regards
Glen

Similar Messages

  • With clause in SQL query data model

    Hello!
    isn't it possible to use the with clause in sql query data models?
    for example following query:
    WITH
    a_test as (
    select dummy from dual
    select *
    from a_test
    brings up a "XML Parsing Error: no element found"-error...
    BR Paul

    I tried a slightly different query (see below) and the query worked fine and retrieved data.. I did not get any errors.
    WITH
    a_test as (
    select 'dummy' from dual
    select *
    from a_test
    This works as well.. retrieving the value of the parameter
    WITH
    a_test as (
    select :Test_ID from dual
    select *
    from a_test
    thanks,
    BIPuser

  • Different LOV behavior between SQL query data model and data template

    I have noticed different behavior when using parameters linked to list of values (LOV) of type menu with the multiple selection option enabled and a SQL query data model vs a data template. Here's the example because that first sentence was probably really confusing.
    SQL Query:
    select
    plmc.MonthCode, plmc.ModalityDim, plmc.ModalityName,plmc.RegionDim
    from
    DataOut.dbo.PatientLabMonthlyCross plmc
    where
    plmc.MonthCode = 200202
    and plmc.RegionDim = 1209
    and 1 =
    case
    when coalesce(:modalityDim,null) is null
    then 1
    else
    case
    when plmc.ModalityDim in (:modalityDim)
    then 1
    else 0
    end
    end
    Putting BI Publisher into debug mode, defining a data model of type SQL Query, defining a parameter called :modalityDim linked to a LOV that allows multiple selections, and selecting a couple of values from the LOV the output of the prepared statement is:
    [081607_122647956][][STATEMENT] Sql Query : select
    plmc.MonthCode,
    plmc.ModalityDim,
    plmc.ModalityName,
    plmc.RegionDim
    from
    DataOut.dbo.PatientLabMonthlyCross plmc
    where
    plmc.MonthCode = 200202
    and plmc.RegionDim = 1209
    and 1 =
    case
    when coalesce(?,?,null) is null
    then 1
    else
    case
    when plmc.ModalityDim in (?,?)
    then 1
    else 0
    end
    end
    [081607_122647956][][STATEMENT] 1:6
    [081607_122647956][][STATEMENT] 2:7
    [081607_122647956][][STATEMENT] 3:6
    [081607_122647956][][STATEMENT] 4:7
    [081607_122654713][][EVENT] Data Generation Completed...
    [081607_122654713][][EVENT] Total Data Generation Time 7.0 seconds
    Note how the bind variable :modalityDim was changed into two parameters in the prepared statement.
    When I use this same SQL Query in a data template the output is:
    [081607_012113018][][STATEMENT] Sql Query : select
    plmc.MonthCode,
    plmc.ModalityDim,
    plmc.ModalityName,
    plmc.RegionDim
    from
    DataOut.dbo.PatientLabMonthlyCross plmc
    where
    plmc.MonthCode = 200202
    and plmc.RegionDim = 1209
    and 1 =
    case
    when coalesce(?,null) is null
    then 1
    else
    case
    when plmc.ModalityDim in (?)
    then 1
    else 0
    end
    end
    [081607_012113018][][STATEMENT] 1:'6','7'
    [081607_012113018][][STATEMENT] 2:'6','7'
    [081607_012113574][][EXCEPTION] java.sql.SQLException: Syntax error converting the nvarchar value ''6','7'' to a column of data type int.
    Note the exception because it is trying to convert the multiple parameter values.
    Am I doing something completely wrong here? I really need to use a data template because I will need to link a couple of queries together from different database vendors.
    -mark

    This is for 10.1.3.4 - because in 11g every SQL query is automatially part of a data model.
    In 10g SQL query is for simple unrelated SQL queries.
    If you need to use advance features such as:
    a) multiple SQL queries that are joined in master-detail relation ships
    b) before/after report triggers
    Then you will need to use the data template, which is an XML description
    of the queries, links, and PL/SQL calls.
    hope that helps,
    Klaus

  • SQL Concat function seem not to work properly in SQL query data model. BIP 11g

    I try to use this function to show entire name CONCAT(name, ' ', surname) and it doesnt show the surname. it looks like it only tooks 2 arguments. I use it with the option "Add element by expression" within a SQL Query - Data set.
    Lucia

    i don't believe you
    please post more info, may be screen or sql or some more useful statement
    CONCAT(name, ' ', surname) and it doesnt show the surname
    may be because for some case "surname" is empty  or may be you incorrect use concat function
    one way mentioned by BluShadow is " || " operator  - http://docs.oracle.com/cd/B28359_01/server.111/b28286/operators003.htm#SQLRF51156
    and another is concat function http://docs.oracle.com/cd/B28359_01/server.111/b28286/functions026.htm#SQLRF00619
    so for your case it can be like
    CONCAT(CONCAT(name, ' '), surname)

  • SQL Developer Data Modeling - import from Oracle Designer Model

    Hi,
    I do want to try to import model from a Designer repository.
    The first step is to create connection to the repository (9i version).
    I have created the one, however any attempt to test the connection or to go to the next step simply finishes with error "4", without any valueable message.
    Any idea or suggestion ?
    Thanx.

    A clarification of the Data Modeling feedback application and this forum. The developers are part of the SQL Developer development team, but as for all our features, each developer has a focus area, so the Data Modeling developers will tend to answer those questions. There will not be a separate Data Modeling forum, so once we're production all SQL Developer Data Modeling questions will be on this forum. We want to encourage all users to get into the habit of tagging posts. Having the posts tagged means that users can skip them if they're not their focus area and users can search using the tags. The more tags are used in all the forums the better. You may well find find the answers to your questions are outside this forum!
    As SQL Developer Data Modeling in in its first early adopter phase, we have provide a feedback application, where users can provide feedback, log bugs and ask questions. We did the same for SQL Developer before it's initial production release and found this to be very useful for the product.
    I'm happy for "How To" questions to be on this forum, as the answers benefit the broader community.
    Sue Harper

  • Questions related SQL Developer Data Modeling

    1) Is it possible to import ERwin 3.5.2 version(called as Platinum Erwin) erx file to SQl developer data
    modeling tool?
    2) When this tool going to be released as a standalone Product?
    3) One of our requirements is calculating Table and Database size from Data model tool(as a volumetric
    report). Is it possible in this tool?. Also i couldn't able to define storage properties(like Tablespace).

    I have also replied to you in the feedback application where you logged your query. I have added my response here for others who may be interested.
    1)We currently only support import from ERwin 4.x
    2) It is company policy not to disclose release dates. We plant to release in 2009.
    3) You can define Tablespace using the Physical model. Expand the Relational node and then the physical model. The two nodes you can use for your tablespaces are the Tablespaces and Segment Templates nodes.
    Regards
    Sue Harper

  • SQL Developer Data Modeler: Logical model, unable to create arc

    I have a logical model in SQL Developer Data Modeler. Entity A has two 'incoming' foreign key relations to entities B and C. Both releations have the same optionality and cardinality. I want to place both relations in an arc. I see the buttons in my toolbar menu, but they are not enabled. Even when I select both relations it is not.
    Bringing the logical model to the relational model creates foreign keys. These foreign keys can be selected and when I do that the 'Create new arc' button in the relational model toolbar is enabled.
    What am I missing in the logical model ...? The documentation doesn't give a clue.
    Erik

    Thanks Sue, that worked. It is different from the way the ERD in Designer worked. Is there any reasoning behind it. As far as I know you should only put into an arc two or more relationships pointing to the same entity with the same optionality and the same cardinality. Selecting the entity with the relationships can only help in identifying at which relationship end the arc should be created but that is obvious.
    And asking the question is answering it: it will help in adding an arc to two or more entities originating and ending at the same entity (and same cardinality and optionality).
    Is that the reasoning behind it?
    Regards
    Erik

  • Domains usage in SQL Developer data MODELER

    Hi,
    I'm trying to understand how to use Domains in Oracle SQL Developer Data Modeler. We use version 3.1.3 .  before I used Toad Modeler  where domains are just part of your main design.
    Oracle data modeler has some different concept.
    let's assume I'm working on 2 designs:  DesignA and DesignB that include relational models.
    DesignA and Design B should use domains but list of domains in design A is very different than in design B.
    Default domain file is located on c: drive where SqlModeler is installed. It is obviously unacceptable , so I need to change Default System Type directory in preferences.
    And of course I want to have different domain directories for DESIGN A and DESIGN B.
    So when I open design A then I changed   Default System Type directory  let's say to x:\AAA.   Then i close design A and open Design B and change Default System Type directory to x:\BBB
    I checked folders AAA and BBB and they  have necessary XML files there:  defaultdomains.xml, defaultRFDBSSites and so on....
    Now questions:
    can I rename defaultdomains.xls to something else like AAAdomains.xls?  Domain administration can edit any domain file with any name , but how  can I associate certain domain file with my design?  My wish , when I open my design , then corresponding domain file will be open automatically.  Is it possible?
    If I open 2 designs in Sql Modeler and switch between designs  then corresponding domain files should be changed automatically as well.  Currently   I shouldn't forget to change default System Type directory every time when I switch models.  Is it the only way to handle it?
    Thanks
    vitaliy

    Hi Vitaliy,
    We use version 3.1.3
    I recommend always to use the latest version. If you don't want to use beta (DM 4.0 EA is out) you can use DM 3.3.
    Otherwise Oracle SQL Developer Data Modeler supports two types of domains:
    1) DM installation domains - those in file defaultdomains.xml
    2) Design level domains - they are stored in design directories and are visible to particular design only. They can be created in following ways:
    2.1 Manually - there is a property "Domains file" and you id it's not set "defaultdomains" domain will become design level domain and will be stored in file with provided name (without .xml extension)
    You can change later the file for design level domains, however you cannot change file for domain already in defaultdomains.xml.
    2.2 Using types to domains wizard you can generate design level domains
    2.3 Design level domains are created during import of  DDL files (controlled in preferences)
    2.4 You can import domains from specific file with domains using "File>Import>Domains" - you need to rename the source file if it's named defaultdomains.xml otherwise you'll get domains as installation domains
    If the list with domains is too long you can define  a list with preferred domains (or/and logical types) in "Preferences>Data Modeler>Model" and you can use shorter list in Table/Entity dialog if check "Preferred" check box next to "Type:" combo box.
    If I open 2 designs in Sql Modeler and switch between designs  then corresponding domain files should be changed automatically as well
    If you open 2 designs in one instance of DM they will use the same file with default domains i.e. you'll lose domains in one of design depending of setting for "system data type directory". You need to go with design level domains.
    Philip

  • "SQL Developer" vs. "SQL Developer Data Modeler"

    Hi Everybody!
    I'm using SQL Developer and I miss functionalities like re-engeneering of ER Models. As far as I know this is what the "SQL Developer Data Modeler" does. So my question is: Is the "SQL Developer Data Modeler" a complete replacement for "SQL Developer" or do I need both?
    thank you in advance

    Whoooops, sorry, I replied in the wrong thread -.-
    My reply was meant to be in the thread about Designer EA2 and the non-versioned repository import (Import repository from Designer concerning non-versioned applications (EA2)

  • SQL Developer Data Modeler notation

    Hi,
    I want to create a diagram for a database. While Data Modeler is very useful for generating DDL, I don't like that the only notation type you can choose from are Crows Notations and BachMan. I would like to use the Min-Max ISO notation but I don't know, is there a plugin to allow this?
    Thanks!

    Wrong forum, please try to ask your question at the SQL Developer Data Modeler forum: SQL Developer Data Modeler

  • SQL Developer Data Modeler - integration with subversion

    I just discovered the release of SQL Developer Data modeler, and found this to be very interesting.
    We are still using Oracle Designer for database design, but we are looking for a replacement (for several reasons).
    My question is quite simple:
    Given that the modeler uses a filebased repository, and also given that we have several developers potentially working on a data-model at the same time, how does Data Modeler integrate with subversion for source control etc.?
    Can the repository itself be under source control, and checked in/out directly from Data Modeler?
    Or will only the output files be candidates for version/source control?
    Let me admit right away that I have not read much of the data modeler docs, and I have also not downloaded/installed it (yet), but does anyone have pointers to docs on this , or general input/knowledge around it.
    On a side note, I must say that it puzzles me that a company like Oracle, that delivers one of the best databases doesn't use its database engine to host the repository, but instead chooses to go for files (I assume xml) "scattered all over the place"....
    Well, I guess they a have a reason for it..
    Anyway:
    Sql Developer Data Modeler and Subversion anyone?
    Jens

    Hi Jens,
    It's early days and the initial implementation is indeed file based. Though I'd say not xml files "all over the place", but in ordered folders. Yes, as a database company it does make sense that we'd have a repository for managing and versioning metadata. However the tool supports Oracle and other databases and many companies use open source version control tools, such as Subversion and so anyone using the Data Modeler today can use it with Subversion regardless of the database they are designing for.
    We do plan to have a repository, but in the 6+ months of the early adopter program found that many of the early adopters were happy to place the files under source code control using Subversion and in so doing also managed the multi-user development.
    Integrated Subversion support is planned for a future release.
    Sue

  • Sql Developer Data Modeler all domains lost after changing to version 3.0

    I have two questions:
    1. Sql Developer Data Modeler - is it still a separate product? Or is it only available as integrated within Sql Developer?
    2. After opening a model created with Data Modeler 2.0 with the new integrated Data Modeler 3.0 I lost all my domain definitions. What can I do to avoid this? Any help would be appreciated.
    Thanks in advance
    Holger

    Hi Holger,
    Sql Developer Data Modeler - is it still a separate product? Or is it only available as integrated within Sql Developer?Standalone version is here http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html
    2. After opening a model created with Data Modeler 2.0 with the new integrated Data Modeler 3.0 I lost all my domain definitions. What can I do to avoid this? Any help would be appreciated.Copy file defaultdomains.xml from DM 2.0 installation to "sqldeveloper\sqldeveloper\extensions\oracle.datamodeler\types" directory (if you use version in SQL Developer) or to
    "datamodeler\datamodeler\types" if you use standalone DM 3.0.
    Location of this directory can be set in preferences - it's called system types directory there - it contains: default domains, RDBMS sites, logical types and custom scripts.
    Philip

  • SQL Developer Data Modeler API

    Hi,
    My team is responsible for taking requests from a development team, creating a database change script, and updating the data model. We are trying to transition away from Designer but have been using some of the API integration to automate tasks through a custom database change request tool. This allowed the developers to fill out some fields for a the new table they wanted and my team would push a button to have all the updates sent to the data model in Designer.
    My question is, does SQL Developer Data Modeler have anything like this? If so, is there some documentation?
    Thanks
    Justin

    Very limited documentation is available in
    C:\Program Files (x86)\datamodeler\datamodeler\xmlmetadata\doc\index.html

  • SQL Developer Data Modeler 2.0.0 - Licensing  Terms?

    Hi Sue & Co.
    I just downloaded SQL Developer Data Modeler 2.0.0. Very cool.
    Any news regarding the Licensing terms?
    Cheers,
    Patrick

    Hi Patrick,
    All licensing questions and details can be accessed through the [Oracle Electronic Delivery|http://edelivery.oracle.com/] site. You'd be looking for the "Oracle Database Tools Media Pack for Microsoft Windows (32-bit)". The price list is available on the Oracle [Price Lists | http://www.oracle.com/corporate/pricing/pricelists.html] site (see Technology).
    The product will be available on the Oracle Store later in July.
    Regards
    Sue

  • Connection to SQL Developer Data Modeler Fails

    All,
    I am using Oracle SQL Developer Data Modeler version 3.0.0.665 in an Oracle 10g database environment. When I try to import DDLs, I get the following error message:
    NoSuchMethodError:
    oracle.i18.ntext.converter.CharacterConverterOGS.getInstance(I)Loracle/i18n/text/converter/CharacterConverter;I use the same connection profile in Oracle SQL Developer version 1.5.0.53, and my connection works fine there, but the same credentials in SQL Developer Data Modeler fails with the above error message. Any thoughts what causes this connection problem?
    Thank you,
    Seyed

    Hi Philip,
    Thank you so much for the information. Your suggested solution resolved my problem. For some reason when I first installed the Data Modeler, it worked fine and I was able to save the result into PDF files. Then my connection went bad and I posted this question on this forum.
    Again thank you very much,
    Seyed

Maybe you are looking for

  • How can I watch a video clip in my iPad 3?

    I just got an attached video clip from my brother, sent to my hotmail. When I open the clip, it just shows an overcrossed play bottom! How can I watch a video clip in hotmail, using an iPad? Do I need to download an app or what? Please!?

  • Data allocation for internal table rows Dynamically

    Hi Friends I have requirement like below: I have one internal table with 400 amounts columns, I will get the value from another program that indicates to which column I have to add the values. I dont want to write the case statement because I need to

  • FF logs not generating

    Hi Gurus, We got a probleme here. FF logs are not coming to controller for few ids. For ID's its generating and approver can see the logs in inbox. Controller getting the notification but not able to see the logs. Action usage table is full , is this

  • Paypal Express Checkout Integration

    Hi All, I have paypal express checkout account. I want to integrate it with my apex application. So when a customer wants to pay, he can just click the paypal button on my app's page which takes him to the paypal payment screen. I would appreciate if

  • Workflow For after MIRO Tcode

    Dear Experts, I am beginner to workflow , i have one requirement after processing the miro t code i need to release the amount levle by level for example amount is paid by vendor is 50000 person A has to release  amount is 20000 means Person B has to