Working on Views

Hi all,
I have a question, is it possible to create a view from combining two other views? What would be the correct query for it?
CREATE VIEW View3
AS 
SELECT View1, View2
FROM View1, View2;

Thank you for the replies. I did what I want to do but unfortunately I am not getting the correct outputs.Please check my codes and feespaid columns,
Social Players subtotal should be 80 and Playing Members subtotal should be 905 then the grand total should be 985. But I got very different values. What is causing the problem?
OUTPUT
Creating Playing Members Report
View created.
Creating Social Members Report
View created.
Creating Treasurers Report
View created.
Playing Members
MEM|MEMBER NAME                    |  FEESPAID|OUTSTANDING FEE
---|-------------------------------|----------|---------------
12 |Martin Mary                    |        75|              0
14 |Martin Kevin                   |        75|              0
123|Jenkins Harry                  |        75|              0
124|Jenkins Susie                  |        75|              0
162|Hawkins Steven                 |         0|             75
163|Hawkins Susie                  |         0|             75
248|Tuckwell Barry                 |        75|              0
249|deGrass Moe                    |        75|              0
250|Clippers Neil                  |        75|              0
251|Smith Quentin                  |        75|              0
262|Tucker Tommy                   |        50|             25
263|Greene Lorne                   |        60|             15
284|Tillizer Fleur                 |        75|              0
285|Tillizer Krys                  |        75|              0
286|Gu Jimmy                       |        20|             55
287|Ion Yunfei                     |        25|             50
16 rows selected.
Social Members
MEM|MEMBER NAME                    |G|  FEESPAID|OUTSTANDING FEE
---|-------------------------------|-|----------|---------------
3  |Atrick Gerry                   |M|        40|              0
4  |Atrick Maisie                  |F|        40|              0
Treasurers Report
Social Members SubTotal|Playing Members Subtotal|GRAND TOTAL
-----------------------|------------------------|-----------
                   1280|                    1810|       3090
View dropped.
View dropped.
View dropped.-----------------------------------------------------------------
SCRIPT
PROMPT Creating Playing Members Report
CREATE VIEW Playing_Members
AS
SELECT MemberNo, FamilyName||' '||GivenName AS "MEMBER NAME", FeesPaid, 75 - FeesPaid as  "OUTSTANDING FEE"  
FROM Member
WHERE FeesPaid != 40
ORDER BY TO_NUMBER(MemberNo);
PROMPT
PROMPT Creating Social Members Report
CREATE VIEW Social_Members
AS 
SELECT MemberNo, FamilyName||' '||GivenName AS "MEMBER NAME", FeesPaid, 40 - FeesPaid as  "OUTSTANDING FEE"  
FROM Member
WHERE FeesPaid = 40
ORDER BY TO_NUMBER(MemberNo);
PROMPT
PROMPT Creating Treasurers Report
CREATE VIEW Treasurers_Report
AS 
SELECT SUM(Social_Members.FeesPaid) AS "Social Members SubTotal", SUM(Playing_Members.FeesPaid) AS "Playing Members Subtotal", SUM(Social_Members.FeesPaid + Playing_Members.FeesPaid) AS "GRAND TOTAL"
FROM Social_Members, Playing_Members;
PROMPT Playing Members
SELECT * FROM Playing_Members;
PROMPT Social Members 
SELECT * FROM Social_Members;
PROMPT Treasurers Report
SELECT * FROM Treasurers_Report;
DROP VIEW Treasurers_Report;
DROP VIEW Playing_Members;
DROP VIEW Social_Members;

Similar Messages

  • My macbook is going to sleep while I'm working or viewing something. I will sometimes have to open and close it several times to get it to "wake up" again. Any suggestions?

    my macbook is going to sleep while I'm working or viewing something. I will sometimes have to open and close it several times to get it to "wake up" again. Also, no sound comes out of my Macbook. I only hear with earbuds or headphones. Any suggestions?

    If you have more than one user account, you must be logged in as an administrator to carry out these instructions.
    Triple-click anywhere in the line below to select it:
    syslog -k Sender kernel -k Message CSeq "Previous Shutdown" | tail | open -f -a TextEdit
    Copy the selected text to the Clipboard (command-C).
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V).
    The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear.
    A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. The title of the window doesn't matter, and you don't need to post that.

  • Appointments Not Showing Up In Work Week View

    Hello 
    I have Outlook 2013 with 3 calendars that overlay in my Calendar.
    When I am in Month view all the appointments show but when I go into Work Week they all disappear.
    I have attached screenshots.
    This worked before but when i re-added my account this no longer seems to work.
    Help would be much appreciated!
    Thanks

    Hi,
    It seems that the Work Week view is corrupted. Please try to reset Outlook view with /cleanviews switch to check the result. To do this, press Windows key + R to open the
    Run command, type outlook.exe /cleanviews and press
    Enter.
    If problem persists, we can try to run a repair of the Outlook data file to check if it helps. See:
    http://office.microsoft.com/en-in/outlook-help/repair-outlook-data-files-pst-and-ost-HA102749454.aspx?CTT=1
    Please let me know the result.
    Regards,
    Steve Fan
    TechNet Community Support

  • Change/ removal of Unit of Issue in Material master Work scheduling view

    Hi,
    Is there a way to remove Unit of Issue from Work scheduling view? it is giving error message as "this is being used in BOM". Even if we put deletion indicator also it is showing same error message.
    Regards,
    R. Srinivasan

    Do a CS15 for the material in question and make sure you go in the BOM and select the material and click on delete/remove you can then do this.
    I have tested it and it works.
    Regards
    Adeel

  • Problem with *serial no. profile* in work sheduling view of material master

    Hi ! !
    I am here with a problem with serial no. profile in work sheduling view of material master.
    By mistake for some FHMI type ( PRODUCTION RESOURCE TOOLS )materials, serial no profile exist in 'work sheduling' view. Due to that we are facing problem in GRN.
    when I am trying to remove that with MM02. i m getting a message as Serial numbers already assigned to this material
    Please suggest how to remove serial no. profile.
    Thanks in advance,
    Prab

    Hi,
    go to MMBE and check the Current Serial number...for  FHMI type
    and go to IQ02 and close the Serial number range at the Current number range...
    Now you can assign this serial number range to another material type...
    Thx
    Raju

  • 20.0.1 Update: right-click on page shows ALL menu options, many (all?) don't work, no "view page source", no "open in new tab"

    after update to 20.0.1 a few hours ago, right click shows ALL menu options, many (all?) don't work, like "view page source", "open in new tab" etc. etc.

    I'm having the same issue on Firebug 1.11.3....The "more robust" right click menu does return when I disable the extension. Would you recommend downgrading Firebug to 1.11.2? Hate to have to turn off Firebug "except when I'm working" but either option seems to have both pros/cons.
    This behavior happens on both PC and Mac (although the above information was tested on my PC - I'll have to check the Mac later and see if Firebug is doing the same thing there. I believe I have the most recent Firebug there, too)
    The PC is on Firefox 20.0.1, Mac should be as well.
    Thanks

  • JBO-25048: Operation getAllRowsInRange is invalid for a working set view ob

    I'm new to JDeveloper, so please forgive my ignorance...but I'm having a problem creating a list binding in LOV mode. After placing the list of values attribute on the jsp and making changes in the List Binding Editor, I receive the following error when I try testing the page.
    JBO-25048: Operation getAllRowsInRange is invalid for a working set view object.
    Any suggestions or hints to help me on my way would be greatly appreciated. Thanks.

    You should consider switching your application to Immediate Mode. You typically should never need to manually call the sync() method.
    Here is some advice on Batch Mode versus Immediate Mode.
    http://www.oracle.com/technology/products/jdev/collateral/papers/10g/adftoystore/readme.html#batchmode
    Usually this error occurs if you attempt to work with an iterator binding before the prepareModel() method has been invoked in the DataAction lifecycle.
    When batch mode is being used, the prepareModel() method internally batches up all the calls to execute the view objects referred to by iterator bindings in the current binding container and then syncs the operations in a single round-trip with the (either logically- or physically- separated) middle-tier application module.

  • Work scheduling view and warehouse management view

    Can any one explain what is Work scheduling view and where it need to be extended fro raw material or Finished or Semi finished

    Hi,
    Work schedule is purl related to PP where as warehouse management related to warehouse
    where it need to be extended fro raw material or Finished or Semi finishe
    It can be for three
    check following link also
    [work schedule|http://www.sap-img.com/production/work-scheduling-view-in-material-master.htm]
    Regards
    Kailas Ugale

  • Work scheduling view-material master

    Hi, wht is meant by lot size depenedent parameters and lot size independent parametrs? how to use that data in manufacturing industry? pls advise.

    Dear Yadav,
    case1: If you have maintained the Inhouse production time for any product in the MRP2 view,this get's automatically reflected
    in Work scheduling view as lot size independent Inhouse production time.
    At this point if basic scheduling is carried out during MRP then the date calculation will be based upon this number of days
    irrespective of the order quantity.
    case2:Once after maintaining the operation timings in the routing,you can update the same using CA97,for the relevant task list
    type ,group and group counter no and include the check box for update material master directly,you can find the timings
    maintained on hour basis in the setup,processing and inter operation (This calculation is based on the timings maintained in the
    routing and also your work center capacity details,like the number of hours this capacity will be available for a day).
    Once after performing this,even if you have maintained the inhouse production time in days,that value gets removed.
    This time will be considered for basic scheduling purpose during MRP.
    So in my understanding this will be helpful during the scheduling purpose for the date calculation.
    Check and revert back with your further queries.
    Regards
    Mangalraj.S

  • Work scheduling view

    Hi,
    In production order, basic dates are coming what we are maintaining as in house production time in material master.
    I want to maintain basic dates as per the quantity.
    Ex: To produce 100 pc, in house prod. time will be 5 days. And if the order quantity is 200 pcs then basic dates should show 10 days.
    In work scheduling view, I maintain base quantity and in house prod. Time. When I run MRP for order quantity of 200, basic dates shows 5 days only.
    What is the purpose of having base quantity, in house prod. Timeu2026 in work scheduling view?
    Regards / US

    Dear,
    Your master date is correct. Go to OPU3. In scheduling - Adjust Dates Set 2 Donot adjust basic dates, dep req to operation dates.
    It Determines if and how the basic dates or the dependent requirements dates are adjusted during lead time scheduling. You can customize this in OPU3 for planned order & OPU5 for Production Order.
    Regards
    Abhijit Gautam
    Edited by: Abhijit Gautam on Nov 28, 2011 5:11 PM

  • ADF Databound Drop Down causes "invalid for working set view object"

    I've created a drop-down list per the instructions laid out in the "Creating a Databound Drop Down List in Oracle JDeveloper 10g" HowTo ( http://otn.oracle.com/products/jdev/tips/mills/databound_lists.html ). The list works fine when editing an existing row, but I get the following error when working with a newly created row:
    JBO-25048: Operation getAllRowsInRange is invalid for a working set view object.
    The drop-down list actually gets populated correctly despite the error. The error only occurs the first time I access the detail page that uses the list. I'm guessing that this may have something to do with the fact that the row value associated with with list is null.
    Any ideas on how to workaround this one? Thanks.

    Thanks Duncan.
    The ViewObject that is bound to the list is only used for the purposes of the list so there shouldn't be any problem with its state being altered elsewhere. Not sure if that's what you mean by collisions or not...
    I tried adding a "null/empty" value to the list but the results are the same.
    What is meant by "working set view object"? What other types of ViewObject are there? How are they different and how does someone know which operations are valid/invalid?

  • Working set view object

    Hi all,
    I tried to set manually a row in a ViewObject as current with following code
    ctx.getBindingContainer().findIteratorBinding("kksobjectVO").setCurrentRowWithKeyValue("100");
    But I get follwing error code
    oracle.jbo.InvalidOperException: JBO-25048: Operation getKeyAttributeDefs is invalid for a working set view object
    Sometimes I get this error and sometimes not. How can prevent from this error.
    thx

    Hi Shailesh,
    I called this method in Steve's
    initializeModelForPage(...) method. I solved this problem by setting directly through setCurrentRow. I avoided to use the BindingContainer. Already I don't know how I can use the setCurrentRowWithKeyValue in initializeModelForPage.
    In the initializeModelForPage I'm working directly with the ViewObjects. It's not the best way, but it works.
    Do you know how I can work with BindingContainer methods, like setCurrentRowWithKeyValue inside the initializeModelForPage-method?
    thx

  • Operation hasNext is invalid for a working set view object

    Can someone point me to soem documentation to why I'm getting this error? I'm obviously misunderstanding something fundamental.
    Thanks

    I have an application module with a client method as follows:
    public void setUserCredentials(String username, String password)
    UserAccountViewImpl vo = getUserAccountView1();
    vo.setWhereClauseParam(0, username);
    vo.setWhereClauseParam(1, password);
    vo.executeQuery();
    if (vo.hasNext()) (BREAK POINT TWO)
    vo.next();
    I have a struts action that is based on the BasicADFAction class in the tech paper "Oracle ADF Data Binding Primer and ADF/Struts Overview"
    by Steve Muench.
    public class IsLoginValidAction extends BasicADFAction
    protected ActionForward performActionLogic(ActionMapping mapping,
    ActionForm form, HttpServletRequest request, HttpServletResponse response)
    throws Exception
    .... other code that gets username and password from form
    DatamartModule am = (DatamartModule)getApplicationModule("DatamartModuleDataControl", request);
    am.setUserCredentials(username, password);
    ViewObject vo = am.findViewObject("UserAccountView1");
    if (vo.getCurrentRow() == null) -- BREAK POINT ONE
    ae.add("InvalidDetails", new ActionError("error.IsLoginValidAction.InvalidDetails"));
    return mapping.findForward("LoginError");
    UserAccountViewRowClient vr = (UserAccountViewRowClient)vo.getCurrentRow();
    .... do some other checks with the user account
    As you can see the above Action calls setUserCredentials(). What is driving me mad is the following. If I enter a valid username and password in the login page and reach break point one the method vo.getCurrentRow() returns null which is not what I expect!
    If I re-submit my login details again, when I reach break point one for the second time vo.getCurrentRow() is not null??
    I have also set a break point two just to make sure setUserCredentials is working and it always brings back a row when I enter the correct details. So why in the action when I select the same view object the current row is not available to me but is available the second time round?? I'm I missing something fundamental??
    I had some feedback on metalink where oracle support set check that the vo.isExecuted() == true and if it isn't then re-execute the query. I couldn't see why I should do this but I did. I found that vo.isExecuted is false the first time round but true the second time. It appears the first time round I am implicitly getting the query to execute for the first time even though I believe I have already done this in the setUserCredentials method.
    After adding a vo.executeQuery() I obviously needed to add code that obtained the row. As soon as vo.hasNext() is called I get:
    oracle.jbo.InvalidOperException: JBO-25048: Operation hasNext is invalid for a working set view object.
         at oracle.jbo.common.ws.WSObject.invalidOperation(WSObject.java:44)
         at oracle.jbo.common.ws.WSRowSetIteratorBase.hasNext(WSRowSetIteratorBase.java:381)
         at view.IsLoginValidAction.performActionLogic(IsLoginValidAction.java:66)
         at view.BasicADFAction.handleLifecycle(BasicADFAction.java:64)
         at view.BasicADFAction.execute(BasicADFAction.java:46)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:228)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    I must misunderstand something fundamental. Any help would be really appreciated. Basically in my client code (The struts action) I want to access a single record that is based on a view. I prepare the view object by calling a custom service level method to set the username and password and execute the query.

  • Work scheduling view via MATMAS idoc

    Can somebody tell me which segment and field is used in MATMAS idoc to create Work scheduling view?

    Hi,
    Identify the various Basic Types available for MATMAS and then provide the basic type in transaction WE30 and you can check the various segments being generated.
    Thanks
    Krithika

  • Work scheduling view query

    even though i have made settings in customisation i am unable to get work scheduling view while creating material master can you explain me why?

    Hi
    Have you maintained  in SPRO->Logistics-Genral->Material Master->Basic settings->Define atributes of material types
    workscheduling view for the new material type.
    please check and come back.
    Regards,
    srihari.M
    Edited by: Srihari.M on Apr 21, 2011 6:52 AM

  • Work scheduling view should be preselected while creating semifinish matl.

    Dear Sirs,
    I have a specific requirement - that while creating  the material master through MM01 I want preselected work scheduling view.
    *Pls don't suggest user specific settings and screen sequence settings.
    Thank you,
    Anup.

    2 options available
    1.select that view for your plant and save as default values .Every time you create it will be defaulted
    2. or USe screen variant in SHd0 for the t-code MM01

Maybe you are looking for