Creating a DB view

Again, apologies if this is the wrong forum for this question but I am trying to create a DB view using JDeveloper. As a complete novice with both JDeveloper and databases, even a pointer to some helpful documentation would be useful.
The problem I have is that I am trying to create a DB view from a couple of tables. For the sake of this discussion, call one table products and the other suppliers. I want to create a view that includes, for each product, the product name and the total number items available from all suppliers. In the suppliers table, there are details of the supplier, the products they provide and the number of each product available. The only item of interest from the products table is its 'name'. The suppliers table contains, 'supplier', 'product' and 'quantity'. The view I want is products.name, sum(suppliers.quantity) where products.name = suppliers.product. I'm pretty sure this has to be relatively easy but all my attempts have failed so far. I can generate SQL that passes syntax checking but fails to generate the view.
I cannot find any tutorial type documentation for SQL other than very simple queries nor am I sure whether it is a limitation of the Oracle XE database that I am using. Would be grateful if anybody could point me in the right direction.
Many thanks,
George

You mean this?
select products.name, sum(suppliers.quantity)
  from products, suppliers
  where products.name = suppliers.product
  group by products.name-Arun

Similar Messages

  • Create a new view in a enhance component

    Hi All,
              I want to create a new view for sales order and quatation in a component BP_factsheet.When i craete new view ,it is asking about some value like model node, bol entity, higher level, bol realtion.after that is is asking context node ,bsp application ,custome controller and view type.How can i get these value .when i create a new view then have to add these view in run time repositry under a window or not?
    Thanks in advance....
    Vishwas

    Hello Vishwas,
    You might be interested in knowing how to customise the new UI to add a new view using the enhancement concept.
    Please refer to the published document on the service marketplace:
    http://help.sap.com/saphelp_crm60/helpdata/en/1a/023d63b8387c4a8dfea6592f3a23a7/frameset.htm
    refers to the link at
    service.sap.com/okp
    Inside this go to:
    SAP CRM 2006s: Learning Map for Technology Consultants
    wherein you can find the cookbook to perform similar operation in detail.
    SAP CRM UI Cookbook
    I hope this helps.

  • Creating a Role view in a workflow

    I'm trying to create a role view in my workflow with the following code but it gives me an error: com.waveset.util.InternalError: Unable to locate ViewHandler for 'role'.
    <Action application='com.waveset.session.WorkflowServices'>
                <Argument name='op' value='createView'/>
                <Argument name='type' value='Role'/>
                <Return from='view' to='view'/>
              </Action>Has anyone created a role from a workflow, java or SPML?

    nvm figured it out.
    <Action id='0' application='com.waveset.session.WorkflowServices'>
              <Argument name='op' value='createView'/>
              <Argument name='type' value='Role'/>
              <Argument name='viewId' value='Role'/>
              <Argument name='Form' value='Empty Form'/>
              <Argument name='authorized' value='true'/>
              <Return from='view' to='role'/>
            </Action>       

  • Creating a new view in a component

    HI,
    I am trying to create a new view in a BSP component using the wizard. But the context nodes are not getting created. Its throwing up an error - "View not copied with wizard; processing not possible".
    What could be the problem ? Pls help.
    Regards,
    Aravind.

    Hi Arvind,
    Before posting error, please search for it.
    Here is what i found here in 2007 forum itself.
    I guess you have not enhanced your component and your view.
    Without enhancing the component it is not possible to add a new context node.
    Here is a very helpful, follow it and the the other link within this thread,
    both are very useful in this regard.
    Web Client Context Node Enhancement
    Thanks & Regards
    Shiven

  • Creating a Maintenance View Table on SE11

    Hi, Experts.  I want to create a Maintenance View Table on SE11 (View option on SE11 and then selecting Maintenance view from the View Type List).  Is there anyone who have a document that will be able to help me create this table or pointers that will help me.
    Thanks for your help.
    Regards

    hi,
    steps are
    Goto SE 11.
    Choose the radio button of Views, give the view name and create.
    Enter the short description and table names for which u want to create view.
    Select the 2nd table-name field and click on relationship button.
    Then goto view fields tab.
    Select the table name and the fields u want to display.
    Save and activate.
    please see this
    steps  to create a view

  • How to create a Maintenance view in order to update 4 tables

    Hello,
    I want to update 4 tables having the same key. MANDANT + SIRET (fiscal french ID).
    I try to create a maintenace view, i need to update the 4 tables using a single screen.
    When i use the relationship the system display a message "Relationships with unsuitable cardinality"
    The first table contain only the ID, the 3 others contains some informations (adress, name, and others)
    Thanks for your help
    Christophe

    Hello,
    you could check, if your other three tables have a correct foreign key definition on the field  SIRET.
    Tranaction SE11 -> pstion on the field and press the foreign key button.
    Check Table has to be your first table; cardinality has to be 1 :1 or 1 to N.
    Regards Wolfgang

  • How to create a calender view in webdynpro java EP 7.0

    Hi ,
    I want to create a calender view in webdynpro,
    Requirments are
    1. it should be current month view
    2. Below each day i want to show office in-time and out-time in two cloumns(these values will be coming tru RFCs).
    ie
    1
    10am | 4pm
    Is this possible in webdynpro java EP 7.0 ?
    Please help me
    Thanks
    Kumar

    Hi Kumar,
    If you are using EP7.0, there is no calendar UI element in webdynpro development. There is only date navigator UI element. This is demonstrated in the below article.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c059344a-1930-2d10-6e8a-dcec5f94993e?quicklink=index&overridelayout=true
    Regards,
    Ganesh N

  • How to create a query view in sap bw?

    can any one please tell me how to create a query view in sap bw 3.5?

    Hi,
    you can do this by using Bex analyzer and WAD ..
    gop through this link ..
    http://help.sap.com/saphelp_nw70/helpdata/en/0e/1339427f82b26be10000000a155106/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/0d/af12403dbedd5fe10000000a155106/frameset.htm
    hope this helps you ..
    Reagrds,
    shikha

  • How to create a tree view in adobe configurator

    Hi
              How to create a tree view in adobe configurator
    Thanks 

    Please, can you explain what you mean exactly?

  • How to get a value from  select one choice (created by static view)

    Hi,
    Whene ever Iam trying to get value from select one choice which is created by static view iam getting only index.How to get the actual value in 11g .please help me anybody .Thanx in advance....
    Edited by: 874530 on Jul 22, 2011 11:05 PM

    Thnax for your quick reply..
    Iam using 11.1.1.3.0 version.
    My code is
    <af:selectOneChoice value="#{bindings.DenialLevel.inputValue}"
    label="#{bindings.DenialLevel.label}"
    required="#{bindings.DenialLevel.hints.mandatory}"
    shortDesc="#{bindings.DenialLevel.hints.tooltip}"
    id="soc2"
    valuePassThru="true"
    binding="#{backing_denialcomment.denialLevelList}">
    <f:selectItems value="#{bindings.DenialLevel.items}" id="si6"/>
    </af:selectOneChoice>
    and in bean am not able to get value of attribute .Iam getting only index...

  • How to create a customized view in SCOM monitoring to view alerts

    Hi All,
    I am trying to create a customized view in SCOM 2012 R2 monitoring for command center team to have the alerts from Server OS, AD, Exchange and few other MPs. I understand that I can use the option "Create by Specific source" and by selecting the
    required sources but I don't want all the alerts from these sources to be listed there but only few alerts which the respective teams want it to be.
    Thanks in advance.
    Regards,
    Srini

    Hi All,
    I am trying to create a customized view in SCOM 2012 R2 monitoring for command center team to have the alerts from Server OS, AD, Exchange and few other MPs. I understand that I can use the option "Create by Specific source" and by selecting the
    required sources but I don't want all the alerts from these sources to be listed there but only few alerts which the respective teams want it to be.
    Thanks in advance.
    Regards,
    Srini
    Hi Srini,
    Based on the above requirement, You want to create a Dashboard view with Specific alerts but not all right ?
    Based on my understanding on your above requirement i created one in my SCOM. Please let me know if this is what you really wanted ?
    For the below you really need to know what are those alerts, ONLY those alerts you want to be displayed in the dashboard.
    Then Go to the Monitoring tab in SCOM and then Right click Active alerts and select New -> Select New Alert view
    When you select new alert view you will need to specify the Resolution state and the Specific alerts you want.
    In the below example i have selected "MSExchange Active sync Alert" as a example. So my goal is here such that only the alerts i have specified from my selection ( "MSExchange Active sync Alert") if it appears in New state will appear
    in this view not all other alerts.
    So for that i just used the below options:
    Resolution state & Alert name
    Resolution state = New
    Alert name = %MSExchange XXXXXXXX%
    Also as of i see there was no option for entering multiple alert names. But i think there is and i am still trying as it accepts some SQL Wild cards. So if any one has an idea what is the wild card what is to be used to mention multiple names in that Name
    view please let me know.
    Gautam.75801

  • Creating and Binding View Objects dynamically : Oracle Jdeveloper 11g

    Hello,
    We are trying to create and bind view objects dynamically to adf data visualization components.
    The view object is a result of multiple tables.
    We are using Oracle JDeveloper 11g Technical Preview. ( can't upgrade to TP2 or TP3 now).
    We have found this : http://radio.weblogs.com/0118231/stories/2003/07/15/creatingUpdateableMultientityViewObjectDefinitionsDynamically.html on our search for the same.
    The sample application however, is in 10g , hence required migration.
    Also, it was a standalone application with the TestClient.java having a main() method.
    Our requirement is for Web Application; we use Adf+jsf .
    Guidance of any sort is very much appreciated.
    Thanks in advance.
    -Anil Golla

    Hi,
    there also exist a forum for JDeveloper 11: JDeveloper and OC4J 11g Technology Preview
    What you are trying todo is not trivial because you need to not only dynamically create the VO, you would also dynamically need to create the binding meta data for it (assuming you use ADF). Not sure if the API to modify the binding is public, so posting it on the JDeveloper 11 forum bears a glimpse of hope for an answer
    In JDeveloper 10.1.3 you can't do this
    Frank

  • [Solved]How to create ADF interface View

    Hi All,
    I have a design problem that I need some help with.
    In one of the pages in our application, we have two drop down boxes one with account type and another with account name (label) and account number (value).
    The account types are Escrow, Credit and Misc (some other types). all three types are in three different tables.
    Now the problem is, in the page when the account type is selected, the second drop down box should be filled with respective account numbers.
    So my question is Can I create an interface view and implement in all three different account type views and use it for second drop down box.
    Thanks in advance for your help.
    Thanks
    Praveen
    Message was edited by:
    bpraveen
    Message was edited by:
    bpraveen

    You might do a VO with a union of the three tables - use a custom SELECT like this:
    SELECT 'Escrow' account_type, account_number, balance, ... FROM escrow_accounts
    UNION
    SELECT 'Credit', account_number, balance, ... FROM credit_accounts
    UNION
    SELECT 'Misc.', account_number, balance, ... FROM misc_accountsUse NULL for any column in a table that does not have that column. I'm not sure if you can use Entity Objects (one EO per table) with such a VO to make the data updatable - it might have to be a read-only VO.
    Or create a database view with this SELECT and base the VO on that view instead of a table. You can even make the view updatable with INSTEAD OF triggers and base an EO on the view.

  • How to create such a view...

    Hi friends,
    i have this table with following fields and date.
    SQL> select * from v_sel_user_region where employee_id = 14210;
    COMPANY_ID EMPLOYEE_ID REGION_ID REGION_NAME
    1 14210 1 Head Office
    1 14210 2 Central Region
    1 14210 3 Northern Region
    1 14210 4 Southern Region
    2 14210 2 Central Region
    2 14210 3 Northern Region
    2 14210 4 Southern Region
    2 14210 6 ESL
    Now i want to make create a view that will show distinct regions against a company and user.
    like for employee 14210 and whose company is 1 regions are 1,2,3,4
    and the same employee in company 2 has regions 2,3,4,5
    i want to select distinct regions for company 1 and 2 with employee and company in the view.
    How can i create such a view.
    Pliz help, Imran

    Hi,
    well here i am again with another problem.
    actually i applied the same code on another table:
    SQL> select * from v_sel_user_chapter;
    COMPANY_ID REGION_ID EMPLOYEE_ID CHAPTER_ID CHAPTER_NAME
    1 1 4009 1 HEAD OFFICE
    1 1 5504 1 HEAD OFFICE
    1 1 10060 1 HEAD OFFICE
    1 1 10120 1 HEAD OFFICE
    1 1 14210 1 HEAD OFFICE
    1 2 4009 1 HEAD OFFICE
    1 2 4009 11 LMA
    1 2 4009 14 DEFENCE
    1 2 4009 15 GARDEN TOWN
    1 2 4009 16 LIBERTY
    1 2 4009 17 MULTAN
    1 2 4009 18 FAISALABAD
    1 2 4009 19 GUJRANWALA
    1 2 4009 22 HAFIZABAD
    1 2 4009 23 SADIKABAD
    now i am useing this code to find distinct chapters for a employee.
    select company_id, employee_id, region_id, chapter_id, chapter_name
    from (
    select company_id, employee_id, region_id, chapter_id, chapter_name,
    rank() over (partition by employee_id, region_id, chapter_id order by company_id)
    as rang
    from v_sel_user_chapter v
    ) where rang = 1 and employee_id = 14210
    but it is still showing some duplicate chapter_id in the result. :(
    where i am wrong??
    Imran

  • How can I create a Table View in Cocoa Applescript?

    This is my last resort. I've searched for days and only found tutorials for iPhone and Cocoa, and I have no idea where to start. I'm looking for a way to create a Table View, and fill it with a few cells that call a handler when clicked. I've looked through the Xcode help, the Apple documentation, and countless tutorials, and I don't know what to do. I'm sure what I'm asking is possible, because usually what is possible in Cocoa is possible in Cocoa-Applescript.
    Perhaps something like:
    myTableView's addCell_OfType_WithHandler("This is a text cell", text, "myHandler:")
    I would appretiate any responses and brief descriptions on the matter.

    You did not answer my first question, which was not an idle question. I'll answer here, but if cross-chatter appears in a different thread I'll ignore it. You'll have to keep track of the mess yourself.
    Apple_For_The_Win wrote:
    At this point, I've dragged a Table View onto my window, in Xcode. I've connected it to the value "myTableView", and that's where I need help. I'm specifically trying to add cells into the table view.
    I'll assume that 'connected it to the value "myTableView"' means that you've control-dragged in XCode from the table view in Main Menu.xib to a property in your applescript app delegate called myTableView. If that's not the case, please correct me.
    I prefer to use an array controller for this, so please drag an array controller object into main menu.nib. once you've done that, do the following:
    open the applescript app delegate and add a new property called "tableController"
    select the table view in the object list (you may need to open some disclosure triangles to reach it). and add appropriate (an) column name(s). you can hide column titles later if you like, but having named columns makes life easier.
    select the array controller in the object list
    rename the array controller "table data"
    open the attributes inspector, and then add the column name(s) as key(s) in the object controller area
    open the bindings inspector, and where it says "controller content", open the disclosure arrow and bind the content to the App Delegate object on the model key path self.tableController
    select the table view in the object list again, then go down a level and select each column in turn
    for each column, open the bindings inspector, and where it says "value", open the disclosure arrow and bind the content to the Table Data object with the controller key arrangedObjects model key path being the name of the column (which is the name of the key in the controller as well)
    back in the applescript app delegate, add code like the following:
      -- create a list of records, where each record represents a row and the column name is the record key
      set myData to {{column_1_name:"hello"}}
      -- convert it to an NSArray and add it to the controller content. don't forget the *my* keyword, or it won't work
      set my tableController to NSArray's arrayWithArray:myData
      -- may or may not be needed
      myTableView's reloadData()
    That should populate the table with simple text. if you want something more complicated (like buttons or links) then create the more complicated elements separately and add them to the data.

  • Error trying to create a Power View report against a Multi Dimensional SSAS cube

    Hi all,
    We have installed the Power View For Multidimensional Models CTP, released last November 27 on our Analysis Server instances.  I am now trying to create a Power View report in SharePoint that is connected to a Multi-Dimensional cube.
    I have followed the instructions diligently:
    1. Install the CTP
    2. Created a data connection of type "Microsoft BI Semantic Model for Power View" (see attachment #1)
    3. Tested that the connection was valid (all is good here!)
    I then select the "Create Power View Report" option from the data connection that I created above.
    The Power View GUI appears, and then throws an error:
    Error text:
    "An error occurred while loading the model for the item or data source 'http://server/site/SalesVarianceAnalysis_MDX.rsds'. Verify that the connection information is correct and that you have permissions to access the data source."
    The details of the error are:
    <detail><ErrorCode xmlns="rsCannotRetrieveModel</ErrorCode><HttpStatus">http://www.microsoft.com/sql/reportingservices">rsCannotRetrieveModel</ErrorCode><HttpStatus
    xmlns="400</HttpStatus><Message">http://www.microsoft.com/sql/reportingservices">400</HttpStatus><Message xmlns="An">http://www.microsoft.com/sql/reportingservices">An
    error occurred while loading the model for the item or data source 'http://hubtest/sites/broadcasting/thewowzone/Data Connections/SalesVarianceAnalysis_MDX.rsds'. Verify that the connection information is correct and that you have permissions to access the
    data source.</Message><HelpLink xmlns="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsCannotRetrieveModel&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=11.0.3000.0</HelpLink><ProductName">http://www.microsoft.com/sql/reportingservices">http://go.microsoft.com/fwlink/?LinkId=20476&amp;EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&amp;EvtID=rsCannotRetrieveModel&amp;ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&amp;ProdVer=11.0.3000.0</HelpLink><ProductName
    xmlns="Microsoft">http://www.microsoft.com/sql/reportingservices">Microsoft SQL Server Reporting Services</ProductName><ProductVersion xmlns="11.0.3000.0</ProductVersion><ProductLocaleId">http://www.microsoft.com/sql/reportingservices">11.0.3000.0</ProductVersion><ProductLocaleId
    xmlns="127</ProductLocaleId><OperatingSystem">http://www.microsoft.com/sql/reportingservices">127</ProductLocaleId><OperatingSystem xmlns="OsIndependent</OperatingSystem><CountryLocaleId">http://www.microsoft.com/sql/reportingservices">OsIndependent</OperatingSystem><CountryLocaleId
    xmlns="1033</CountryLocaleId><MoreInformation">http://www.microsoft.com/sql/reportingservices">1033</CountryLocaleId><MoreInformation xmlns="<Source>ReportingServicesLibrary</Source><Message">http://www.microsoft.com/sql/reportingservices"><Source>ReportingServicesLibrary</Source><Message
    msrs:ErrorCode="rsCannotRetrieveModel" msrs:HelpLink="http://go.microsoft.com/fwlink/?LinkId=20476&amp;EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&amp;EvtID=rsCannotRetrieveModel&amp;ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&amp;ProdVer=11.0.3000.0"
    xmlns:msrs="An">http://www.microsoft.com/sql/reportingservices">An error occurred while loading the model for the item or data source '<omitted for security purposes>.
    Verify that the connection information is correct and that you have permissions to access the data source.</Message><MoreInformation><Source></Source><Message>For more information about this error navigate to the report server
    on the local server machine, or enable remote errors</Message></MoreInformation></MoreInformation><Warnings xmlns="http://www.microsoft.com/sql/reportingservices" /></detail>
    So, I can connect with the connection, but I get an error when connecting with Power View. 
    Any suggestions are appreciated.
    Thanks...
    /Peter
    Peter

    Hi Peter - are you specifying the cube name in the connection string?
    Data Source=[server];Initial Catalog=AdventureWorksDW-MD;Cube='Adventure Works'
    Check out
    http://blogs.msdn.com/b/analysisservices/archive/2012/12/09/power-view-for-multidimensional-models-feature-drill-down.aspx

Maybe you are looking for