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

Similar Messages

  • 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 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

  • Problems with printing from SQL Developer Data Modeler 2.0

    Hi,
    I am not able to print my Relational Model (SubView) from Data Modeler 2.0 Build 584. Only an empty page comes out. If I don't reduce the Print Scale (usually to 10-30%) I get something but then it is lots of pages. I have tried A4 and A3 format. Printing to JPEG or PDF seems to be ok.
    I have relational data model with 25 tables in my SubView.
    Is there any restriction on Print Scale or number of objects in the diagram?
    Do I have to install SQL Developer as well? I have just Data Modeler insalled.
    Regards,
    Alex

    Hi Alex,
    There is newer version of Data Modeler (3.0 EA2) and it is free
    You can download it from here
    http://www.oracle.com/technetwork/developer-tools/datamodeler/ea2-downloads-185792.html
    Regards
    Edited by: Dimitar Slavov on Dec 9, 2010 2:15 AM

  • Can SQL Developer Data Modeler work with OBIEE?

    Can SQL Developer Data Modeler work with OBIEE? Can we export the data model from the Data Modeler and import it into OBIEE? Or export the OBIEE metadata to the Data Modeler for Data Model defining?

    no
    Philip

  • 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 with TFS?

    I'm looking for a way to hook up Oracle SQL Developer Data Modeler to Team Foundation Server for version/source control. We currently run TFS for all source control repositories and want to avoid installing subversion just for the Data Modeler product.
    Any suggestions would be great

    Unfortunately TFS isn't currently supported natively in the tool, although maybe someone else who has manually set it up for manage models will have some advice for you.

  • Is there a way to consolidate calculations used in SQL Query Data Sets?

    I am building SQL Query Data Sets against multiple DB Views which all have different date formats. I have the date parameter working well, but want to consolidate the changes that I have to do to it especially for the quarter. For example the SQL against a monthly view would use "where year_month > to_char(:ST_DATE, 'YYYY-MM')" which is not too hard, but to make that work for the quarterly view I need several concats and a decode to get a "> '2012-Q2'". I would like not to have to do this within every where clause. I had put this into a global element hoping to use that in a filter for the data set, but the filter does not have access to global elements only parameters.
    Is there any way to refer to a calculated global element from the data set to do this? I am using Layout Templates, so even if I wanted to I could not do the condition within the template.
         Thanks,
         Rick

    Change the following line to include the red coloured parts
    <div class="MasterColumn" spry:repeat="ds4" spry:setrow="ds4" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">
      <span>{Dsp_#}</span><span>{Dsp_WkDay}</span><span>{Dsp_Event}</span>
    </div>
    The add the following style rule to your document:
    .MasterColumn span {
        display: inline-block;
    I hope this helps.
    Ben

  • Oracle SQL Developer Data Modeler 3.0 Bugs, Resolution and workarounds

    The purpose of this thread is to list bugs discovered while using ORACLE SQL Developer Data Modeler 3.0
    Mainly with SQL SERVER 2005 and ORACLE 10g models.

    SQL Server Physical model doesn't save table identity column.
    here are the steps to get this bug:
    1. create a table in relational model with a column as an integer to be used as an identity.
    2. create or open a physical model for SQL-SERVER 2005
    3. open the table in the physical model
    4. edit the integer column property dialog
    5. tick the identity check box and close the property dialog
    6. save the model and close it
    7. open it again, you will find the identity check is removed! (probably not saved from the start)

  • SQL Developer Data Modeler scripting

    Hi,
    I'm looking for a new modeling software for my company. SQL Developer Data Modeler (SDDM) has many features that fit my requirements. But there are some things that I'm not sure can be done. I work mostly with Oracle databases but still need to support some legacy and non-sql databases. Please look at problems below and tell me if and how those things can be achieved. Any suggestions for alternative solutions are welcome too.
    1) I need to be able process Database Model from command line without human intervention and starting any GUI applications, for example generate DDL script form the model. Does SDDM have any interface for that?
    2) I want to be able to export Database Model into a file in a custom (legacy) format.
    3) SDDM stores database description in xml files. Is xml format defined anywhere? Are xsd schema files availabe?
    4) Is there a SDK available that would allow reading SDDM Database Model into a custom application for further processing?
    5) Is there any Java library available that parses Oracle-11-compatible SQL and PL/SQL?
    Thank you in advance
    Tomasz Grygo

    Hi Kevin,
    thanks for sharing your thoughts. There will be much more advanced find/search facilities in next version of Data Modeler and scripts also will be covered.
    Philip

  • SQL Developer Data Modeler - Relation to Foreign Key Generation

    SQL Developer Data Modeler 2.0.0 Build 584.
    I am having trouble with Relations to Foreign Keys when Forward Engineering a Relational Model from a Logical Model.
    First of all, the Naming Standard is not applied to the Foreign Keys when I perform the Engineer to Relational Model.
    So I right click on the Relational Model from the Browser and Apply Naming Standards to Keys and Constraints.
    I uncheck everything but Foreign Keys.
    Now, Foreign Keys are named according to my Naming Standards.
    However, this process also performs renames on the Column Foreign Keys even though I specifically unchecked that option.
    This appears to be a BUG in the software and I haven't found a way around it.
    I tried using {column} instead of {ref column} in the Naming Standard Template for Column Foreign Key, but that simply resulted in renaming my columns to "{column}".
    Please confirm and/or let me know of any work-around for this.
    Thanks,
    Dan

    Hi Philip,
    Thanks for the reply.
    Is this recorded as a bug to be addressed in the future?
    Should I submit this problem via Oracle Support?
    The other work-around I came up with is to override every Relation name in the Logical Model with the name I want to use in the Relational Model.
    When the Relational Model is Engineered, this becomes my Foreign Key name.
    Of course, this is not how I want to do things, so I am hoping for a bug fix someday.
    Regards,
    Dan

  • 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

  • How can I find out what is causing this error in SQL Developer Data Modeler

    Friends,
    I am trying to import entities into into SQL Developer Data Modeler from Oracle Designer 10.1.2.3.
    In case of need I perform these steps to perform the import:
    File --> Import --> Oracle Designer Model --> Select database connection --> Select work area --> select application system --> select one entity --> Click finish --> Import starts
    During the import process I see an alert dialog box with the message:
    There are errors in import - check Log file Clicking Ok dismisses the alert box and I see the following summary screen:
    Oracle SQL Developer Data Modeler Version: 2.0.0 Build: 584
    Oracle SQL Developer Data Modeler Import Log
    Date and Time: 2010-08-09 14:27:26
    Design Name: erdtest
    RDBMS: Oracle Database 10g
              All Statements:           32
              Imported Statements:      32
              Failed Statements:           0
              Not Recognized Statements:      0The Entity is then displayed in the Logical View within SQL Developer Data Modeler.
    Upon checking the log file I see the following entry:
    2010-08-09 13:50:34,025 [Thread-11] ERROR ODExtractionHandler - Error during import from Designer Repository
    java.lang.NullPointerException
         at oracle.dbtools.crest.imports.oracledesigner.logical.ODORelation.createArcs(Unknown Source)
         at oracle.dbtools.crest.imports.oracledesigner.logical.ODORelation.generate(Unknown Source)
         at oracle.dbtools.crest.imports.oracledesigner.ODExtractionHandler.generateDesign(Unknown Source)
         at oracle.dbtools.crest.imports.oracledesigner.ODExtractionController$Runner.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:619)Can anyone shed any light on this error?
    Thanks in advance for any help you may be able to provide.

    No this helps a lot. It's not strange. Firstly, in a versioned repository you should see Private Workareas and Shared workareas, so your workarea may be in either of these. It won't be in the Global Shared Workarea, as this only for non-versioned repositories. (I like to open the RON by selecting the full Repository, that way I can see the private and shared worlareas and the configuration and containers all in the same tree.
    Now your workarea is defined by a set of rules, so when you expand the workarea in the RON, and select the object, then that's the workarea and object you'll see in the import dialog in the Data Modeler. So if you check it out and check it back in, and can't see it in the RON, then the rule is not seeing this object. (Did you refresh the workarea in the RON?) If you can't see it in the RON, you can't see it in the Data Modeler. If you're working in a versioned repository, you need to work in the specific work area, i.e V27 and this is what you need to select in the Data Modeler.
    It looks like you are selecting the wrong workarea in the Data Modeler.
    Sue

  • 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

Maybe you are looking for

  • User from certificate with Cisco VPN client and ASA (and radius)

    Hello, we are trying to migrate a vpn client connection from GROUP to certificate. We want that client uses the user from the certificate and doesn't ask user, only password. Is it possible? Now, with user certificate, you can connect as another user

  • Restore Ipod 10G Touchweel with 7.0.2 Itunes and get an error-50 message

    I have a problem restoring my 10G iPod firts generation with the new 7.0.2 version of Itunes. I have a error message saying : problem with the iPod Software download . unknow error -50 Check your web settings and an active connexion or try again late

  • Receiver Mail Adapter Question

    Hi, I want to always send a constant message in the body of the email for confirmation, Do i always have to have a mapping? is there anyway i can do it without having to have a mapping program? As such can i use any existing modules for this? thanks,

  • How to call a WSDL Service

    Hoping to get some helpful hints and a working example atl file. We have been able to establish the connection between Business Objects Data Services and the WSDL service provider by defining the data store.  The functions available as part of the WS

  • FCE 3.5 Won't install on my iMac

    I just bought the full FCE 3.5 to install on my iMac and it stops after 45 min on the LiveType Media 1 disk. Tried it 2 times and am STUCK. I have enough disk space and updated my software as instructed prior to attempting to install. What's up - any