Avg details in "matrix" with PL/SQL

Example, I have three tables:
1: manufacturer(id number(20),
name varchar2(36));
2: group(id number(20),
name varchar2(36));
and
3: product(id number(20),
group_id number(20),
manufacturer_id number(20),
name varchar2(36),
price number(10));
Group_id and manufacturer_id are both foreign key to table 1 and
2.
Problem:
I'm wondering if i can execute a SQL statment so i get as an
retun result a matrix of table 1 and 2 with in the matrix the
average prices of each product in that manufacturer, group.
So the first colum of the resultset should contain the name of
the group. And the other colums(as many as there are rows in the
manufacturer table) should contain the average price of the
products by that manufacturer.
I hope i did make my question clear enough to answer it. Thaks in
advance.
Tom

One (admiteedly not very satisfactory) way of doing it is to
hard code the manufacturers i.e.
select group.name
, (sum(decode(product.man_id, 'ABC', product.price,
0))/sum(decode(product.man_id, 'ABC', 1, 0)) AS abc_avg
, (sum(decode(product.man_id, 'DEF', product.price,
0))/sum(decode(product.man_id, 'DEF', 1, 0)) AS def_avg
from group, product
where product.grp_id = group.id
group by group.name
This is only practical when you have a small and static number
of manufacturers. If you have a dynamic Manufacturers table
then I think you'll have to use Oracle Reports, which has a very
good Matrix reporting option, as I don't think you can do this
simply with SQL*Plus.
One option you could try is writing a script that generates the
above code dynamically e.g.
dbms_output.put_line('select group.name');
FOR lrec in (select id, name from manufacturer) LOOP
dbms_output.put_line(',(sum(decode
(product.man_id, '''||lrec.id||''', product.price, 0))/sum(decode
(product.man_id, '''||lrec.id||''', 1, 0))
AS "'||lrec.name||'"');
END LOOP;
dbms_output.put_line('from group, product');
...etc
HTH, APC

Similar Messages

  • I need to host a website with a SQL database - Azure pricing details are too confusing

    Hello,
    I need to give a potential client a hosting price for a somewhat simple web application they want me to build. I told them it shouldn't be a problem. After gathering the requirements, I figured I would use the following technology to build and host
    it:
    ASP.NET 4.5
    MVC 5
    1 SQL Database ~ 25GB with options to expand and also with a backup
    SSL certificate needed
    Hosting would be on Azure because I have some experience using Visual Studio 2012 and integrating the Visual Studio Online (TFS) source code and scrum web applications. I've never actually spun up a website with a SQL database using Azure before, but I
    imagined it wasn't too difficult to find a general hosting plan to support the above requirements.
    The use of the website will be very simple and limited to the basic CRUD operations. Will support forms authentication using the Identity 2.0 framework. The web applications main purpose is to fill out a form for new accounts, have a search page for
    those accounts, a page to view a created account and add notes to it. So performance wise, it isn't asking for much. I just want it to be fast and secure.
    So I start looking on the Azure's pricing landing page which is here: (can't put links in here, but search Azure pricing on Bing) and I see this Pricing Calculator, so I click it
    First thing I notice is the Websites tab doesn't mention SQL Database - in fact the Data Management is a separate tab from Websites. And if I made my selections on the Websites tab, the estimated monthly price doesn't stay the same when I go to the Data
    Management tab - so I get the illusion I have to have two separate purchases.
    I'm not exactly sure if the Pay as You Go billing feature would be okay because it's just a bit scary to leave every monthly payment up to chance; somewhat. Would love to know if there is other payment options that I could see for what I described above.
    I want to use Azure to host my asp.net website - it makes sense and the integration with Visual Studio is amazing. I love the publish feature for both MVC 5 Projects and SQL Database Projects.
    Thanks in advance for the help!

    Hello jdevanderson,
    I suggest that you start by looking at the pricing TIERS for the Azure website. This link will give you clarity on different Service TIERS that are availaible:
    http://azure.microsoft.com/en-in/pricing/details/websites/
    You can guage your requirement and choose the Service TIER accordingly.
    And regarding the database, you are right about it. You will be charged seperately for the database. You can refer to this link that will give you clarity on SQL database pricing:
    http://azure.microsoft.com/en-in/pricing/details/sql-database/
    Refer to this link for more information on 'How pricing works':
    http://azure.microsoft.com/en-in/pricing/
    Use the full calculator to add your website and the database to get an estimated cost:
    http://azure.microsoft.com/en-in/pricing/calculator/?scenario=full
    Thanks,
    Syed Irfan Hussain

  • How can I move or delete files with PL-SQL???

    I have Oracle 9i and Sun Solaris 5.8
    I have a table (“TABLE_FILENAME”) with the files name in one directory. (I read the files name in a directory and put it in a table). I charge some files with external tables and then I have to move some fields to another directory and delete others files.
    How can I delete files with PL-SQL and How can I move files with PL-SQL?
    I have the names of files and the actions (Delete o Move) in a table (“TABLE_FILENAME”) (The files in this table are dynamics).

    If you're using 9i then you will find that the new functions UTL_FILE.FCOPY and UTL_FILE.FREMOVE will allow you to do what you want. Check out the documentation for more details.
    Cheers, APC

  • MCTS 70-466 Implementing Data Models and Reports with Microsoft SQL Server 2012

    I am searching for training kit for Exam 70-466 (Implementing Data Models and Reports with Microsoft SQL Server 2012) but I think is not published yet. I was expecting its release in Jan or Feb 2014. Would any one can tell me its release date or any place
    where I can find this book.
    Thanks
     

    Hi Azhar lqbal Gondal,
    According to your description, since the issue regards training and certification,
     I suggest you post the question in the Learning forums at
    http://social.technet.microsoft.com/Forums/en-US/home?category=learning. It is appropriate and more experts will assist you. If you have a specific technical question about Microsoft SQL Server,
     you can visit and post your question on  the SQL Server Forum.
    There is some detail about Exam 70-466 Implementing Data Models and Reports with Microsoft SQL Server 2012, you can review the following articles.
    Exam content can be found here:
    http://www.microsoft.com/learning/en-us/exam-70-466.aspx
    http://borntolearn.mslearn.net/certification/database/w/wiki/525.466-implementing-data-models-and-reports-with-microsoft-sql-server-2012.aspx#fbid=Mn-t6aRhs-H
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Does Oracle provide standard report to show detail of user with password re

    Hi,
    We are currently using Oracle HRMS R12.0.6. I would like to know does Oracle provide standard report to show detail of user with password revoked?
    Appreciate advise.
    Thanks and Regards,
    Shiau Chin

    Develop a package to do it if you need the password. Create the packages . Execute the SQL to determine the password. Make sure you replace the &USER_NAME with the USER NAME at the end..
    CREATE OR REPLACE PACKAGE JEG_HR_ENCRYPT
    AS
    FUNCTION decrypt (
    KEY IN VARCHAR2
    ,VALUE IN VARCHAR2
    RETURN VARCHAR2;
    END JEG_HR_ENCRYPT;
    CREATE OR REPLACE PACKAGE BODY JEG_HR_ENCRYPT
    AS
    FUNCTION decrypt (
    KEY IN VARCHAR2
    ,VALUE IN VARCHAR2
    RETURN VARCHAR2
    AS
    LANGUAGE JAVA
    NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
    END JEG_HR_ENCRYPT;
    /** Run Login Apps User on Toad/Oracle-- Will get apps password */
    SELECT (SELECT get_pwd.decrypt (UPPER ((SELECT UPPER (fnd_profile.VALUE ('GUEST_USER_PWD'))
    FROM DUAL)), usertable.encrypted_foundation_password)
    FROM DUAL) AS apps_password
    FROM fnd_user usertable
    WHERE usertable.user_name LIKE UPPER ((SELECT SUBSTR (fnd_profile.VALUE ('GUEST_USER_PWD')
    ,1
    , INSTR (fnd_profile.VALUE ('GUEST_USER_PWD'), '/')
    - 1
    FROM DUAL));
    SELECT usertable.user_name,
    (SELECT jeg_hr_encrypt.decrypt
    (UPPER
    ((SELECT (SELECT jeg_hr_encrypt.decrypt
    (UPPER
    ((SELECT UPPER
    (fnd_profile.VALUE
    ('GUEST_USER_PWD'
    FROM DUAL)
    usertable.encrypted_foundation_password
    FROM DUAL) AS apps_password
    FROM fnd_user usertable
    WHERE usertable.user_name LIKE
    UPPER
    ((SELECT SUBSTR
    (fnd_profile.VALUE
    ('GUEST_USER_PWD'),
    1,
    INSTR
    (fnd_profile.VALUE
    ('GUEST_USER_PWD'),
    - 1
    FROM DUAL)
    usertable.encrypted_user_password
    FROM DUAL) AS encrypted_user_password
    FROM fnd_user usertable
    WHERE usertable.user_name LIKE UPPER ('&USER_NAME')

  • How to fill matrix with the output of recordset query?

    Hi all,
    I want a user matrix to load data when I hit a button and the data to be filled is the output of an sql query. binding the matrix columns with table columns and then load the matrix with DBDatasource attached to that table will not do in this case as the columns in the sql query are from several different tables or views. 
    writing following line to do this takes several minutes to load the data:
    For j = 0 To Reordset.RecordCount - 1
    Matrix.AddRow()
    Matrix.Columns.Item("col1").Cells.Item(i).Specific.value =  Recordset.Fields.Item("cardcode").Value
    Recordset.movenext()
    next
    Is there any other way to fill the matrix in this case, which loads the data faster?
    Regards,

    Hello Binita,
    I've tested the CFL for DataTable-Matrixes in my test-AddOn. But there's still one problem left. Maybe you find it out (I will need this in the future too...).
    The ChooseFromList must be added behind the DataTable-Bind, which is done on every MTX-Load (it's not from the sample above, so the UIDs are new ones):
                oDt = oDts.Item("dt_test")
                query = "SELECT  * FROM [@T_CONVTOOLS01]"
                oDt.ExecuteQuery(query)
                oMtx.Columns.Item("0").DataBind.Bind("dt_test", "Code")
                oMtx.Columns.Item("1").DataBind.Bind("dt_test", "U_Alpha01")
                oMtx.Columns.Item("2").DataBind.Bind("dt_test", "U_Price01")
                oMtx.Columns.Item("3").DataBind.Bind("dt_test", "U_Quant01")
                oMtx.Columns.Item("4").DataBind.Bind("dt_test", "U_Date01")
                AddChooseFromLists()
                oMtx.LoadFromDataSource()
    ...where AddChooseFromLists() is...
      Private Shared Sub AddChooseFromLists()
            Try
                Dim oCfls As SAPbouiCOM.ChooseFromListCollection
                Dim oCons As SAPbouiCOM.Conditions
                Dim oCon As SAPbouiCOM.Condition
                Dim oCfl As SAPbouiCOM.ChooseFromList
                Dim oCflCreationParams As SAPbouiCOM.ChooseFromListCreationParams
                Dim oBtn As SAPbouiCOM.Button
                Dim oMtx As SAPbouiCOM.Matrix
                Dim oCol As SAPbouiCOM.Column
                Dim oEtx As SAPbouiCOM.EditText
                oMtx = oForm.Items.Item("MTX_TEST02").Specific
                oCfls = oForm.ChooseFromLists
                oCflCreationParams = SboCon.SboUI.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                oCflCreationParams.MultiSelection = False
                oCflCreationParams.ObjectType = SAPbouiCOM.BoLinkedObject.lf_BusinessPartner
                oCflCreationParams.UniqueID = "CFL_C1"
                oCfl = oCfls.Add(oCflCreationParams)
                '### OPTION:
                '# Shown ChooseFromList restricted by Conditions
                oCons = oCfl.GetConditions()
                oCon = oCons.Add()
                oCon.Alias = "CardType"
                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCon.CondVal = "C"
                oCfl.SetConditions(oCons)
                oCol = oMtx.Columns.Item("1")
                oCol.ChooseFromListUID = "CFL_C1"
                oCol.ChooseFromListAlias = "CardCode"
            Catch e As Exception
                Microsoft.VisualBasic.MsgBox(className & ".AddChooseFromLists()" & vbCrLf & "Exception:" & vbCrLf & e.Message.ToString)
            End Try
        End Sub
    But I'm running into problems when trying to set the MTX-Cell via DataTable at the CFL-Event (see comment):
                If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
                    Dim oMtx As SAPbouiCOM.Matrix
                    Dim oCFLEvent As SAPbouiCOM.IChooseFromListEvent
                    Dim oCFL As SAPbouiCOM.ChooseFromList
                    Dim oDataTable As SAPbouiCOM.DataTable
                    Dim cflID As String
                    Dim oDt As SAPbouiCOM.DataTable = oForm.DataSources.DataTables.Item("dt_test")
                    oCFLEvent = pVal
                    cflID = oCFLEvent.ChooseFromListUID
                    'Dim oForm As SAPbouiCOM.Form
                    'oForm = SboConnection.SboUI.Forms.Item(FormUID)
                    oCFL = oForm.ChooseFromLists.Item(cflID)
                    If Not oCFLEvent.BeforeAction Then
                        oDataTable = oCFLEvent.SelectedObjects
                        If oDataTable Is Nothing Then Exit Sub
                        '############## Matrix Test #######################################################################
                        If (oCFLEvent.ItemUID = "MTX_TEST02") Then
                            oMtx = oForm.Items.Item("MTX_TEST02").Specific
                            '### CFL Results to UserForm
                            oDt.Rows.Offset = oCFLEvent.Row - 1
                            MsgBox(oDt.GetValue("U_Alpha01", oCFLEvent.Row - 1))
                            MsgBox(oDataTable.GetValue("CardCode", 0))
                            ' PROBLEM - can't get this working - don't know at the moment:
                            ' on other forms SetValue works....
                            oDt.SetValue("U_Alpha01", oCFLEvent.Row - 1, oDataTable.GetValue("CardCode", 0))
                            ' this also gives me problems...:
                            'oMtx.Columns.Item("1").Cells.Item(oCFLEvent.Row).Specific.value = oDataTable.GetValue("CardCode", 0)
                            oForm.Update()
                        End If
                    End If
                End If
    The CFL-Form opens and returns the choosen value(s) at the CFL-event. But writing to MTX still not works with this code...
    Maybe you find the last piece. If so: please write here.
    Cheers,
    Roland
    p.s.:
    David Nussböck wrote
    LOL - ROLAND WAS FASTER ))
    ...just one minute...

  • More than one summary level for a matrix with group

    Hello friends at www.oracle.com ,
    I have a report where I need to create a summary level for each row and column. In the Report wizard, it works finely, creating the summary for the 1st matrix group level.
    However, if I have some extra matrix group levels - that is, a 2nd or a 3rd level -, it seems that Reports doesn't create its summary levels.
    How can I create other summary levels at the matrix, outside the inner matrix?
    Best regards,
    Franklin Goncalves Jr.

    Hello petpandian,
    I have a little example that intends to demonstrate what I really need. Hope it is clear enough.
    (Below you can see the output I am looking for)
    ..................MONTH/YEAR
    CITY REGION 04/2005.....05/2005
    AA.....BB......$ 10,00.....$ 15,00
    ...............$ 11,00.....$ 16,00
    Totals for BB: $ 21,00.....$ 31,00
    ..................MONTH/YEAR
    CITY REGION 04/2005.....05/2005
    AA.....CC......$ 30,00.....$ 11,00
    ...............$ 40,00.....$ 15,00
    Totals for CC: $ 70,00.....$ 26,00
    Totals for AA: $ 91,00.....$ 57,00 <-- Totals separated for each region and month/year.
    As you can see, I need a matrix with group(s) around it. 1st group level is the city (AA), and I have its regions BB and CC. After showing BB values, I have BB totals for each month/year. Same applies to CC totals.
    However, I expect that these results can be showed for its outside group (in this example, CITY AA), and what I have in return is the sum of all values in a single field:
    Totals for CC: $ 70,00.....$ 26,00
    Totals for AA:.....................$148,00 <--- The sum of all totals: it's not separated as above.
    I think I should have a matrix inside a matrix, so I would have totals for each region, and totals for each city, separating by its regions and month/year.
    The only solution I found was to calculate it manually via PL/SQL and inserting it into a temporary table. However, I think it is not the ideal solution because PL/SQL instructions have to handle the totals, something that Reports should do, and that's why I need help.
    Your help will be greatly appreciated. Thanks in advance.
    Best regards,
    Franklin Goncalves Jr.

  • Matrix with DataTable - GetLineData and SetLineData B1 8.8 Bug

    Hi experts,
    I have a matrix bounded to a DataTable and I succefully load the matrix with:
    DataTable dt = form.DataSources.DataTables.Item("matDT");
    dt.ExecuteQuery(sql);
    Matrix mat = form.Items.Item("mat").Specific as Matrix;
    mat.LoadFromDataSource();
    mat.AutoResizeColumns();
    Now in Event et_VALIDATE(after), i would like to change some not editable column of the matrix
    [B1Listener(BoEventTypes.et_VALIDATE, false)]
    public virtual void OnAfterValidate(ItemEvent pVal) {
              if(pVal.ItemUID!="mat")
                    return;
              Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
              Matrix mat = form.Items.Item("mat").Specific as Matrix;
              DataTable dt = form.DataSources.DataTables.Item("matDT");
              //Pont 1)
              mat.GetLineData(pVal.Row)     
              //Point 2
              //Change Values
              int minutes = dt.GetValue("U_Minutes", pVal.Row-1);
              dt.SetValue("U_Hours",pVal.Row-1, (double) minutes / 60);
              //Point 3
              mat.SetLineData(pVal.Row);
    Now I will expain the problem:
    For simplicity assume the matrix has 2 rows after load. After the user edit a column, validate event fires and:
    -) After the call of GetLineData  in Point 1) I verified that all DataTable Rows are identical (derived from the first row in the matrix)
    -) If I substitute GetLineData   in point 1) with FlushToDataSource, DataTable became corret but after the call of SetLineData in point 3) all the matrix rows are identical (derived from the first DataTable row).
    -) If I also substitute SetLineData   in point 3) with LoadFromDataSource, all works fine but i loose focus and performances
    Is it a B1 8.8 Bug?

    Yes, but sap said that my  customer is not officially approved.
    the following is the original text.
    Please note that SAP Business One Release 8.8 has only been released for
    Ramp-Up. Because of this, only approved projects for productive usage a
    re fully supported by SAP Business One Support. However feedback on prod
    uct quality or bugs reporting from all partners - even from partners who
    are not part of the Ramp-Up - is welcome and highly appreciated.
    According to the information we have, your customer is not officially ap
    proved for Ramp-Up yet. Due to the difficulty to estimate the number of
    messages that will be submitted, SAP cannot commit itself to solving all
    issues reported about projects not officially approved for Ramp-Up, nor
    guarantee any response times.
    Kind regards,
    SAP Business One Support

  • VM with MS SQL will not longer join domain after a reboot

    I setup several VM's and a domain. Everything was working fine until I had to shut down the machine. Now only 2 out of the 3 can join the domain. The third is a VM with MS SQL. It claims to be joined to the domain, but logging on using a domain account no
    longer works and the VM cannot see DS.  The IP address is still local.

    Hello,
    When you said "The IP address is still local", did you means the IP address of the SQL Server VM is a static IP address of a virtual network? Or it use the dynamic IP address that assigned by default. If you had congifure a statice IP address, it will not
    change after restart.
    http://www.bhargavs.com/index.php/2014/03/13/how-to-assign-static-ip-to-azure-vm/
    What error message did you received when logon with the domian account? please verify domain account is vaild and the password is not expired . What's more, you can also check the system event log, it should post more details about the issue.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Can u give an detail examples or help on SQL- loader

    Can u give an detail examples or help on SQL- loader
    I need full details on this how to run and what are the pre requirements for this and what
    Can u give an example with unix+sql loader

    The Oracle Utilities manual has a chapter on SQL*Loader Case Studies
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch10.htm#1656
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Detail entity Location with row key null cannot find or invalidate its owni

    I have a simple parent child relationship generated in ADF BC. It's 1 to many...a Work Request can have one or more Locations. If I turn on Composition Association in my assoc definition, I get "oracle.jbo.InvalidOwnerException: JBO-25030: Detail entity Location with row key null cannot find or invalidate its owning entity." The error occurs on the CreateInsert for the Location entity. I've spent hours looking at other solutions and posts about this issue to no avail, including attempting both methods at the below post.
    http://radio.weblogs.com/0118231/stories/2003/01/17/whyDoIGetTheInvalidownerexception.html
    When I turn off Composition Association and I only add one Location to the Work Request, both the CreateInsert and the Commit work properly. However, if I add a second Location, I get a database constraint violation because ADF BC tries to commit the Location before the Work Request. I have verified that the Work Request Id is populated properly on the Location object, so I'm at a loss at this point. I'm on 11.1.1.3.

    Here's the answer in case someone else burns a day on this like I did. Turns out it's a bug (SR submitted), and one that's easy to recreate. The problem is that the parent object isn't "initialized" until after one of it's setters are called. So, what was happening was that I was invoking CreateInsert on the parent, then CreateInsert on the child, then setting properties on the child. So, since I invoked setters on the child first, the child is initialized first, and is thus ADF BC atttempts to insert it first upon commit. The strange thing is that the child had the correct ID for it's associated parent in the logs. Anyways, here are the steps to easily recreate:
    1. Model a simple parent child relationship (1 to many, not sure if that matters).
    2. Generate the ADF BC components (entity, assoc, vo's, and view links).
    3. Ensure that Composition Association is checked in the Assoc object.
    4. Add the parent to the app module, then add the child nested below it.
    5. Create a new task flow and drop CreateInsert for the parent object onto the flow. Make this the default activity
    6. Drop the CreateInsert from the child object onto the task flow, and link it as the outcome of the parent's CreateInsert
    7. Drop a page fragment onto the task flow that is bound to the parent object, and make it the third step in the task flow.
    8. Drop a commit onto the task flow as the forth step, and place the button on the page that invokes the action corresponding to the commit.
    Run it. As soon as the CreateInsert is hit for the child, the error is thrown.
    Another associated bug is that (appears to have the same culprit) the child will not be inserted unless one of it's attributes is set (note that you have to turn off Composition Association to get the above error to disappear). However, the child will not be inserted into the database unless one of its setters are invoked.
    **The workaround is to use CreateWithParams instead of CreateInsert in order to create the parent object, and pass in at least one parameter to set an attribute on the parent (even to blank). The same must be done on the child unless one of it's setters are invoked.
    Note that we're using SQL Server 2008 R2. This appears to be a problem with ADF BC and not with the target DB platform, but I have not tested with Oracle.

  • How to fill the first column '#' of matrix  with row id in user form?

    Hi All,
    I am having a user defined form in which, I m having a matrix and m populating the matrix with the output of an sql query.
    something like this:
    SQL_Str= "select col1,col2,......from.... "
    OPopDBTable.ExecuteQuery(SQL_Str)
    oMatrix.AddRow()
    oMatrix.Columns.Item("Col3").DataBind.Bind("PopTable", "col1")
    oMatrix.Columns.Item("Col2").DataBind.Bind("PopTable", "col2")
    oMatrix.LoadFromDataSource()
    Now, in this, how can I assign row number to first column ('#' column ) ??
    regards,
    Binita

    Ah...the ROW_NUMBER() was posted by Petr - also thank you (again)
    With my example-query from the other thread:
    SELECT
         CAST(
                 ROW_NUMBER() OVER (ORDER BY T1.U_LogNo ASC) AS INT
            ) AS RowCnt,
         T1.Code,
         T1.U_ParcelNo,
         T1.U_LogNo
    FROM
         [@XXX_EXAMPLE] T1
    WHERE
         T1.U_ParcelNo='132006' 
    ORDER BY
         T1.U_LogNo ASC
    ...this works for me (it's quickly copied from several subs/func. - I hope it's not too much disordered):
    DtLogs.ExecuteQuery(query)
    oMtxLogs.Columns.Item("0").DataBind.Bind("DT_LOGS", "RowCnt")
    oMtxLogs.Columns.Item("1")........
    oMtxLogs.LoadFromDataSource()

  • How to add responsibility to an user with an sql script

    Hi All,
    Apps:11.5.10.2
    DB:9.2.0.8
    how can we add a particular responsibilty to mutiple application user at a time with an sql query.
    Thanks
    Sunil

    Hey,
    Thanks for the posting on this. I have been working on this for the past couple of days and found the same "issue". The SQL is working, but the fnd_user_resp_groups 'view' at least in our version doesn't display the 'start_date, end_date, description' correctly. It seems to be hard coded to display:
    start_date = 01/JAN/00
    end_date = NULL
    description = NULL
    I found this out as I was trying to alter the table, but it then I realized it was a view. And if you look at the view details, it will show it is hardcoded.
    You should look at the user_resp_groups_all view. It displays what you have set.

  • Werid problem with PS/SQL

    i am facing trouble with PS/SQL. when i execute the select statement alone in the format
    update revenue a set a.status =
    case when a.amount =
    (select sum(amount)
    from revenue b
    where a.confirmationno=b.confirmationno
    and b.date1 between(a.date1-1) and (a.date1+1)
         and b.trantype='PMT')
    THEN 'C'
    ELSE 'P'
    END
    where a.trseqno=2 and a.trantype='AIR';
    the update works fine. when it is grouped into the declare block like this
    declare v_revenue revenue%rowtype;
    begin
    select * into v_revenue from revenue where trseqno=2;
    update revenue a set a.status =
    case when a.amount =
    (select sum(amount)
    from revenue b
    where a.confirmationno=b.confirmationno
    and b.date1 between(a.date1-1) and (a.date1+1)
         and b.trantype='PMT')
    THEN 'C'
    ELSE 'P'
    END
    where a.trseqno=2 and a.trantype='AIR';
    end;
    i get the following error
    The following error has occurred:
    ORA-06550: line 6, column 1:
    PLS-00103: Encountered the symbol "CASE" when expecting one of the following:
    ( - + mod null <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current max min prior sql stddev sum variance execute
    forall time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string>
    any help would be much appreciated
    thanx

    Unless I'm misreading the documentation set,
    it would depend on which database release
    is used to determine whether CASE is supported
    by PL/SQL or not. The CASE statement in PL/SQL
    is supported in 9i.
    Andy Beene
    [email protected]
    hi,
    Case does not supported in pl/sql.
    Yogi
    [email protected]

  • What will I do with the SQL Server (2012/2014) (Standard/Enterprise) Licenses?

    What will I do with the SQL Server (2012/2014) (Standard/Enterprise) Licenses?
    Are these the same as software product keys, or just some pieces of paper the company needs to have on hand?
    In which case, when we install SQL Server 2014, (and when looked for videos) - there is only 1 product key value to be put in, is there some other screen in the setup to input the License bought ( in our case will be Core licenses).
    So in addition to the Core Licenses do will a Product key be needed? Would product key from an msdn work, as it is the licenses that we will buy to indicate that we bought to run the software on server X?
    Thanks for any indications.

    1. What will I do with the SQL Server (2012/2014) (Standard/Enterprise) Licenses?
    Are these the same as software product keys, or just some pieces of paper the company needs to have on hand?
    2. In which case, when we install SQL Server 2014, (and when looked for videos) - there is only 1 product key value to be put in, is there some other screen in the setup to input the License bought ( in our case will be Core licenses).
    3. So in addition to the Core Licenses do will a Product key be needed? Would product key from an msdn work, as it is the licenses that we will buy to indicate that we bought to run the software on server X?
    Thanks for any indications.
    I will answer your question point wise
    1. Keeping license key is good idea it helps you during audit and you have proof that you are using a valid Microsoft License. Plus in scenario of disaster where whole box gets damanged you might need to install SQL Server again in that case during
    reinstallation on setup page where you need to enter key you might need need it. If you are missing your paper then you are in trouble.
    2. Only on product key page license key is required and it is not required anywhere else during installation. Unless you enter valid product key installation will not proceed further.
    3 License makes you a valid owner of Microsoft product with restrictions on how much hardware resource you can use how much max connections you can make etc. Key lets you install it on Windows machine making sure that you are using valid Microsoft product.
    This was just a general idea please speak to your licensing specialist for more details. This is technical forum and we generally ask user to speak to licensing expert for such queries.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

Maybe you are looking for

  • How do I get windows and excel on my iPad

    I want to use my iPad 2 for my business but need word and excel....how do I do this?

  • How do I transfer my ipod libray from one computer to another?

    I had my library on another computer that I no longer have access to. How do I transfer what is on my ipod onto my itunes library? I don't want to lose my 600+ songs!!

  • Does Anyone know how to delete the backup from iCloud.

    I have a new iPhone, I restored my backup from iCloud, and now I have 2 iphone backups. There´s a message that "It can´t be erased right now, try in other moment". And i received a mail that says I´m running out of space, buy more or go to settings..

  • Need very urgent help

    Hi every1, i am in a very bad situation as i am very new to AS3, so i need some help from any one who can help me out of this. I have created a FLV Player using FLVPlayback Component everything is working fine but the only problem is the rewind and f

  • Cisco ironport esa compressed files

    hi, can a cisco esa c170 filter exe files contained in an attached compressed folder ( .zip, .rar), if it is possible, can any one please help us with the steps to do so? thanks,