Query regarding Inline Query and a Join.Please see

I have a query regarding Inline Queries
I have 2 tables
TRADE and POSTING
TRADE has Primary Key:id_trade_ref and POSTING has Foriegn.Key: id_trade_ref
id_trade_ref 5V973781B has 5 records in POSTINGS
If i need to join these 2 tables,I use
1) Select t.id_entity,t.id_trade_ref,p.am_stock
   from trade t,posting p
   where t.id_trade_ref = '5V973781B'
   and   p.id_trade_ref = '5V973781B'
2) Now I can use the same as an Inline Query:
   select
   t.id_entity,
   t.id_trade_ref,
   (  select p1.am_stock 
      from posting p1
      where p1.id_entity =  t.id_entity
      and   p1.id_trade_ref= t.id_trade_ref
      and   p1.id_posting_type in ( 'NEW', 'CAN')
from
trade t
where t.id_entity = 'DBL'
and   t.id_trade_ref = '5V973781B'
My Query:
Of the two,which is a better option to use.?
Is Inline a better option or a normal join?

I would rewrite the first one to:
Select t.id_entity,t.id_trade_ref,p.am_stock
from trade t,posting p
where t.id_trade_ref = '5V973781B'
and p.id_trade_ref = t.id_trade_ref
This way, you really make the join between the table.
I think the join is better because it uses less code. I do not think you will notice much performance win between one or the other, especially because it concerns only a few rows.

Similar Messages

  • A Query regarding 'Events' published and 'Event' subscribed

    I have a query regarding 'Events' and 'EventHandling' in Java Swing.
    Swing in an EVENT based application whereby 'events' are generated
    by interacting with the components.
    Eg: Clicking on a Button generates an 'ActionEvent' and every event
    generated has an associated 'EventListener'.
    Now,my question is:
    a)When an event is generated,(let's say by clicking a button),
    an 'event' is published,right?
    That means that there is an 'Event Publisher'.
    In the above case,the Button is the 'Publisher' of the event,right?
    b) Who are the subscribers for the events generated?
    Where do we specify the 'subscibers' to the events generated?(and once
    the subscribers get the Event,the subscriber will call the methods
    of the event object)
    We just say
       addButton.addActionListener(new ButtonHandler);
       private class ButtonHandler implements ActionListener {
            public void actionPerformed(ActionEvent e){
      In the above code :
    a) Who is the Event Publisher?
    b) Who is the Event Subscriber?
    No offence meant for the question.

    The 'event publisher' for the mouse click is the ToolKit implementation (translates the OS mouse event to a Java mouse event).
    The 'event subscriber' for the mouse click on a button is typically a ButtonUI (you can add a mouse listener directly though).
    The 'event publisher' for the action event is the ButtonModel (notified by the ButtonUI when the button is unpressed, etc).
    The 'event subscriber' for the action event are the action listeners.

  • Basic query regarding work-area and select query

    hi
    dear sdn members,
    thanks too all for solving all my query's up till now
    i am stuck in a problem need help
    1)  why basically work-area has been used ? the sole purpose
    2)  different types of select query ? only coding examples
    note: no links pls
    regards,
    virus

    hi,
    Work Area
    Description for a data object that is particularly useful when working with internal tables or database tables as a source for changing operations or a target for reading operations.
    WORKAREA is a structure that can hold only one record at a time. It is a collection of fields. We use workarea as we cannot directly read from a table. In order to interact with a table we need workarea. When a Select Statement is executed on a table then the first record is read and put into the header of the table and from there put into the header or the workarea(of the same structure as that of the table)of the internal table and then transferred top the body of the internal table or directly displayed from the workarea.
    Each row in a table is a record and each column is a field.
    While adding or retrieving records to / from internal table we have to keep the record temporarily.
    The area where this record is kept is called as work area for the internal table. The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    .g.
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    The header line is a field string with the same structure as a row of the body, but it can only hold a single row.
    It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table. It is the default work area for the internal table.
    With header line
    SELECT.
    Put the curson on that word and press F1 . You can see the whole documentation for select statements.
    select statements :
    SELECT result
    FROM source
    INTO|APPENDING target
    [[FOR ALL ENTRIES IN itab] WHERE sql_cond]
    Effect
    SELECT is an Open-SQL-statement for reading data from one or several database tables into data objects.
    The select statement reads a result set (whose structure is determined in result ) from the database tables specified in source, and assigns the data from the result set to the data objects specified in target. You can restrict the result set using the WHERE addition. The addition GROUP BY compresses several database rows into a single row of the result set. The addition HAVING restricts the compressed rows. The addition ORDER BY sorts the result set.
    The data objects specified in target must match the result set result. This means that the result set is either assigned to the data objects in one step, or by row, or by packets of rows. In the second and third case, the SELECT statement opens a loop, which which must be closed using ENDSELECT. For every loop pass, the SELECT-statement assigns a row or a packet of rows to the data objects specified in target. If the last row was assigned or if the result set is empty, then SELECT branches to ENDSELECT . A database cursor is opened implicitly to process a SELECT-loop, and is closed again when the loop is ended. You can end the loop using the statements from section leave loops.
    Up to the INTO resp. APPENDING addition, the entries in the SELECTstatement define which data should be read by the database in which form. This requirement is translated in the database interface for the database system´s programming interface and is then passed to the database system. The data are read in packets by the database and are transported to the application server by the database server. On the application server, the data are transferred to the ABAP program´s data objects in accordance with the data specified in the INTO and APPENDING additions.
    System Fields
    The SELECT statement sets the values of the system fields sy-subrc and sy-dbcnt.
    sy-subrc Relevance
    0 The SELECT statement sets sy-subrc to 0 for every pass by value to an ABAP data object. The ENDSELECT statement sets sy-subrc to 0 if at least one row was transferred in the SELECT loop.
    4 The SELECT statement sets sy-subrc to 4 if the result set is empty, that is, if no data was found in the database.
    8 The SELECT statement sets sy-subrc to 8 if the FOR UPDATE addition is used in result, without the primary key being specified fully after WHERE.
    After every value that is transferred to an ABAP data object, the SELECT statement sets sy-dbcnt to the number of rows that were transferred. If the result set is empty, sy-dbcnt is set to 0.
    Notes
    Outside classes, you do not need to specify the target area with INTO or APPENDING if a single database table or a single view is specified statically after FROM, and a table work area dbtab was declared with the TABLES statement for the corresponding database table or view. In this case, the system supplements the SELECT-statement implicitly with the addition INTO dbtab.
    Although the WHERE-condition is optional, you should always specify it for performance reasons, and the result set should not be restricted on the application server.
    SELECT-loops can be nested. For performance reasons, you should check whether a join or a sub-query would be more effective.
    Within a SELECT-loop you cannot execute any statements that lead to a database commit and consequently cause the corresponding database cursor to close.
    SELECT - result
    Syntax
    ... lines columns ... .
    Effect
    The data in result defines whether the resulting set consists of multiple rows (table-like structure) or a single row ( flat structure). It specifies the columns to be read and defines their names in the resulting set. Note that column names from the database table can be changed. For single columns, aggregate expressions can be used to specify aggregates. Identical rows in the resulting set can be excluded, and individual rows can be protected from parallel changes by another program.
    The data in result consists of data for the rows lines and for the columns columns.
    SELECT - lines
    Syntax
    ... { SINGLE }
    | { { } } ... .
    Alternatives:
    1. ... SINGLE
    2. ... { }
    Effect
    The data in lines specifies that the resulting set has either multiple lines or a single line.
    Alternative 1
    ... SINGLE
    Effect
    If SINGLE is specified, the resulting set has a single line. If the remaining additions to the SELECT command select more than one line from the database, the first line that is found is entered into the resulting set. The data objects specified after INTO may not be internal tables, and the APPENDING addition may not be used.
    An exclusive lock can be set for this line using the FOR UPDATE addition when a single line is being read with SINGLE. The SELECT command is used in this case only if all primary key fields in logical expressions linked by AND are checked to make sure they are the same in the WHERE condition. Otherwise, the resulting set is empty and sy-subrc is set to 8. If the lock causes a deadlock, an exception occurs. If the FOR UPDATE addition is used, the SELECT command circumvents SAP buffering.
    Note
    When SINGLE is being specified, the lines to be read should be clearly specified in the WHERE condition, for the sake of efficiency. When the data is read from a database table, the system does this by specifying comparison values for the primary key.
    Alternative 2
    Effect
    If SINGLE is not specified and if columns does not contain only aggregate expressions, the resulting set has multiple lines. All database lines that are selected by the remaining additions of the SELECT command are included in the resulting list. If the ORDER BY addition is not used, the order of the lines in the resulting list is not defined and, if the same SELECT command is executed multiple times, the order may be different each time. A data object specified after INTO can be an internal table and the APPENDING addition can be used. If no internal table is specified after INTO or APPENDING, the SELECT command triggers a loop that has to be closed using ENDSELECT.
    If multiple lines are read without SINGLE, the DISTINCT addition can be used to exclude duplicate lines from the resulting list. If DISTINCT is used, the SELECT command circumvents SAP buffering. DISTINCT cannot be used in the following situations:
    If a column specified in columns has the type STRING, RAWSTRING, LCHAR or LRAW
    If the system tries to access pool or cluster tables and single columns are specified in columns.
    Note
    When specifying DISTINCT, note that you have to carry out sort operations in the database system for this.
    SELECT - columns
    Syntax
    | { {col1|aggregate( col1 )}
    {col2|aggregate( col2 )} ... }
    | (column_syntax) ... .
    Alternatives:
    1. ... *
    2. ... {col1|aggregate( col1 )}
    {col2|aggregate( col2 )} ...
    3. ... (column_syntax)
    Effect
    The input in columns determines which columns are used to build the resulting set.
    Alternative 1
    Effect
    If * is specified, the resulting set is built based on all columns in the database tables or views specified after FROM, in the order given there. The columns in the resulting set take on the name and data type from the database tables or views. Only one data object can be specified after INTO.
    Note
    If multiple database tables are specified after FROM, you cannot prevent multiple columns from getting the same name when you specify *.
    Alternative 2
    ... {col1|aggregate( col1 )}
    {col2|aggregate( col2 )} ...
    Effect
    A list of column labels col1 col2 ... is specified in order to build the resulting list from individual columns. An individual column can be specified directly or as an argument of an aggregate function aggregate. The order in which the column labels are specified is up to you and defines the order of the columns in the resulting list. Only if a column of the type LCHAR or LRAW is listed does the corresponding length field also have to be specified directly before it. An individual column can be specified multiple times.
    The addition AS can be used to define an alternative column name a1 a2 ... with a maximum of fourteen digits in the resulting set for every column label col1 col2 .... The system uses the alternative column name in the additions INTO|APPENDING CORRESPONDING FIELDS and ORDER BY. .
    Column labels
    The following column labels are possible:
    If only a single database table or a single view is specified after FROM, the column labels in the database table - that is, the names of the components comp1 comp2... - can be specified directly for col1 col2 ... in the structure of the ABAP Dictionary.
    If the name of the component occurs in multiple database tables of the FROM addition, but the desired database table or the view dbtab is only specified once after FROM, the names dbtab~comp1 dbtab~comp2 ... have to be specified for col1 col2 .... comp1 comp2 ... are the names of the components in the structure of the ABAP Dictionary.
    If the desired database table or view occurs multiple times after FROM, the names tabalias~comp1 tabalias~comp2 ... have to be specified for col1 col2 .... tabalias is the alternative table name of the database table or view defined after FROM, and comp1 comp2 ... are the names of the components in the structure of the ABAP Dictionary.
    The data type of a single column in the resulting list is the datatype of the corresponding component in the ABAP Dictionary. The corresponding data object after INTO or APPENDING has to be selected accordingly.
    Note
    If multiple database tables are specified after FROM, you can use alternative names when specifying single columns to avoid having multiple columns with the same name.
    Example
    Read specific columns of a single row.
    DATA wa TYPE spfli.
    SELECT SINGLE carrid connid cityfrom cityto
    INTO CORRESPONDING FIELDS OF wa
    FROM spfli
    WHERE carrid EQ 'LH' AND connid EQ '0400'.
    IF sy-subrc EQ 0.
    WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
    ENDIF.
    Alternative 3
    ... (column_syntax)
    Effect
    Instead of static data, a data object column_syntax in brackets can be specified, which, when the command is executed, either contains the syntax shown with the static data, or is initial. The data object column_syntax can be a character-type data object or an internal table with a character-type data type. The syntax in column_syntax, like in the ABAP editor, is not case-sensitive. When specifying an internal table, you can distribute the syntax over multiple rows.
    If column_syntax is initial when the command is executed, columns is implicitly set to * and all columns are read.
    If columns are specificied dynamically without the SINGLE addition, the resulting set is always regarded as having multiple rows.
    Notes
    Before Release 6.10, you could only specify an internal table with a flat character-type row type for column_syntax with a maximum of 72 characters. Also, before Release 6.10, if you used the DISTINCT addition for dynamic access to pool tables or cluster tables, this was ignored, but since release 6.10, this causes a known exception.
    If column_syntax is an internal table with header line, the table body and not the header line is evaluated.
    Example
    Read out how many flights go to and from a city. The SELECT command is implemented only once in a sub-program. The column data, including aggregate function and the data after GROUP BY, is dynamic. Instead of adding the column data to an internal l_columns table, you could just as easily concatenate it in a character-type l_columns field.
    PERFORM my_select USING `CITYFROM`.
    ULINE.
    PERFORM my_select USING `CITYTO`.
    FORM my_select USING l_group TYPE string.
    DATA: l_columns TYPE TABLE OF string,
    l_container TYPE string,
    l_count TYPE i.
    APPEND l_group TO l_columns.
    APPEND `count( * )` TO l_columns.
    SELECT (l_columns)
    FROM spfli
    INTO (l_container, l_count)
    GROUP BY (l_group).
    WRITE: / l_count, l_container.
    ENDSELECT.
    ENDFORM.
    SELECT - aggregate
    Syntax
    ... { MAX( col )
    | MIN( col )
    | AVG( col )
    | SUM( col )
    | COUNT( DISTINCT col )
    | COUNT( * )
    | count(*) } ... .
    Effect
    As many of the specified column labels as you like can be listed in the SELECT command as arguments of the above aggregate expression. In aggregate expressions, a single value is calculated from the values of multiple rows in a column as follows (note that the addition DISTINCT excludes double values from the calculation):
    MAX( col ) Determines the maximum value of the value in the column col in the resulting set or in the current group.
    MIN( col ) Determines the minimum value of the content of the column col in the resulting set or in the current group.
    AVG( col ) Determines the average value of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
    SUM( col ) Determines the sum of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
    COUNT( DISTINCT col ) Determines the number of different values in the column col in the resulting set or in the current group.
    COUNT( * ) (or count(*)) Determines the number of rows in the resulting set or in the current group. No column label is specified in this case.
    If you are using aggregate expressions, all column labels that are not listed as an argument of an aggregate function are listed after the addition GROUP BY. The aggregate functions evaluate the content of the groups defined by GROUP BY in the database system and transfer the result to the combined rows of the resulting set.
    The data type of aggregate expressions with the function MAX, MIN or SUM is the data type of the corresponding column in the ABAP Dictionary. Aggregate expressions with the function AVG have the data type FLTP, and those with COUNT have the data type INT4. The corresponding data object after INTO or APPENDING has to be selected accordingly.
    Note the following points when using aggregate expressions:
    If the addition FOR ALL ENTRIES is used in front of WHERE, or if cluster or pool tables are listed after FROM, no other aggregate expressions apart from COUNT( * ) can be used.
    Columns of the type STRING or RAWSTRING cannot be used with aggregate functions.
    When aggregate expressions are used, the SELECT command makes it unnecessary to use SAP buffering.
    Null values are not included in the calculation for the aggregate functions. The result is a null value only if all the rows in the column in question contain the null value.
    If only aggregate expressions are used after SELECT, the results set has one row and the addition GROUP BY is not necessary. If a non-table type target area is specified after INTO, the command ENDSELECT cannot be used together with the addition SINGLE. If the aggregate expression count( * ) is not being used, an internal table can be specified after INTO, and the first row of this table is filled.
    If aggregate functions are used without GROUP BY being specified at the same time, the resulting set also contains a row if no data is found in the database. If count( * ) is used, the column in question contains the value 0. The columns in the other aggregate functions contain initial values. This row is assigned to the data object specified after INTO, and unless count( * ) is being used exclusively, sy-subrc is set to 0 and sy-dbcnt is set to 1. If count( *) is used exclusively, the addition INTO can be omitted and if no data can be found in the database, sy-subrc is set to 4 and sy-dbcnt is set to 0.
    if helpful reward points

  • Query regarding bind variables and LOVs

    HI,
    I am new to ADF.Last day I learnt about LOVS,View Criteria and bind variables.Now, I was trying to develop a sample application.I created some EOs,VOs and an AM.
    I also defined a view criteria which takes a bind variable as parameter and resolves the condition at runtime.Then I created a query panel based on my view criteria.In that Query Panel,when I enter a student's name in an input box(which is bound to the bind variable I guess), the info about the student is displayed in a table.Now, instead of an input box, I want a choice list based on a model driven LOV which will contain all the student names available.Is it possible in ADF 11g?
    Thanks in advance

    You need to open the VO , you are using , go to the Overview section and in overview section go to the Attributes section.
    In attributes section select the attribute by which you are searching or doing your operation, click the add button of List of values: Attribute name
    Select the vo object to populate the value.
    You will get the data in bind variable you have created in view criteria.
    For detailed reference you can follow the bolg
    http://saumoinak.blogspot.com/2011/02/showing-data-based-on-list-of-values.html

  • Query regarding composite.xml and bpel

    Hi,
    I am absolutely new to SOA.Last day, I was experimenting with BPEL processes.I dragged a BPEL process(TestBPEL) onto the SOA composite and exposed it as a SOAP service.Now the component(testbpel_client_ep) that is being shown in the left swimlane wired to the BPEL process, what is that?I mean is that a service itself.Again in the .componentType file, I saw a service was defined but the name of the service defined was testbpel_client.But I didn't define any other service,so where did that service come from?Again in the composite source I saw the follwing code was generated:-
    <service name="testbpel_client_ep" ui:wsdlLocation="TestBPEL.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/PatientDataService_jws/Test/TestBPEL#wsdl.interface(TestBPEL)"/>
    <binding.ws port="http://xmlns.oracle.com/PatientDataService_jws/Test/TestBPEL#wsdl.endpoint(testbpel_client_ep/TestBPEL_pt)"/>
    </service>
    I guess it defines the service testbpel_client_ep.But what are the implications of the <interface.wsdl/> and <binding.ws/> tags?In the .componentType file also, the service testbpel_client had the same <interface.wsdl/> tag.
    <service name="testbpel_client" ui:wsdlLocation="TestBPEL.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/PatientDataService_jws/Test/TestBPEL#wsdl.interface(TestBPEL)"/>
    </service>
    It also intrigues me that both the services(testbpel_client and testbpel_client_ep ) refer to the same wsdl file.I have no clue what is happening.
    Thanks in advnce

    Now the component(testbpel_client_ep) that is being shown in the left swimlane wired to the BPEL process, what is that?I mean is that a service itselfYes. If you check the generate soap service checkbox when defining the BPEL it will generate the service and wiring as you have seen.
    Again in the .componentType file, I saw a service was defined but the name of the service defined was testbpel_client.But I didn't define any other service,so where did >that service come from?testbpel_client should be the partner link name for the service. If you open the bpel designer you should see this partner link on the left swim lane. And if you check the wire's in the composite source, you will see that the wire target is testbpel/testbpel_client. Partner Links are by which services and references are referred within the bpel designer.
    what are the implications of the <interface.wsdl/> and <binding.ws/> tags?interface.wsdl specifies the wsdl porttype of the interface exposed by bpel.
    bindings.ws specifies the wsdl port and soap:location for the bpel. You are not seeing the location part here as this is a service definition and soa runtime will automatically populate this depending upon your deployed environment. This section is more relevant for 'References' coz this is the place you have to modify the endpoint URL's of services you have to invoke.

  • Query regarding Treen node and its Content

    Hi all,
    I have a doubt regarding treenodes.I am creating a dynamic tree.So when i added a tree node i added a text box in the fecet of that node like
    TextField txtNodeName=new TextField();
    treeNode.getFacets.put("content",txtNodeName);
    Is there any way to get the value in the textfield.I can set the value but not able to get the entered value.Is ther any solution for this
    Kindly help
    Thanks in advance
    Sree

    try {
    TextField comp = treeNode.getFacets().get(<FacetName>);
    String text = comp.getText();
    } catch(Exception e) {
    Hope this is what you were looking for.

  • Query regarding : af:query component

    In af:query my requirement is to add one search field which looks like :
    "*Label*" "*Drop down List*" "*Input Text field*"
    For the other fields which have only
    "Label" and one other Component type i am using QueryDefinition.addAttributeDefinition But how to add two components with Label.

    Not sure if you can change the af:query component to do this , but you can easily build your own search form and in this form build your own layout.
    http://www.youtube.com/watch?v=osdR6I2YVEQ&feature=player_embedded#! this video give you an example
    Timo

  • Query regarding COPY OF FBL5N : No items selected (see long text)

    Dear All,
    Currently i am executing FBL5N report and it is ok.
    Now i have copied FBL5N program to ZFBL5N.
    Now the issue is when i am trying to execute ZFBL5N, this messge comes and report not generated in some cases.
    "No items selected (see long text) ".
    This error has not come for all cases but just for few cases and i have tried to found out the case,
    and i found that, whenever we maintain vendor in control data tab of XD02(Change Customer : general data) then only above message has come.
    Now i am not getting one thning, Why FBL5N not giving above error because i have copied the program and nothing difference in both code then why ZFBL5N giving error and FBL5N generate report and what should i do for above error.
    Please help regarding this matter
    Regards,
    Shivam.

    Dear Nabheet,
    I have debugg, code is same for both cases becuase i have just copied now.
    Although, i have debugg also and i have seen in coding, when program goes in perform form "read_vendor_items" and in that perform, there is written function, call function 'LDB_PROCESS'
    . Now when i going during debugg time,
       call function 'LDB_PROCESS'
        exporting
          ldbname                     = 'KDF'
          expressions                 = it_dyn_texpr[]
        tables
          callback                    = it_callback
          selections                  = it_selscreen
        exceptions
          ldb_selections_error        = 1
          ldb_selections_not_accepted = 2
          free_selections_error       = 3
          callback_no_event           = 4
          callback_no_program         = 5
          callback_no_cbform          = 6
          others                      = 7.
    After pass this function moduel in case of ZFBL5N, it_pos table is not filled but in case of FBL5N, it_pos table is filled one record and that record also shown.
    But code is same but different only program name.
    Now what can you suggest.
    Regards,
    Shivam.

  • How can I get my Bluetooth to connect? I took it to the apple store in San Francisco and got horrible service and my phone still doesn't work in regards to Bluetooth and glitches ? Please help

    I am very disappointed, I can not connect my Bluetooth to any device (ie. beatpill) and I took it to the store they reset my phone and told me everythibg should work and it turns out that nothing works. Not only the Bluetooth but my phone glitches while in use (ie. It freezes, it'll reset randomly, and the apps freeze or won't close, whrn texting it will close out my messages) things of that nature. Please help because thus far no one else has and it has become a problem for me to use my phone.

    What does the beat pill manual say on how to pair to iphone?
    We have no issue connecting an iphone 4S/5/5S or 6 to it.

  • Why won't Firefox 5 operate as it claims? Fast and efficiently? Please see me problems below:

    HELP!!!!! Please, I have a new HP G62 NotebookPC, w/Windows 7, I have Firefox 5, i love YouTube and try to do lots of gaming on Facebook. I cannot watch any videos, it will stop every few seconds, then start back after a while, doing this continually. It could take 6 hours to watch a single 3 minute video. My games are freezing up. The performance of this pc is poor, poor. Please give me any and all suggestions you might have for me. I am know way near a computer "geek", about all i do know is the keyboard. Please make these suggestions as simple as possible, for some of the stuff i've read in the support chapter is pure greek to me. I also have a 64 bit opr sys. I will even get the "time out" box when trying to check email or going to a website. It runs very, very slowly. Your help will be greatly appreciated, that is forsure. [email protected]
    Also 2day firefox/mozilla crashed while i was trying to contact firefox support. Yes i sent a report in. It's super slow, like i'm on a dial-up or something. Sometimes it seems like its running faster than others, sometimes i can watch a music video, but say i try 10 diff videos, i might get to see 1 and that's maybe.

    HELP!!!!! Please, I have a new HP G62 NotebookPC, w/Windows 7, I have Firefox 5, i love YouTube and try to do lots of gaming on Facebook. I cannot watch any videos, it will stop every few seconds, then start back after a while, doing this continually. It could take 6 hours to watch a single 3 minute video. My games are freezing up. The performance of this pc is poor, poor. Please give me any and all suggestions you might have for me. I am know way near a computer "geek", about all i do know is the keyboard. Please make these suggestions as simple as possible, for some of the stuff i've read in the support chapter is pure greek to me. I also have a 64 bit opr sys. I will even get the "time out" box when trying to check email or going to a website. It runs very, very slowly. Your help will be greatly appreciated, that is forsure. [email protected]
    Also 2day firefox/mozilla crashed while i was trying to contact firefox support. Yes i sent a report in. It's super slow, like i'm on a dial-up or something. Sometimes it seems like its running faster than others, sometimes i can watch a music video, but say i try 10 diff videos, i might get to see 1 and that's maybe.

  • Self Joining and Inline Query. A tricky report.

    I am stuck with a very tricky situation.Please help.This is PROD issue.
    I have written a SQL code which has 1 inline queries,and displays the right results
    with the right report output
    Dont get confused.Just go thru this.
    select   pie.id_inst_code,
             ISNULL(PN.Active, 0)                 'Active',
    from position_master_input_event pie,
    (select  insx.id_inst_xref_type,insx.id_inst_xref,count(*) 'PrimaryListing'
    from instrument ins, instrument_xref insx
    where ins.id_inst = insx.id_inst
    and   insx.flg_active = 'Y'
    and   ins.flg_active  = 'Y'
    group by insx.id_inst_xref_type,insx.id_inst_xref
    )PN
    where     id_entity = 'AGL'
    and       pie.id_inst_code *= PN.id_inst_xref
    and       pie.id_src_inst_code_type*= PN.id_inst_xref_type
    group by  pie.id_inst_code,PN.Active,
    Table :Instrument_xref
    id_inst      id_inst_xref_type    id_inst_xref  flg_active
    0372285      SE                   B0DV8Y9       Y
    0372285      IS                   GB00B03MLX29  Y
    Table :Instrument
    id_inst      id_inst_xref_type    id_inst_xref  flg_active  flg_primary_listing
    0372285      SE                   B0DV8Y9       Y           N 
    OUTPUT:
    id_inst_xref                      Active
    B0DV8Y9                           1
    PERFECT.Works fine
    2) Now comes the tricky part.:
        0372285 also has GB00B03MLX29 which has flg_active to Y and which also maps to 0372285.
        Am I right?
        New reportOutput
        id_inst_xref                      Active   PRIMARY ISIN
        B0DV8Y9                           1        1
        So,now I want a SELF JOIN this way built into the code:
        (hardcoded values work)
        (i)
        select  a.id_inst_xref
        from instrument_xref a,
             instrument_xref b
        where b.id_inst_xref ='B0DV8Y9'
        and   b.id_inst = a.id_inst
        and   b.id_inst_xref_type in ('SE','IS')
        and   a.id_inst_xref =  'GB00B03MLX29'
        (ii)
         select count(*) 'PrimaryISIN'
         from instrument ins,
             instrument_xref insx
         where ins.id_inst = insx.id_inst
         and   insx.flg_active = 'Y'
         and   ins.flg_primary_listing = 'Y'
         and   ins.flg_active = 'Y'
         And now LINKING ALL :
        select   pie.id_inst_code,
             ISNULL(PN.Active, 0)                 'Active',
        from position_master_input_event pie,
        (select  insx.id_inst_xref_type,insx.id_inst_xref,count(*) 'PrimaryListing'
         from instrument ins, instrument_xref insx
         where ins.id_inst = insx.id_inst
         and   insx.flg_active = 'Y'
         and   ins.flg_active  = 'Y'
         group by insx.id_inst_xref_type,insx.id_inst_xref
        )PN,
        (select count(*) 'PrimaryISIN'
         from instrument ins,
             instrument_xref insx
         where ins.id_inst = insx.id_inst
         and   insx.flg_active = 'Y'
         and   ins.flg_primary_listing = 'Y'
         and   ins.flg_active = 'Y'
          and     insx.id_inst_xref = ( 
                                           select  DISTINCT  a.id_inst_xref
                                            from    instrument_xref a,
                                            instrument_xref  b
                                      where b.id_inst_xref = 'B0DV8Y9'
                                          and     b.id_inst = a.id_inst
                                          and     b.id_inst_xref_type in ('SE','IS')
                                       and    a.id_inst_xref =  'GB00B03MLX29'
        where     id_entity = 'AGL'
        and       pie.id_inst_code *= PN.id_inst_xref
        and       pie.id_src_inst_code_type*= PN.id_inst_xref_type
        group by  pie.id_inst_code,PN.Active,
        THE Self join works fine as long as it is hardcoded.
        But assume there can br multiple such situations as the above,and I dont want to
        hardcode the values,how can I build the NEW REPORT by SELF JOINING.
        Please can someome help.This is a tricky one.
        Is there a better way to this

    Isn't this the same question as:
    Passing values dynamically Froman 'INLINE Query' to a 'SUB QUERY'
    and
    Another query regarding Inline Query and Self Join and pass Column Values

  • Query regarding TimeTracking

    Hi,
    I want to create a query which gives me the information of employees who filled the timesheet for specific dates. It should should also return records of those dates for which employee do not entered any hours at all. Below dummy records will clear you my requirement.
    I have an EMP table. Following are the records for specific date range [Range of 2 weeks] :-
    select ename, hiredate, to_char(hiredate, 'Day') Day, to_char(hiredate, 'D') WeekDay
    from emp
    where hiredate between '16-Feb-81' and '27-FEB-81';
    ENAME HIREDATE DAY W
    AJEET 16-FEB-81 Monday 2
    PRASHANT 26-FEB-81 Thursday 5
    AJEET 23-FEB-81 Monday 2
    PRASHANT 25-FEB-81 Wednesday 4
    DEEPAK 21-FEB-81 Saturday 7
    ALLEN 20-FEB-81 Friday 6
    WARD 22-FEB-81 Sunday 1
    7 rows selected.
    I filtered those records which shows Saturday and Sunday. Because I don't want records of Weekend, only week days data [Monday to Friday] is required
    Following records excluded Saturday and Sunday:-
    select ename, hiredate, to_char(hiredate, 'Day') Day, to_char(hiredate, 'D') WeekDay from emp
    where hiredate between '16-Feb-81' and '27-FEB-81'
    and (to_char(hiredate, 'D') != 1 and to_char(hiredate, 'D') != 7);
    ENAME HIREDATE DAY W
    AJEET 23-FEB-81 Monday 2
    PRASHANT 25-FEB-81 Wednesday 4
    ALLEN 20-FEB-81 Friday 6
    Finally following query will give those dates for which employee actually filled the timesheet and it will also return me those records for which each employee does not make any entry in table:-
    See more detail after query result:
    select ename, hiredate, to_char(hiredate, 'Day') Day, to_char(hiredate, 'D') WeekDay from emp
    where ename in ('AJEET', 'PRASHANT')
    and hiredate between '16-Feb-81' and '27-FEB-81'
    and (to_char(hiredate, 'D') != 1 and to_char(hiredate, 'D') != 7)
    union
    select e.ename, x.hiredate, NULL, NULL
    from emp e, (select (to_date('16-Feb-81')-1) + rownum hiredate from dual
              connect by level <= (to_date('27-FEB-81') - to_date('16-Feb-81')) + 1) x
    where e.ename in ('AJEET', 'PRASHANT')
    and e.hiredate != x.hiredate
    and (to_char(e.hiredate, 'D') != 1 and to_char(e.hiredate, 'D') != 7)
    and (to_char(x.hiredate, 'D') != 1 and to_char(x.hiredate, 'D') != 7)
    and e.hiredate between '16-Feb-81' and '27-FEB-81';
    ENAME HIREDATE DAY W
    AJEET 16-FEB-81 Monday 2
    AJEET      16-FEB-81                                                / Should be ignored from output */
    AJEET 17-FEB-81
    AJEET 18-FEB-81
    AJEET 19-FEB-81
    AJEET 20-FEB-81
    AJEET 23-FEB-81 Monday 2
    AJEET      23-FEB-81                                                / Should be ignored from output */
    AJEET 24-FEB-81
    AJEET 25-FEB-81
    AJEET 26-FEB-81
    AJEET 27-FEB-81
    PRASHANT 16-FEB-81
    PRASHANT 17-FEB-81
    PRASHANT 18-FEB-81
    PRASHANT 19-FEB-81
    PRASHANT 20-FEB-81
    PRASHANT 23-FEB-81
    PRASHANT 24-FEB-81
    PRASHANT 25-FEB-81 Wednesday 4
    PRASHANT   25-FEB-81                                                  / Should be ignored from output */
    PRASHANT 26-FEB-81 Thursday 5
    PRASHANT   26-FEB-81                                                   / Should be ignored from output */
    PRASHANT 27-FEB-81
    24 rows selected.
    If you see AJEET has valid entry for 16-FEB-81 and 23-FEB-81. PRASHANT has valid entry for 25-FEB-81 and 26-FEB-81. But if you see there are two marked records* for each [AJEET and PRASHANT] are wronly printed here. These records are already return from first part of above query (above UNION clause), So these should be repeate from second part of that query (below UNION clause).
    Finally, query output should ignore marked records. Please suggest me what changes are required in above query to get the expected output.
    Expected Output
    ===========
    ENAME HIREDATE DAY W
    AJEET 16-FEB-81 Monday 2
    AJEET 17-FEB-81
    AJEET 18-FEB-81
    AJEET 19-FEB-81
    AJEET 20-FEB-81
    AJEET 23-FEB-81 Monday 2
    AJEET 24-FEB-81
    AJEET 25-FEB-81
    AJEET 26-FEB-81
    AJEET 27-FEB-81
    PRASHANT 16-FEB-81
    PRASHANT 17-FEB-81
    PRASHANT 18-FEB-81
    PRASHANT 19-FEB-81
    PRASHANT 20-FEB-81
    PRASHANT 23-FEB-81
    PRASHANT 24-FEB-81
    PRASHANT 25-FEB-81 Wednesday 4
    PRASHANT 26-FEB-81 Thursday 5
    PRASHANT 27-FEB-81
    20 rows selected.
    Thanks and Regards,
    Rohit Jain
    Edited by: user2081225 on Jun 30, 2009 7:47 AM
    Edited by: user2081225 on Jun 30, 2009 7:48 AM

    Thanks dear, to bring this point up. Now it will be more clear and readable. Please see below:-
    Note:- Each sets of curly braces represents data of each column.
    I want to create a query which gives me the information of employees who filled the timesheet for specific dates. It should should also return records of those dates for which employee do not entered any hours at all. Below dummy records will clear you my requirement.
    I have an EMP table. Following are the records for specific date range Range of 2 weeks :-
    select '('||ename||')' Ename, '('||hiredate||')' Hiredate, '('||to_char(hiredate, 'Day')||')' Day, '('||to_char(hiredate, 'D')||')' WeekDay
    from emp
    where hiredate between '16-Feb-81' and '27-FEB-81';
    ENAME HIREDATE DAY WEE
    (AJEET) (16-FEB-81) (Monday ) (2)
    (PRASHANT) (26-FEB-81) (Thursday ) (5)
    (AJEET) (23-FEB-81) (Monday ) (2)
    (PRASHANT) (25-FEB-81) (Wednesday) (4)
    (DEEPAK) (21-FEB-81) (Saturday ) (7)
    (ALLEN) (20-FEB-81) (Friday ) (6)
    (WARD) (22-FEB-81) (Sunday ) (1)
    7 rows selected.
    I filtered those records which shows Saturday and Sunday. Because I don't want records of Weekend, only week days data Monday to Friday is required
    Following records excluded Saturday and Sunday:-
    select '('||ename||')' Ename, '('||hiredate||')' Hiredate, '('||to_char(hiredate, 'Day')||')' Day, '('||to_char(hiredate, 'D')||')' WeekDay from emp
    where hiredate between '16-Feb-81' and '27-FEB-81'
    and (to_char(hiredate, 'D') != 1 and to_char(hiredate, 'D') != 7);
    ENAME HIREDATE DAY WEE
    (AJEET) (16-FEB-81) (Monday ) (2)
    (PRASHANT) (26-FEB-81) (Thursday ) (5)
    (AJEET) (23-FEB-81) (Monday ) (2)
    (PRASHANT) (25-FEB-81) (Wednesday) (4)
    (ALLEN) (20-FEB-81) (Friday ) (6)
    Finally following query will give those dates for which employee actually filled the timesheet and it will also return me those records for which each employee does not make any entry in table:-
    See more detail after query result:
    select '('||ename||')' Ename, '('||hiredate||')' Hiredate, '('||to_char(hiredate, 'Day')||')' Day, '('||to_char(hiredate, 'D')||')' WeekDay from emp
    where ename in ('AJEET', 'PRASHANT')
    and hiredate between '16-Feb-81' and '27-FEB-81'
    and (to_char(hiredate, 'D') != 1 and to_char(hiredate, 'D') != 7)
    union
    select '('||e.ename||')', '('||x.hiredate||')', '('||NULL||')', '('||NULL||')'
    from emp e, (select (to_date('16-Feb-81')-1) + rownum hiredate from dual
    connect by level <= (to_date('27-FEB-81') - to_date('16-Feb-81')) + 1) x
    where e.ename in ('AJEET', 'PRASHANT')
    and e.hiredate != x.hiredate
    and (to_char(e.hiredate, 'D') != 1 and to_char(e.hiredate, 'D') != 7)
    and (to_char(x.hiredate, 'D') != 1 and to_char(x.hiredate, 'D') != 7)
    and e.hiredate between '16-Feb-81' and '27-FEB-81';
    ENAME HIREDATE DAY WEE
    *(AJEET) (16-FEB-81) () () /* It should be ignored */
    (AJEET) (16-FEB-81) (Monday ) (2)
    (AJEET) (17-FEB-81) () ()
    (AJEET) (18-FEB-81) () ()
    (AJEET) (19-FEB-81) () ()
    (AJEET) (20-FEB-81) () ()
    *(AJEET) (23-FEB-81) () ()     /* It should be ignored */
    (AJEET) (23-FEB-81) (Monday ) (2)
    (AJEET) (24-FEB-81) () ()
    (AJEET) (25-FEB-81) () ()
    (AJEET) (26-FEB-81) () ()
    (AJEET) (27-FEB-81) () ()
    (PRASHANT) (16-FEB-81) () ()
    (PRASHANT) (17-FEB-81) () ()
    (PRASHANT) (18-FEB-81) () ()
    (PRASHANT) (19-FEB-81) () ()
    (PRASHANT) (20-FEB-81) () ()
    (PRASHANT) (23-FEB-81) () ()
    (PRASHANT) (24-FEB-81) () ()
    *(PRASHANT) (25-FEB-81) () ()     /* It should be ignored */
    (PRASHANT) (25-FEB-81) (Wednesday) (4)
    *(PRASHANT) (26-FEB-81) () ()     /* It should be ignored */
    (PRASHANT) (26-FEB-81) (Thursday ) (5)
    (PRASHANT) (27-FEB-81) () ()
    24 rows selected.
    If you see AJEET has valid entry for 16-FEB-81 and 23-FEB-81. PRASHANT has valid entry for 25-FEB-81 and 26-FEB-81. But if you see there are two marked records* for each AJEET and PRASHANT are wronly printed here. These records are already return from first part of above query (above UNION clause), So these should be repeate from second part of that query (below UNION clause).
    Finally, query output should ignore marked records. Please suggest me what changes are required in above query to get the expected output.
    Expected Output
    ===========
    ENAME HIREDATE DAY WEE
    (AJEET) (16-FEB-81) (Monday ) (2)
    (AJEET) (17-FEB-81) () ()
    (AJEET) (18-FEB-81) () ()
    (AJEET) (19-FEB-81) () ()
    (AJEET) (20-FEB-81) () ()
    (AJEET) (23-FEB-81) (Monday ) (2)
    (AJEET) (24-FEB-81) () ()
    (AJEET) (25-FEB-81) () ()
    (AJEET) (26-FEB-81) () ()
    (AJEET) (27-FEB-81) () ()
    (PRASHANT) (16-FEB-81) () ()
    (PRASHANT) (17-FEB-81) () ()
    (PRASHANT) (18-FEB-81) () ()
    (PRASHANT) (19-FEB-81) () ()
    (PRASHANT) (20-FEB-81) () ()
    (PRASHANT) (23-FEB-81) () ()
    (PRASHANT) (24-FEB-81) () ()
    (PRASHANT) (25-FEB-81) (Wednesday) (4)
    (PRASHANT) (26-FEB-81) (Thursday ) (5)
    (PRASHANT) (27-FEB-81) () ()
    20 rows selected.
    Thanks and Regards,
    Rohit Jain

  • Regarding Bank key and Bank account number

    Hi All,
    I have a query regarding Bank key and Bank account number.
    I want to set bank account number length as 9 digits. so I set it @ below path
    SPRO -> SAP NetWeaver-> General settings -> Set countries -> Set country specific checks.
    I tried to change the bank account number length to 9 digits from existing 10 digits using transaction FI12.
    But while changeing the bank account system throws an error like "Bank account number or bank number are not of valid length".
    Can any one suggest solution on this?
    Thanks in Advance!
    Regards,
    Nidhi

    Dear Nidhi,
    It seems that earlier bank account number contained 10 digits and then setting was changed to 9 digits that may be the cause of the error. Do one thing, go back to country setting and restore the bank account number digit to 10. Then make changes to bank account number to 9 digits. Make similar changes to all bank in your company code which has 10 digits.
    Then go to country settings and make account number digit to 9 digit which will prevent bank account number to be 10 digits created in future.
    Regards,
    Chintan Joshi.

  • Inline query vs cross join

    Hi all,
    Two tables who have no relation with each other. For example an employees table and a systemparameter table with a startworktime.
    We need a query with data from both tables:
    Get all employees and the startworktime (which is the same for everybody)
    Which is cheaper: an inline query or a cartesian product or crossjoin?
    Inine :
    select name, function
           , (select startworktime from systemparameter)
    from employees;
    Cartesian product:
    select name, function, startwoime
    rktfrom employees
    cross join systemparameter;
    Your thoughts on this.

    Hi,
    To see which runs faster on your system, with your sub-query, there's no sibstitute for testing on your system, with your sub-query.
    I predict you won't notice any difference.  Scalar sub-queries (as in your first example) are cached (at least in recent versions of Oracle), so you can include a scalar sub-query in a result set of a million rows, and the sub-query can be executed once, not a million times.

  • I need to pass a query in form of string to DBMS_XMLQUERY.GETXML package...the parameters to the query are date and varchar ..please help me..

    I need to pass a query in form of string to DBMS_XMLQUERY.GETXML package...the parameters to the query are date and varchar ..please help me build the string .Below is the query and the out put. ( the string is building fine except the parameters are with out quotes)
    here is the procedure
    create or replace
    procedure temp(
        P_MTR_ID VARCHAR2,
        P_FROM_DATE    IN DATE ,
        P_THROUGH_DATE IN DATE ) AS
        L_XML CLOB;
        l_query VARCHAR2(2000);
    BEGIN
    l_query:=  'SELECT
        a.s_datetime DATETIME,
        a.downdate Ending_date,
        a.downtime Ending_time,
        TO_CHAR(ROUND(a.downusage,3),''9999999.000'') kWh_Usage,
        TO_CHAR(ROUND(a.downcost,2),''$9,999,999.00'') kWh_cost,
        TO_CHAR(ROUND(B.DOWNUSAGE,3),''9999999.000'') KVARH
      FROM
        (SELECT s_datetime + .000011574 s_datetime,
          TO_CHAR(S_DATETIME ,''mm/dd/yyyy'') DOWNDATE,
          DECODE(TO_CHAR(s_datetime+.000011574 ,''hh24:'
          ||'mi''), ''00:'
          ||'00'',''24:'
          ||'00'', TO_CHAR(s_datetime+.000011574,''hh24:'
          ||'mi'')) downtime,
          s_usage downusage,
          s_cost downcost
        FROM summary_qtrhour
        WHERE s_mtrid = '
        ||P_MTR_ID||
       ' AND s_mtrch   = ''1''
        AND s_datetime BETWEEN TO_DATE('
        ||P_FROM_DATE||
        ',''DD-MON-YY'') AND (TO_DATE('
        ||P_THROUGH_DATE||
        ',''DD-MON-YY'') + 1)
        ) a,
        (SELECT s_datetime + .000011574 s_datetime,
          s_usage downusage
        FROM summary_qtrhour
        WHERE s_mtrid = '
        ||P_MTR_ID||
        ' AND s_mtrch   = ''2''
        AND s_datetime BETWEEN TO_DATE('
        ||P_FROM_DATE||
        ',''DD-MON-YY'') AND (TO_DATE('
        ||P_THROUGH_DATE||
        ','' DD-MON-YY'') + 1)
        ) B
      where a.S_DATETIME = B.S_DATETIME(+)';
    SELECT DBMS_XMLQUERY.GETXML('L_QUERY') INTO L_XML   FROM DUAL;
    INSERT INTO NK VALUES (L_XML);
    DBMS_OUTPUT.PUT_LINE('L_QUERY IS :'||L_QUERY);
    END;
    OUTPUT parameters are in bold (the issue is they are coming without single quotes otherwise th equery is fine
    L_QUERY IS :SELECT
        a.s_datetime DATETIME,
        a.downdate Ending_date,
        a.downtime Ending_time,
        TO_CHAR(ROUND(a.downusage,3),'9999999.000') kWh_Usage,
        TO_CHAR(ROUND(a.downcost,2),'$9,999,999.00') kWh_cost,
        TO_CHAR(ROUND(B.DOWNUSAGE,3),'9999999.000') KVARH
      FROM
        (SELECT s_datetime + .000011574 s_datetime,
          TO_CHAR(S_DATETIME ,'mm/dd/yyyy') DOWNDATE,
          DECODE(TO_CHAR(s_datetime+.000011574 ,'hh24:mi'), '00:00','24:00', TO_CHAR(s_datetime+.000011574,'hh24:mi')) downtime,
          s_usage downusage,
          s_cost downcost
        FROM summary_qtrhour
        WHERE s_mtrid = N3165 AND s_mtrch   = '1'
        AND s_datetime BETWEEN TO_DATE(01-JAN-13,'DD-MON-YY') AND (TO_DATE(31-JAN-13,'DD-MON-YY') + 1)
        ) a,
        (SELECT s_datetime + .000011574 s_datetime,
          s_usage downusage
        FROM summary_qtrhour
        WHERE s_mtrid = N3165 AND s_mtrch   = '2'
        AND s_datetime BETWEEN TO_DATE(01-JAN-13,'DD-MON-YY') AND (TO_DATE(31-JAN-13,' DD-MON-YY') + 1)
        ) B
      where a.S_DATETIME = B.S_DATETIME(+)

    The correct way to handle this is to use bind variables.
    And use DBMS_XMLGEN instead of DBMS_XMLQUERY :
    create or replace procedure temp (
      p_mtr_id       in varchar2
    , p_from_date    in date
    , p_through_date in date
    is
      l_xml   CLOB;
      l_query VARCHAR2(2000);
      l_ctx   dbms_xmlgen.ctxHandle;
    begin
      l_query:=  'SELECT
        a.s_datetime DATETIME,
        a.downdate Ending_date,
        a.downtime Ending_time,
        TO_CHAR(ROUND(a.downusage,3),''9999999.000'') kWh_Usage,
        TO_CHAR(ROUND(a.downcost,2),''$9,999,999.00'') kWh_cost,
        TO_CHAR(ROUND(B.DOWNUSAGE,3),''9999999.000'') KVARH
      FROM
        (SELECT s_datetime + .000011574 s_datetime,
          TO_CHAR(S_DATETIME ,''mm/dd/yyyy'') DOWNDATE,
          DECODE(TO_CHAR(s_datetime+.000011574 ,''hh24:'
          ||'mi''), ''00:'
          ||'00'',''24:'
          ||'00'', TO_CHAR(s_datetime+.000011574,''hh24:'
          ||'mi'')) downtime,
          s_usage downusage,
          s_cost downcost
        FROM summary_qtrhour
        WHERE s_mtrid = :P_MTR_ID
        AND s_mtrch   = ''1''
        AND s_datetime BETWEEN TO_DATE(:P_FROM_DATE,''DD-MON-YY'')
                           AND (TO_DATE(:P_THROUGH_DATE,''DD-MON-YY'') + 1)
        ) a,
        (SELECT s_datetime + .000011574 s_datetime,
          s_usage downusage
        FROM summary_qtrhour
        WHERE s_mtrid = :P_MTR_ID
        AND s_mtrch   = ''2''
        AND s_datetime BETWEEN TO_DATE(:P_FROM_DATE,''DD-MON-YY'')
                           AND (TO_DATE(:P_THROUGH_DATE,'' DD-MON-YY'') + 1)
        ) B
      where a.S_DATETIME = B.S_DATETIME(+)';
      l_ctx := dbms_xmlgen.newContext(l_query);
      dbms_xmlgen.setBindValue(l_ctx, 'P_MTR_ID', p_mtr_id);
      dbms_xmlgen.setBindValue(l_ctx, 'P_FROM_DATE', to_char(p_from_date, 'DD-MON-YY'));
      dbms_xmlgen.setBindValue(l_ctx, 'P_THROUGH_DATE', to_char(p_through_date, 'DD-MON-YY'));
      l_xml := dbms_xmlgen.getXML(l_ctx);
      dbms_xmlgen.closeContext(l_ctx);
      insert into nk values (l_xml);
    end;

Maybe you are looking for

  • Yahoo messenger not working on messages in Yosemite

    As of today, I can no longer get Messages to sign in to my Yahoo Messenger account. It was working earlier today, but since about 10 AM EDT, after selecting "Available" from the "Offline" status for Yahoo, it says "Connecting" for a while, then chang

  • Populate a table field based on another field in the same table

    Hi,     I have a table with fields collection profile and collection prfile text. When maintaining this table, the collection profile name should appear automatically ( from table UDM_COLL_GRPT) based on the collection profile entered.. In UDM_COLL_G

  • Multiple ibook problems

    Hello everyone. ibook G3 800mhz out of apple care warranty. Guess what? It seems that everything that could possibly go wrong has. Yes, we've been through the display replacement, but that was years ago now. My battery is no longer holding a charge,

  • Authentification ldap,pam.d on solaris 11

    Hi, I tested ldap authentification on Solaris 11 and I didn't succeed in ssh connection. I succeed in viewing ldap users (getent passwd) and i modified /etc/pam.d/login other and passwd with "auth required pam_ldap

  • CRMD_ORDER: how to set default values for Requester and Change Manager

    Hello Folks, how do I set default values in TA crmd_order? I drew my organizational hierarchy using TAs bp and ppoma_crm. When a new Change Request (e. g. SDHF) is created, I want the four roles (Requester, Change Manager, IT Operator and Developer)