How do I summarise a set of data

Hi All,
I am trying to group a set of data but am struggling to return what I need.
The following is a snippet of the data:
SEGMENT1
SEGMENT2
SEGMENT3
SEGMENT4
SEGMENT5
PERIOD_NAME
PERIOD_NET_DR
PERIOD_NET_CR
103600
2256
00
1
000
APR-13
4,157
0
103600
2256
00
1
000
AUG-13
4,157
1
103600
2256
00
1
000
DEC-13
4,157
1
103600
2256
00
1
000
FEB-14
4,157
1
103600
2256
00
1
000
JAN-14
4,157
1
103600
2256
00
1
000
JUL-13
4,157
1
103600
2256
00
1
000
JUN-13
4,157
1
103600
2256
00
1
000
MAR-14
4,188
14
103600
2256
00
1
000
MAY-13
4,157
2
103600
2256
00
1
000
NOV-13
4,157
1
103600
2256
00
1
000
OCT-13
4,157
1
103600
2256
00
1
000
SEP-13
4,157
1
I need to produce a report as follows:
SEGMENT1
SEGMENT2
SEGMENT3
SEGMENT4
SEGMENT5
YEAR_TO_DATE_BUDGET
APRIL-13
May-13
Jun-13
Jul-13
Aug-13
Sep-13
Oct-13
Nov-13
Dec-13
Jan-14
Feb-14
Mar-14
103600
2256
00
1
000
49890
4,157
4,174
4156
4156
4156
4156
4156
4156
4156
4156
4156
4174
Year_to_date_budget = SUM(Period_Net_DR) - SUM(Period_Net_CR)
Monthly budget = Period_net_dr) - Period_Net_CR
I have managed to produce the report up to the year_to_date_budget column.  However I struggling with getting the monthly_budget on the same line.
select GCC.segment1, GCC.segment2, GCC.segment3,  GCC.segment4, GCC.segment5, 
         (sum(GB.PERIOD_NET_DR) - sum(GB.PERIOD_NET_CR)) Year_to_date_Budget
from gl_balances GB
      ,gl_code_combinations GCC
where GB.period_name in ('APR-13','MAY-13','JUN-13','JUL-13','AUG-13','SEP-13','OCT-13','NOV-13','DEC-13','JAN-14','FEB-14','MAR-14')
and GCC.code_combination_id = GB.code_combination_id
and GB.actual_flag = 'B'
and GB.currency_code = 'GBP'
group by GCC.segment1, GCC.segment2, GCC.segment3, GCC.segment4, GCC.segment5
Any help would be greatly appreciated.

Hi,
That's called a Pivot.  The forum FAQ, https://forums.oracle.com/message/9362005 , has several good links on pivots.
Even more than most things, pivoting depends on your Oracle version.  In Oracle 8.1 (and up) you can do something like
SUM (CASE WHEN period_name = 'APR-13' THEN (period_net_dr - period_net_cr END)  AS april_13
for each of the pivoted column.  Starting in Oracle 11.1, you can also use the SELECT ... PIVOT feature.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Simplify the problem as much as possible.  for example, instead of pivoting 12 months, just do 2 or 3 months.  Once you know how to do 2 or 3 months, you'll know how to do 12 or any number.   Likewise, instead of GROUPing BY 5 segment columns, just post a problem with 1 or 2.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002

Similar Messages

  • How can I plot two sets of data points in 3d graph?

    I am trying to plot two sets of data points in 3d graph. I also need to make a set of data with one color and the other set with a different color. For example, I need to plot 10 (x,y,z) data points in 3d. Maybe 6 points need to be blue, and the other 4 red. Could you tell me how?

    What is your LabVIEW version? (things are a bit different in 8.6).
    Basically, you create multiple instances of the VI that gets placed automatically when you drop the 3D graph and then wire a different number to the plot ID at the bottom.
    You define all the plots (color, style) via the properties dialog.
    Have a look at my example posted here. One plot is "blue dots" and one is a "shaded surface". See how far you get.
    Message Edited by altenbach on 04-23-2009 01:11 PM
    LabVIEW Champion . Do more with less code and in less time .

  • How to split out a set of data????

    package mitsim_converter;
    import java.io.*;                            // For input & output classes
    import java.util.*;                          // For the Date class
    public class testgod {
    public static void ReadCoFile(String Co_inputFile, String Co_dirName, String Co_outputName)
        throws IOException {
        File aFile = new File(Co_dirName, Co_outputName); // Output Directory location and name
         aFile.createNewFile();         // Now create a new file if necessary
         if(!aFile.isFile())             // Verify we have a file
           System.out.println("Creating " + aFile.getPath() + " failed.");
           return;
    BufferedReader in = new BufferedReader(new FileReader(Co_inputFile));
    BufferedWriter out = new BufferedWriter(new FileWriter(aFile.getPath(), true));
    //Variable declarations
         int a = 0;
         int b = 0;
         int c = 0;
         String text;
       while ((text = in.readLine()) != null)  //multiple line reading
          for(int i = 0; i < text.length(); i++)
              char word = text.charAt(i);
                  if ( word == '{')     //search for the ' { ' charecter
                      a++;              //counting ' { '  unit
          for(int i = 0; i < text.length(); i++)
              char word = text.charAt(i);
                  if ( word == '}')     //search for the ' } ' charecter  
                      b++;              //counting ' } '  unit
          if(a == 1)      //print out the 1st line of a set of data
              String[] sentance = text.split(" ");
              System.out.println(sentance[1]+sentance[3]); 
      if(a == b)        // 1 set of data is counted
          a = 0;        //count the next set of data
          b = 0;
          out.write(System.getProperty("line.separator")); //separate a new set of data
        public testgod() {
        public static void main(String[] args)
      throws IOException
    // Coordinate Table     
           String tra_inputFile = "C:/Documents and Settings/seng/Desktop/testfile/trajectory.txt";     
           String tra_dirName = "C:/Documents and Settings/seng/Desktop/testfile";
           String tra_outputName = "trajectory_output.txt";
           ReadCoFile(tra_inputFile, tra_dirName, tra_outputName);
    } currently i have a set of data as below:
    1 {
    6 0 2 1037.9 24.4187 -5.4961e-05 1
    2 {
    1 0 2 1013.5 24.4187 4.99431e-05 1
    4 0 1 1057.5 24.4187 -2.63508e-05 0
    3 130 264 115.7 14.2425 1.48289e-05 0
    2 136 276 464.7 11.6186 -3.46263e-06 1
    3 {
    1 0 2 989.1 24.4187 -5.4961e-05 1
    4 0 1 1033.1 24.4187 2.13329e-05 0
    5 126 256 1241.4 22.7881 0 0
    3 130 264 101.5 14.2426 5.23758e-07 0
    2 136 276 453.1 11.6186 -3.46263e-06 1
    }i wish to split them and take out the 1st column and 3rd column data, but the my coding fail to do it. may i know how do i can solve for this problem?
    PS: the expected output
    6 2
    1 2
    4 1
    3 264
    2 276
    1 2
    4 1
    5 256
    3 264
    2 276

    import java.util.regex.*;
    public class TestParse {
      public static void main(String[] argv) {
        String testInput = "1 {\n" +
          " 6 0 2 1037.9 24.4187 -5.4961e-05 1\n" +
          "}\n" +
          "2 {\n" +
          " 1 0 2 1013.5 24.4187 4.99431e-05 1\n" +
          " 4 0 1 1057.5 24.4187 -2.63508e-05 0\n" +
          " 3 130 264 115.7 14.2425 1.48289e-05 0\n" +
          " 2 136 276 464.7 11.6186 -3.46263e-06 1\n" +
          "}\n" +
          "3 {\n" +
          " 1 0 2 989.1 24.4187 -5.4961e-05 1\n" +
          " 4 0 1 1033.1 24.4187 2.13329e-05 0\n" +
          " 5 126 256 1241.4 22.7881 0 0\n" +
          " 3 130 264 101.5 14.2426 5.23758e-07 0\n" +
          " 2 136 276 453.1 11.6186 -3.46263e-06 1\n" +
          "}\n";
        Pattern outer =
          Pattern.compile("\\s*(\\d+)\\s*\\{([\\s\\d\\.\\-\\+e]+)\\}");
        Pattern inner = Pattern.compile("LEFT AS EXERCISE");
        Matcher m = outer.matcher(testInput);
        while(m.find()) {
          if (m.groupCount() != 2) {
            System.err.println("Error: found wrong number of groups: " + m.groupCount());
          } else {
            System.out.print("Time: " + m.group(1) + " " + m.group(2));
            Matcher m2 = inner.matcher(m.group(2));
            while(m2.find()) {
              if (m2.groupCount() != 7) {
                System.err.println("Error: found wrong number of groups: " + m2.groupCount());
              } else {
                int i = 0;
                String iDString = m2.group(++i);
                String segmentString = m2.group(++i);
                String laneString = m2.group(++i);
                String positionString = m2.group(++i);
                String speedString = m2.group(++i);
                String accelerationString = m2.group(++i);
                String vehicleTypeString = m2.group(++i);
                System.out.println(
                  "ID: " + iDString + "\n" +
                  "Segment: " + segmentString + "\n" +
                  "Lane: " + laneString + "\n" +
                  "Position: " + positionString + "\n" +
                  "Speed: " + speedString + "\n" +
                  "Acceleration: " + accelerationString + "\n" +
                  "VehicleType: " + vehicleTypeString);
    }

  • How to seperate a certain set of data..?

    Hi everyone. I am making a measurement. In this measurement there are let say 1000 value. I want to take 100 specific value for further analysis. For this, I want to index those data which I want and calculate them, then continue doing next measurement.
    Let say, I am measuring voltage at every 100K temperature. As you can see from the picture. At 100K I am measuring voltage likte this. Here what I want is to take this data which is red to calculate something.  I am looking forward your ideas. Best and thanks in advance.

    there is my vi. what I want to do is; there are two temperature values. I set both of them to the specific temperature value, and wait for the stability. As stability achieved, set one of the temperature again; here my measurement starts, measure the dT and dV simultaneously. As the temperature level achieved the same level, stop the measurement and index these dV and dT to calculate.
    example;
    set T1=300K, T2=300K, as they are stable
    set T1=305K, T2=300K, start recording dV and dT and AverageT
    as T1=305K =>>set T!1=300K; continue recording dV and dT and AverageT
    as T1=300K, T2=300K, stop recording, set new temperature.
    Best.
    Attachments:
    Read Condition_SC_sub.vi ‏70 KB
    Stability_control - 5K.vi ‏28 KB
    Stability_control.vi ‏30 KB

  • How to use BAPI_OBJCL* to set classification data for Techn. Objects - PM ?

    Good afternoon !
            I´m working in a project to integrate some legacy system with the ECC 6.0, and I need to do some activities like, create functional locations and equipments in SAP PM, I have done this creating Z RFC modules that call bapis like BAPI_FUNCLOC_CREATE and BAPI_EQUI_CREATE, but these BAPIs doesn´t fill classification data, so, in a first moment, I solved this using BDC, but I would like to solve these needs using standard BAPIs if possible.
            To solve the classification, I tried to do it using the BAPI_OBJCL* BAPIs(BAPI_OBJCL_GET_KEY_OF_OBJECT, BAPI_OBJCL_CREATE_KEY), but I didn´t find any example of using these bapis with technical objects, so I tried to test the BAPI_OBJCL_GET_KEY_OF_OBJECT in a first moment and, when I call it passing '003' as classtype(003 is the classtype for the functional locations), this bapi returns me "Class type 003 requires additional objects"(the same occurs if I try it with 002, for equipment). What means this message ? Need I to do some customization in img/spro, or cannot these bapis be used with PM technical objects ?
            Thank you for your attention,
            Wilson

    Hi all !
            I have found the solution for this problem, I found that I was trying to use the wrong functions for my case, so, to solve my needs here, I will use BAPI_OBJCL_CREATE to set the classification data for Functional Locations and Equipments, and I can use BAPI_OBJCL_GETCLASSES to list all classes assigned for a Technical Object, and BAPI_OBJCL_GETDETAIL to get all characteristics assigned to a Technical Object for a specific class.
            Thank you all for your attention !
            Wilson

  • How to avoid exception when setting a date in an Edit control?

    I'm have made a Coded UI Test with VS 2012 for a web application of a colleague.
    In that web application is a table with some entry fields of type Edit.
    In one of these fields (called "DatumAb") i can enter a date in format "dd.mm.yyyy" (day, month and year).
    Coded UI Test identifies the control by the name "von (tt.mm.jjjj)", which is in fact just a placeholder.
    When i replay my recording i get an exception which says, that either the control is not ready or not valid.
    Next i have called the DrawHighlight method for that control.
    While the replay i can see the blue frame, so the control is accessible.
    Can anybody tell me, what's going wrong?
    Here an excerpt from the HTML-Code of the web application with the date field:
    <table class="table table-hover table-bordered table-condensed table-well table-responsive">
      <thead>
        <tr>
          <th class="ng-scope" translate="global.datum.Von">von</th>
        </tr>
      </thead>
      <tbody>
        <!-- ngRepeat: vb in vm.formData.Vorbeschaeftigungen -->
        <tr class="ng-scope" ng-repeat="vb in vm.formData.Vorbeschaeftigungen">
          <td>
            <input value="11.02.2015" rm-date-input="" ng-model="vb.DatumAb" class="form-control ng-pristine ng-untouched ng-valid ng-valid-rm-date-input ng-valid-rm-date-input-format
    ng-valid-rm-date-input-day ng-valid-rm-date-input-month ng-valid-rm-date-input-year" placeholder="von (tt.mm.jjjj)" type="text">
          </td>
    And at last the exception message.
    Sorry - only in german.
    Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotAvailableException wurde nicht von Benutzercode behandelt.
      HResult=-268111872
      Message=Das Steuerelement ist nicht verfügbar oder nicht gültig. Weitere Details:
    TechnologyName:  "MSAA"
    Name:  "von (tt.mm.jjjj)"
    ControlType:  "Edit"
      Source=Microsoft.VisualStudio.TestTools.UITesting
      BasicMessage=Das Steuerelement ist nicht verfügbar oder nicht gültig.
      StackTrace:
           bei Microsoft.VisualStudio.TestTools.UITesting.Playback.AddUITestControlDescriptionToException(SystemException exception, IPlaybackContext context)
           bei Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)
           bei Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String actionName, UITestControl uiControl)
           bei Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String actionName, Object parameterValue, UITestControl uiControl)
           bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyValue(String propertyName, Object propertyValue)
           bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyPrivate(String propertyName, Object value)
           bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<>c__DisplayClass14.<SetProperty>b__13()
           bei Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
           bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetProperty(String propertyName, Object value)
           bei Microsoft.VisualStudio.TestTools.UITesting.WinControls.WinEdit.set_Text(String value)
           bei TestMitVorbeschaeftigungen.UIMap.DatumVon() in c:\CodedUiTests\Tests mit Webanwendung\TestMitVorbeschaeftigungen\TestMitVorbeschaeftigungen\UIMap.Designer.cs:Zeile 92.
           bei TestMitVorbeschaeftigungen.CodedUITest1.CodedUITestMethod1() in c:\CodedUiTests\Tests mit Webanwendung\TestMitVorbeschaeftigungen\TestMitVorbeschaeftigungen\CodedUITest1.cs:Zeile 37.
      InnerException: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotAvailableException
           HResult=-268111872
           Message=Das Steuerelement ist nicht verfügbar oder nicht gültig.
           Source=Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa
           BasicMessage=Das Steuerelement ist nicht verfügbar oder nicht gültig.
           StackTrace:
                bei Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa.MsaaUtility.MapAndThrowException(SystemException e, Boolean throwNotSupported)
                bei Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa.AccWrapper.set_Value(String value)
                bei Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa.MsaaElement.set_Value(String value)
                bei Microsoft.VisualStudio.TestTools.UITesting.WinPropertyProvider.SetValueInEditableControl(UITestControl editControl, String propertyValue)
                bei Microsoft.VisualStudio.TestTools.UITesting.WinPropertyProvider.SetEditProperty(String propertyName, Object value)
                bei Microsoft.VisualStudio.TestTools.UITesting.WinPropertyProvider.SetPropertyValue(UITestControl uiControl, String propertyName, Object value)
                bei Microsoft.VisualStudio.TestTools.UITesting.UITestPropertyProvider.SetPropertyValueWrapper(UITestControl uiControl, String propertyName, Object value)
                bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyValue(String propertyName, Object propertyValue)
           InnerException: System.NotImplementedException
                HResult=-2147467263
                Message=Die Methode oder der Vorgang ist nicht implementiert.
                Source=Accessibility
                StackTrace:
                     bei Accessibility.IAccessible.set_accValue(Object varChild, String pszValue)
                     bei Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa.AccWrapper.set_Value(String value)
                InnerException:

    Hi Patrick Pirzer,
    >>That either the control is not ready or not valid.
    Next i have called the DrawHighlight method for that control.
    My suggestion is that you would check whether this control is really existing when playback actions run on this control. Or add a wait event would be better.
    http://blogs.msdn.com/b/gautamg/archive/2010/02/12/how-to-make-playback-wait-for-certain-event.aspx
    Reference:
    http://stackoverflow.com/questions/11737254/codedui-test-not-waiting-for-control-to-exist
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to use "By Experssion" setting Expiration Date "

    I'm trying to use the "By Expression" choice under the Expiration and Escalation Policy of BPEL Human Task Editor to set the expiration time stored in a global variable, as shown below:
    <globalConfiguration>
    <expirationDuration duration="bpws:getVariableData('Review_1_globalVariable', 'payload', '/task:task/task:systemAttributes/task:expirationDuration')" type="XPATH"/>
    </globalConfiguration>
    But this is not working for me.
    Additional info related to this follows:
    The 'Review_1_globalVariable' holds an expiration duration time of 'PT1H' (one hour from current time), which I provide as input from the console when I run the instance, and I copy it to this globalVariable as part of the AssignTaskAttributes phase of the Human Task.
    The big picture of what I'm trying to set up in the expiration policy is that after the expirationDuration for the "Group Vote" expires, the task gets assigned back to the initiator. I have this policy working when I use the "Fixed Duration" of say, 5 minutes at the global routing policy and 2 minutes for the assignees of the "Group Vote" (under advanced). But the problem I'm having is to use a XPATH expression to set the duration times given by the front end application.
    Can anyone help me with the use of an expression to set this policy?
    Thanks,
    Message was edited by:
    call

    Use a JFormattedTextField with a SimpleDateFormat in parameter.
    Denis

  • Java setting system date

    Hi,
    How should i going to set the date to be display realtime?
    As the system date change it would update my displaydate too.
    Please help

    Use a thread or java.util.Timer*

  • HT1660 How can I maintain two separate itunes accounts on one single device without erasing either set of data?

    How can I maintain two separate itunes accounts on one single device (iPhone 4) without erasing either set of data when syncing with itunes?

    Hi,
    Depends on what you trying to setup but for purchases, you can roll down at the very end of the iTunes/AppStore pages to logout of your current account and then login into a different one.  Then your purchase will be billded to this new account.  Everything will sync as you used to but in order to use the purchased content in iTunes or other devices, you will need to authorize them (you can have up to 5 devices authorized for an account).

  • How can I set the data binding between Web Dynpro & Database table

    Dear friend,
    I am a beginner of Web Dynpro. I want to develop my simple project like these:
    1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
    2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
    For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
    1. How can I set the data binding between Web Dynpro and Database table ?
    2.  Are there any nescessary steps that I will concern for this case?
    Sorry if my question is simple, I had try  to find solution myself, but it not found
    Thanks in advances,
    SeMs

    Hi,
    You can write your own connection class for establishing the connection with DB.
    Ex:
    public class  ConnectionClass {
    static Connection con = null;
    public static Connection getConnection() {
    try{
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
    con = ds.getConnection();
    return con;
    }catch(Exception e){
    return null;
    You can place the above class file in src folder and you can use this class in webdynpro.
    You can have another UserInfo class for reading and writing the data into the DB .
    Regards, Anilkumar
    PS : Refer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Message was edited by: Anilkumar Vippagunta

  • How to restrict a table with its set of data based on a column value in it?

    Hi,
    I have a scenario in which I have to show a set of data of a pivot table by restricting data based on a column value. I am creating BIP report whose source is from BIA ie.RPD. Based on a column value I want to restrict the data being displayed in the table. Since I also want the hidden data in the first table to be displayed in another table in the same report I cannot restrict the data at the query level i.e at RPD or at BIA. For this reason I used
    <?xdofx:if saw3_ = 1?>
    the pivot table
    <?end if?>
    But it does not restrict any data.
    Also I tried using the if condition inside the table before the row level looping happens. But no good show even then.
    How can I forgo this problem?
    Regards,
    The MM

    Hi,
    See : http://download.oracle.com/docs/cd/E12096_01/books/PubUser/T421739T481157.htm#4535373 regarding column and row.
    Regards,
    Colectionaru

  • How to set JDBC Data Sources in Oracle MapViewer for Oracle database 12c Release 1 (12.1.0.1)

    How to set JDBC Data Sources in Oracle MapViewer for Oracle database 12c Release 1 (12.1.0.1)?
    The following is my configuration in the conf\mapViewerConfig.xml:
    <map_data_source name="mvdemo12"
    jdbc_host="127.0.0.1"
    jdbc_sid="orcl12c1"
    jdbc_port="1522"
    jdbc_user="mvdemo"
    jdbc_password="7OVl2rJ+hOYxG5T3vKJQb+hW4NPgy9EN"
    jdbc_mode="thin"
    number_of_mappers="3"
    allow_jdbc_theme_based_foi="true"
    editable="true"/>
    <!--  ****  -->
    But it does not work.
    After use "sqlplus mvdemo/[email protected]:1522/pdborcl", it connected to the Oracle database 12c.
    Does anyone know it?
    Thanks,

    For 11.1.1.7.1 use the syntax for jdbc_sid, i.e.
    //mypdb1.foo.com as described in the README,
    - MapViewer native (non-container) data sources can now use database service name in place of SID. To supply a db service name, you will use the same jdbc_sid attribute, but specify the service name with double slashes in front, such as follows:
      <map_data_source name="myds"
        jdbc_host="foo.com"
        jdbc_sid="//mypdb1.foo.com"
        jdbc_port="1522"
      />
    For 11.1.1.7.0 use a container_ds instead.
    i.e. instead of using
    <map_data_source name="my_12c_test"
                       jdbc_host="mydbinstance"
                       jdbc_sid="pdborcl12c"
                       jdbc_port="1522"
                       jdbc_user="mytestuser"
                       jdbc_password="m2E7T48U3LfRjKwR0YFETQcjNb4gCMLG8/X0KWjO00Q="
                       jdbc_mode="thin"
                       number_of_mappers="6"
                       allow_jdbc_theme_based_foi="false"
                       editable="false"
       />
    use
      <map_data_source name="my_12c_test"
                       container_ds="jdbc/db12c"
                       number_of_mappers="6"
                       allow_jdbc_theme_based_foi="false"
                       editable="false"
       />
    In my case the Glassfish 3.1.2.2 JDBC connection pool definition was
    Property
    url  jdbc:oracle:thin:@mydbinstance:1522/pdborcl12c.rest_of.service.name
    Uncheck the Wrap JDBC Objects option in Advanced panel, i.e. the Edit JDBC Connection Pool Advanced properties page.
    Add a JDBC resource for that newly created pool
    Use that in mapviewerconfig.xml as above

  • How to transfer a set of data from Excel spread sheet to an Access database

    hi,
    Can any one please tell me how to transfer a set of data from Excel spread sheet to an Access database using SQL query.I'm using java API currently. I have done all sorts of ODBC connection in administrative tools.The file is in correct location. I have done certain coding but with errors.Help me to get rid of these errors,
    Coding:*
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection datacon=DriverManager.getConnection("jdbc:odbc:exdata","",""); *//For Excel driver*
    Connection datacon1=DriverManager.getConnection("jdbc:odbc:stock1","",""); *// For mdb driver*
    Statement datast=datacon.createStatement();
    Statement datast1=datacon1.createStatement();
    ResultSet excelrs=datast.executeQuery("select item_code,sdata,closing_stock from phy "); *//phy is the excel file*
    while(excelrs.next())
    String ic=excelrs.getString("item_code");
    System.out.println(ic);
    String d=excelrs.getString("sdate");
    double cs=excelrs.getDouble("closing_stock");
    int dbrs=datast1.executeUpdate("insert into second values('"+ic+"','"+d+"',"+cs+")"); *//second is the mdb*
    excelrs.close();
    }catch(Exception e)
    System.out.println(e);
    Error:*
    java.sql.SQLException: [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'C:\JavaGreen\phy.xls'. Make sure the object exists and that you spell its name and the path name correctly.
    thanks,
    kumar.

    JAVA_GREEN wrote:
    No i haven't mixed up.But the file from where i have to retrieve the data is in csv format.Even though i created another csv driver.and tried but i cud not find a solution to load/transfer a set of records from one file(in Excel/csv format) to another file(in mdb format).plz help me.Is there any other methods for this data transfer.A csv file is NOT an excel file.
    The fact that Excel can import a csv file doesn't make it an excel file.
    If you have a csv file then you must use a csv driver or just use other code (not jdbc) to access it. There is, normally, a ODBC (nothing to do with java) text driver that can do that.

  • How to set a date range for date field ?

    Dear Experts,
    Scenario:
    I have a query in validating the date field in my BSP application. My application is for maintain infotype 0023 Other/Previous Employers online by employees in the company.
    As per our design we are maintaining the all employment details of the employee both ( with in the current company / previous employment outside the company) in the same infotype.
    Every employee will have a hiring date within the SAP HR system. We consider this date as the cutoff date between current and previous employment in our application. When the employee updating the details wia BSP page I need to check the following.
    Record inside current company: Validation that, the user should only able to enter BEGIN DATE (BEGDA)  greater than or equal HIRING DATE and END DATE(ENDDA) should be greater than FROM  DATE (BEGDA).
    Record outside current Company: Validation that, the user should only able to enter BEGIN DATE (BEGDA)  less than or equal HIRING DATE and END DATE (ENDDA) should be greater than FROM  DATE (BEGDA) and less than HIRING DATE.
    Technical Requirement:
    How to set a date range for date field, i.e. how we can limit the date range in a HTMLB date field? Can this it be achieved via standard functionality of HTMLB?
    Following is the code to describe date field in my application.
        <htmlb:inputField id= "ENDDA_NEW_IN"
                          type= "date"
                    doValidate= "TRUE"
                      showHelp= "TRUE"
                      disabled= "FALSE"
                         width= "183"
                         style= "cssTextAreadate"
                         value= "<%='99991231'%>"/>
    Thanks a lot in advance for your assistance and help.
    Cibinu2026
    Edited by: cibin kuruvilla on Nov 12, 2008 11:13 AM

    Hi,
    This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
    Regards,
    <p>Blair Wheadon</p>
    <p>Product Manager, Crystal Reports</p>

  • How to set todays date in message date input field in uix

    Hello everybody,
    Im using jdeveloper 9015+adf+uix
    I am having an input form and in that i want to set the date input field with the current date(default value).
    Does anybody of you know how I should do this.
    Any help is appreciated,
    Thanks in advance

    Hi,
    Did you figure out on how to default system date in a date input field??
    I have a similar requirement in OA framework. Please let me know if you have any ideas.
    Thanks,
    vinay.

Maybe you are looking for

  • IDOC BOMMAT Is Not Received In Target System

    Dear Expert, I have one problem about ALE. I have distribution model between my system and partner system in other region. This distribution model is set up in my system to receive BOMMAT, MATMAS, BOMORD, DOCMAS, ECMMAS, and SERDAT. From my side, onl

  • 'DYNP_VALUES_UPDATE'

    Hello experts, i m developing one screen , in that i put one F4 help,  there are two fields doc & doc Date. i want when user select that doc no. corresponding date will appear in date field.I m using FM 'DYNP_VALUES_UPDATE' to update.   call function

  • Since windows 8.1 usb ports and sound are acting strange

    Hello, Since I upgraded to windows 8.1 my sound randomly stutters(very anoying) and my usb ports get turned off, only the ports that have been occupied since boot, new things work, and not reinsterting the things that were present at boot, in the sam

  • Black screen after login / sleep

    Hoping somebody can help, I've spent like the last two days straight at the genius bar without success. When I boot up I see my profile and the guest, it boots as normal (not the delayed boot with black screen others have mentioned), but then I log i

  • Upgrading from iphone 4s, is the 5c good phone

    i have a iphone 4s as my current phone but want to get a iphone again cant afford to much is the iphone 5c a good phone and is that phone going to be around for many years still