Data modeler: Having Maintainable Query for View Creation

Hi,
I am using SQL Developer 4 and the data modeler. I typically create a view in SQL developer (from a SQL select statement). I then drag and drop the view to the data modeler in order to have it stored for the next time I regererate the database schema from the data modeler. This works and I can see the query for my view when I click Properties on the view in the data modeler. However, the query I see there is logically equivalent (and very similar) but it is hard to read for a programmer as carrier returns are added, the various elements of my where clause are not in the same order as I programmed them, comments (starting with '--') where not transfered with the drag and drop.
I feel I cannot only rely on the version of the view stored in the data modeler to keep my DDL code that creates the view. Maintenance of that code would be too difficult. I feel I will need to keep a separate SQL script (in a separate version control tool) containing the select statement of my view. I would then always need to make my modifications in this select statement, update my view in the database and then drag and drop the result back in the data modeler. This is cumbersome.
Do you have any solution for me? Thanks!

Hi Jeff would you be able to help me in creating a data model  cause im really stuck with this one .Basically if been asked to create a survey application in oracle apex that use to excel based . So the info i was given was in a form of  excel sheet which looks like this
USER'S                                                                                                                                                                    VENDORS                                                                                                                                  TOPICS
NAME
E-MAIL
TSSA
ORACLE
HP
IBM
MS
SAP
INTERGRAPH
CISCO
Relationship
Contracting
Performance
Architecture
Supplier Feedback
Comment
jjjjjnn Bixxxxxff
[email protected]
Yes
Yes
Yes
Yes
x
Added as requested by Sanet Mulder
itha CCCniah
[email protected]
Yes
Yes
Yes
x
x
Elliot dan
[email protected]
Yes
x
x
x
Ger que
[email protected]
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
x
x
x
isha Per
[email protected]
Yes
x
John Rato
[email protected]
Yes
x
x
So where it says yes thous are the vendors that people associated with them have to asses and where there's an X thous are the topics that the vendors have to be rated on . So if for example the first guy on the list  jjjjjnn Bixxxxxff will asses TSSA , ORACLE , HP , IBM , MS , SAP  on the topic of Architecture and if you look at the second user itha CCCniah he would rate TSSA , ORACLE , INTERGRAPH on the topics of Relationship and performance  . Any idea how i could data model this to get my table structures right .so that features like completion status could be displayed to the user through APEX which can only be done by a correct data-model i have tried normalization but  i did go anywhere becauce there are so many variations any idea on how you would go about data modeling this would be greatly appreciated thank you     If you would like a better copy of the table my email is    [email protected]    

Similar Messages

  • How to build sql query for view object at run time

    Hi,
    I have a LOV on my form that is created from a view object.
    View object is read-only and is created from a SQL query.
    SQL query consists of few input parameters and table joins.
    My scenario is such that if input parameters are passed, i have to join extra tables, otherwise, only one table can fetch the results I need.
    Can anyone please suggest, how I can solve this? I want to build the query for view object at run time based on the values passed to input parameters.
    Thanks
    Srikanth Addanki

    As I understand you want to change the query at run time.
    If this is what you want, you can use setQuery Method then use executeQuery.
    http://download.oracle.com/docs/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#setQuery_java_lang_String_

  • How to install SQL Developer Data Modeler 3.1.1 for Mac OS X?

    How do I install SQL Developer Data Modeler 3.1.1 for Mac OS X? I downloaded the file "datamodeler-3.1.1-703-macosx.gz" from OTN, but there is only a single file inside this archive - "datamodeler-3.1.1-703-macosx". What am I missing here?
    Thanks in advance...

    Extract that file and then run it.
    Once you installed the tool to your Applications folder (if you choose to move it to Applications), you'll need to install Java (maybe).
    What version of OS X are you on?
    In a command window/terminal, type 'java -version'
    If you get something back like 'java version "1.6..." then you're all good.
    If you're on Mountain Lion, then type 'java' instead. That should download java for you.
    Once you've got java available, then launch SQL Developer Data Modeler.
    The installation notes are here if you want the official list of instructions
    http://www.oracle.com/technetwork/developer-tools/datamodeler/downloads/mac-installnotes-1716514.html

  • Data model 0G: No authorization for entity type Account (Company Code) - activity Display

    Hello Expert,
    I have a problem with authorization in MDG-F.
    I want to create Account with Collective processing. After, entered Entity type, Edition and Chart of account,  Blocking message "Data model 0G: No authorization for entity type Account (Company Code) - activity Display" is displayed.
    But, i checked in PFCG transaction, for this user profil, activity are : create or generate, Change and display. So, for me , it is correct.
    Please, check screen shot below :
    Blocking message :
    and in PFCG transaction
    Could you help me to solve this point?
    Kind regards,
    Heri RAOELISON

    Hi Heri,
    the system behavior is correct. The account in company code consists of three entity types:
    1) COA - Chart of Accounts (Type 3)
    2) ACCOUNT - Account (A-Segment, related to ECC table SKA1, Type 1)
    3) ACCCCDET - Account in Company Code (B-Segment, releated to ECC table SKB1, Type 1).
    3) includes 1) and 2) whereas 2) includes 1). If you grant authorization only for 3) but not for 1) and 2), you cannot do anything.
    Best regards
    Michael

  • Publisher11g - no return data with a data model from logical query

    Hi, i am usign publisher11g with obiee bi server autenthication.
    On rpd i define a security model with a user variable, a initialization block and a where over one fact table.
    When i create a answer report, bi server automatically include on the wher something like this: where user = 'name'.
    Well, when i create a publisher report and try to view data from this fact table, return no data.
    If i create a data model only with a dimension table, not over automatic where from bi server, the report return data.
    View the log nqquery, i see that the generate query include where user ='', not include the value of a session variable.
    Any idea?
    Thanks.

    I do have one question, is the member Balancesheet already in the outline?
    Yes
    **Measure
    Balance Sheet
    Profit and Loss**
    Also in the load rule did you change the dimension load settings for the accounts dimension to be parent/child for the accounts dimension.
    Field Properties -> Dimension Build Properites
    Dimension=
    Field 1 Measure; Type = Parent
    Field 2 Measure; Type = Child
    Field 2 Measure; Type = Alais
    OK
    Quite often people don't realize they have to double click on the dimension name to make sure it gets put as the dimension that gets changed.
    I'm pretty sure your issue is it is trying to do the data load and not the dim build,but that could just be the first problem
    **Click on Dimension Build Field
    Click on Dimension Build setting
    Dimension = Measure; Build Method; = Parent/ Child**
    Please advise

  • Unable to see columns of Data Model in Template Builder for Word.

    Experts,
    My customer has defined Data Model,
    and when Ct is trying to insert fields into their documents,
    the columns in the Data Model can't been seen in Template Builder for Word.
    (in tool bar; Oracle BI Publisher > Insert > Field)
    The details is as follow;
    (Data Model)
    Name : TEST
    Type : SQL Query
    SQL Query : select case_id,case_name from TEST where case_id = :p_case_id and serious_flag = 'Y';
    'p_case_id' is taken from LOV.
    (sample data in TEST table)
    CASE_ID CASE_NAME SERIOUS_FLAG
    1 case1
    2 case2 N
    3 case3 Y
    In this case, CASE_ID and CASE_NAME can't be seen in Template Builder.
    But we can see the columns when the sample data is as follow;
    CASE_ID CASE_NAME SERIOUS_FLAG
    1 case1 Y <-(*)
    2 case2 N
    3 case3 Y
    I mean, the data of the first row (in this case, case_id=1) is hit by the SQL query,
    we can see the columns in Template Builder.
    I'd like to know whether it is an intended behavior.
    Regards.

    Hi,
    I reformed the sample data in TEST table.
    In this case,the columns in the Data Model can't been seen in Template Builder for Word.
    CASE_ID CASE_NAME SERIOUS_FLAG
    1     case1
    2     case2     N
    3     case3     Y
    But we can see the columns when the sample data is as follow;
    CASE_ID CASE_NAME SERIOUS_FLAG
    1     case1     Y     &lt;=(*)
    2     case2     N
    3     case3     Y
    In fact, when the data of the first row (in this case, case_id=1) is hit by the SQL query,
    we can see the columns in Template Builder.
    Any information would be appreciated.
    Thanks in advance.

  • Data Modeler: Editing or creating a view "crashes"

    Hi all,
    some days ago I've created a view in my relational model using the data modeler (SQL Developer 3.2.20.09). Today I wanted to add some more columns. Unfortunately the property pane doesn't open any more when double clicking the view object (for the tables it still works). No error message is shown. In the logical view a red triangle is shown in the top left corner of the view object.
    When I try to create a totally new view then the data modeler /sql developer crashes (doesn't respond anymore)...
    What could be the reason?
    If also tried with the new version of SQL Developer - there it doesn't work either...
    Thanks in advance
    Matthias

    Or this one:
    2014-01-22 16:49:32,665 [AWT-EventQueue-0] ERROR DefaultDiagramUI - DefaultDiagramUI.paint:
    java.lang.NullPointerException
      at oracle.dbtools.crest.swingui.diagram.graph.EdgeRenderer.getForeground(Unknown Source)
      at javax.swing.JComponent.setForeground(JComponent.java:2679)
      at oracle.dbtools.crest.swingui.diagram.graph.EdgeRenderer.installAttributes(Unknown Source)
      at oracle.dbtools.crest.swingui.diagram.graph.EdgeRenderer.setView(Unknown Source)
      at oracle.dbtools.crest.swingui.diagram.graph.EdgeRenderer.getRendererComponent(Unknown Source)
      at oracle.dbtools.crest.swingui.diagram.graph.AbstractCellView.getRendererComponent(Unknown Source)
      at oracle.dbtools.crest.swingui.diagram.ui.def.DefaultDiagramUI.paintCell(Unknown Source)
      at oracle.dbtools.crest.swingui.diagram.ui.def.DefaultDiagramUI.paint(Unknown Source)
      at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
      at javax.swing.JComponent.paintComponent(JComponent.java:760)
      at javax.swing.JComponent.paint(JComponent.java:1037)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at oracle.dbtools.crest.swingui.diagram.OverviewPanel.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paintToOffscreen(JComponent.java:5139)
      at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1491)
      at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1422)
      at javax.swing.RepaintManager.paint(RepaintManager.java:1225)
      at javax.swing.JComponent.paint(JComponent.java:1023)
      at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
      at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
      at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
      at java.awt.Container.paint(Container.java:1778)
      at java.awt.Window.paint(Window.java:3390)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:797)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
      at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:694)
      at javax.swing.RepaintManager.access$700(RepaintManager.java:41)
      at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1636)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:666)
      at java.awt.EventQueue.access$400(EventQueue.java:81)
      at java.awt.EventQueue$2.run(EventQueue.java:627)
      at java.awt.EventQueue$2.run(EventQueue.java:625)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:636)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

  • Data model binding with a "for in" loop

    I've got a data model representing form items. An example
    data model element and form item looks like this:
    <data_model>
    <item_1>{item1.text}</item_1>
    </data_model>
    <mx:DateField id="item1" text="{data_model.item1}"/>
    I get data back from a database as an associative array and
    convert it to an ArrayCollection like so:
    formData = new ArrayCollection(ArrayUtil.toArray(re.result));
    Now, if do this:
    data_model.item_1 = formData['item_1'];
    the text of form element item1 will be updated as I would
    expect via the binding between the two. If I iterate through the
    array as such:
    for (var key:String in formData) {
    data_model.key = formData[key];
    the model is updated but the form element text field is not.
    I'd love the convenience of iterating through the array as opposed
    to having to type out all the model elements by hand. Ideas?

    Figured it out. Instead of this:
    data_model.key = formData[key];
    do this:
    data_model[key] = formData[key];
    So silly

  • Occasional message "No data to fetch in query" when viewing a webi report

    I  am currently working on an exising business Object 3.1 install in which the only user able to access the data in a universe is the Administrator. Permission on all universes and related connection grant data access and view objects permission to all users. Even members of the administrators group are unable to acess data in the webi reports.
    If  another member of the administrator imports the Universe with Designer and trie to view a list of values they get the message `No sdata to Fetch` but can see table values. Consequently the only user to be able to use the reports is the administrator.  I am wondeing if the universe were saved without the `save for all users` box ticked before exporting.
    I am now out of ideas and waiting to hear from someone with a few,
    Thanks for all help in advance.

    Hi PG, No allusers regardless of which group they belong to receive the same message "No data to fetch on query". We were led to believing that the problem is on te Universe level because all users except adminisrtator also get the message when trying to display a list of values, but they can see the data if they click on the "Show table Values". I should also mention that when users try to refresh a webi report they can see  and refresh lists of value from the prompt but still get that error message.
    Because of the contradictory nature of these symptoms, everyone here is totally confused and we are starting to suspect that it may be some kind of security setup at the database level.

  • How to maintain Entries for VIEWS in ORacle Sql developer

    hi gurus,
    Could you please help in maintaining an entries for VIEW is Oracle SQL develope...I have created a VIEW by name SD_WH08....now i need to maintain some entries in this for my testing purpose...how do i do this?
    Your help is very much appreciated.
    Regards

    What do you mean by "maintaining an entries for VIEW" ?
    K.

  • Executing the saved query for views -Need Help

    How can i run get the query for the saved search in views and execute it to view the results ?Can some one help on this pl
    Thanks!

    Hi,
    I am not able to get your requirement. Share in little details.
    As of my understanding, you want to get the query which is being executed.
    Regards,
    Gyan

  • 11g bi publisher data model generic columns names for obiee data source?

    I'm just trying to figure out if this is a bug, expected behavior or installation problem. When I select an Oracle BI Analysis to add to the data model diagram the column names are not copied over. Instead they are all renamed as Column0-ColumnNN.
    Thanks
    Edited by: user13087422 on Apr 7, 2011 9:49 AM

    I'm facing this same issue. Can you solve that? What's the problem with it?
    Regards,
    Ariel

  • SCCM 2007 SQL Query for Advertisement Creation Date

    I have been asked if I can create a Query to list all advertisements that have been created in a 60 day period and the User that created them.
    I have tried a couple of SQL codes but I cant quite get the syntax to work.
    Here is what I have so far, but I still don't know if any of it is usable:
    v_Advertisement.AdvertisementName AS ‘Advertisement Name’,
    v_Advertisement.AdvertisementID AS ‘Advertisement ID’
    FROM v_Advertisement
    INNER JOIN v_Package ON v_Advertisement.PackageID = v_Package.PackageID
    INNER JOIN v_Collection ON v_Advertisement.CollectionID = v_Collection.CollectionID
    INNER JOIN v_ClientAdvertisementStatus ON v_Advertisement.AdvertisementID = v_ClientAdvertisementStatus.AdvertisementID
    AND v_Advertisement.AdvertisementID in(SELECT advertisementid FROM V_advertisement WHERE DATEDIFF(D, V_advertisement.presenttime,GETDATE())<=365)
    ORDER BY v_Advertisement.AdvertisementName
    Any help with this would be greatly appreciated.
    Regards
    AntonSK

    I saw you're missing select statement.
    Also, you need to know which table & column for these:
    - Advertisement Creation date?
    - User that created the Advertisement
    a sample of working query as below, but it's still missing the 2 items above
    select
    Adv.AdvertisementName as 'Advertisement Name',
    Adv.AdvertisementID as 'Advertisement ID'
    from
    v_Advertisement as Adv
    inner join v_Package as Pkg on Adv.PackageID = Pkg.PackageID
    inner join v_Collection as Col on Adv.CollectionID = Col.CollectionID
    inner join v_ClientAdvertisementStatus as AdsStatus on Adv.AdvertisementID = AdsStatus.AdvertisementID
    and Adv.AdvertisementID in(select Adv.AdvertisementID from v_Advertisement where datediff(d, Adv.PresentTime, getdate())<=365)
    order by 'Advertisement Name'
    ---Pat

  • Do you allow query or view creation in QA and PRD?

    Do you allow queries, views and workbooks to be created in QA or PRD?  If so, do you transport those BEx Objects into the other systems (e.g. PRD->QA and PRD->DEV or QA->PRD and QA->DEV)?
    Often I find I will be creating a query or a view in QA or PRD because those systems happen to have the data I am required to analyze.  DEV does not always have the data available.  But how do I move this BEx object to the other systems?
    This happens most often to views of a query, but also applies to queries, workbooks etc.  Like changing a workbook already transported to production.
    Thanks for your input.

    Hi Peter,
    In our system we (developers) are allowed to create / modify queries in the QA and Prd system. We do not actually 'develop' here, but we have this access for the reason you mention (data availability). The main query development is carried on in the Dev system and transported up, but the change access lets us to quickly solve issues many times. If we do put in a change in teh query, we replicate the change made in the dev system and transport it...no reverse transports are set up in the system.
    Hope this helps...

  • Grouping items from query for xml creation

    Hello,
    I am working on a new photo gallery that uses categories.
    Each category is stored in a category xml element. then the images
    are stored in the category element. I am having trouble figuring
    out how to create this on the fly. With only one category it works
    fine but I am having diffuculty seperating it into groups. The db
    schema is like this imagePath, imageTitle, imageDesc, category. I
    will post the code i am currently using to create the xml now and
    show where i need the categories to loop. Thanks in advance. I am
    posting a second approach with the code where the query is put in a
    array and then I statacially add in what to look for in the array.
    This approach would be fine if i could make it dynamic and grab the
    Exteriors and Interiors from the catList variable. Thanks again for
    any insight on solving this problem.
    Justin
    Justin

    ...i would use a XMLListCollection filterFunction for that...
    that generates a special view of your collection
    r.F.

Maybe you are looking for