Filter Data based on date Condition

Hi,
Below is the query which is performing cast operation to convert string to date. Now my requirement is to filter all the dates which is from 1/1/2010 or later.
>> SELECT
>> CAST( TICKETID AS VARCHAR2(4000)) TICKETID,
CAST(CUSTOMERID AS VARCHAR2(4000)) CUSTOMERID,
CAST(CUSTOMEREMAIL AS VARCHAR2(4000)) CUSTOMEREMAIL,
CAST(CREATEDBY AS VARCHAR2(4000)) CREATEDBY,
TO_CHAR (TO_DATE ( CAST (DATECREATED AS VARCHAR2 (4000)) , 'Mon DD YYYY HH:MIAM'),'DD-MM-YYYY HH24:MI:SS') DATECREATED
FROM TICKETSI tried with the below format, But it shows as not a valid month to filter please suggest me how to perform the filter on this cast operation of cast conversion.
>> SELECT * FROM
>> ( SELECT
CAST( TICKETID AS VARCHAR2(4000)) TICKETID,
CAST(CUSTOMERID AS VARCHAR2(4000)) CUSTOMERID,
CAST(CUSTOMEREMAIL AS VARCHAR2(4000)) CUSTOMEREMAIL,
CAST(CREATEDBY AS VARCHAR2(4000)) CREATEDBY,
TO_CHAR (TO_DATE ( CAST (DATECREATED AS VARCHAR2 (4000)) , 'Mon DD YYYY HH:MIAM'),'DD-MM-YYYY HH24:MI:SS') DATECREATED
FROM TICKETS )
WHERE
DATECREATED >= TO_DATE('01-01-2010','DD-MM-YYYY HH24:MI:SS') Please suggest me how to put a filter on this date.
Thanks
Sudhir

Sudhir_Meru wrote:
SELECT * FROM
( SELECT
CAST( TICKETID AS VARCHAR2(4000)) TICKETID,
CAST(CUSTOMERID AS VARCHAR2(4000)) CUSTOMERID,
CAST(CUSTOMEREMAIL AS VARCHAR2(4000)) CUSTOMEREMAIL,
CAST(CREATEDBY AS VARCHAR2(4000)) CREATEDBY,
TO_CHAR (TO_DATE ( CAST (DATECREATED AS VARCHAR2 (4000)) , 'Mon DD YYYY HH:MIAM'),'DD-MM-YYYY HH24:MI:SS') DATECREATED
FROM TICKETS )
WHERE
DATECREATED >= TO_DATE('01-01-2010','DD-MM-YYYY HH24:MI:SS')
Plainly un-necessary CHAR-DATE-CHAR conversion and CHAR - Date comparison.
Why do you need it?
Just use
TO_DATE ( CAST (DATECREATED AS VARCHAR2 (4000)) , 'Mon DD YYYY HH:MIAM')          DATECREATEDAnd then you can do
datecreated >= to_date('01-01-2010 00:00:00', 'DD-MM-YYYY HH24:MI:SS')

Similar Messages

  • Filter rows based on Where condition AND-OR ?

    Hi,
    I have table "Table1" and columns are
    Id
    AddendumNo
    ClaimNo
    Description
    1
    A1
    C1
    D1
    2
    A1
    C1
    D2
    3
    A1
    C2
    D1
    4
    A2
    C3
    D3
    5
    A2
    C1
    D2
    I have three controls in the UI.
    If I give txtA1.Text =”A1” only then should be return Id- 1,2,3 records.
    If I give txtC1.Text =”C1” only then should be return Id- 1,2,5 records.
    If I give txtA1.Text =”A1” AND txtC1.Text =”C1” then should be return Id- 1,2 records.
    If I give give txtA1.Text =”A1” AND txtC1.Text =”C1” AND txtD1.Text=”D1” then should be return Id-1 record.
    Please help me to write dynamic sql query ?
    Thank you.

    HI
    Try following code
    CREATE PROC usp_dynamic_exec @where VARCHAR(Max)
    AS
    BEGIN
    DECLARE @strQ AS NVARCHAR(max)
    SET @strQ = 'Select * from yourTableName'
    IF ISNULL(@where, '') <> ''
    BEGIN
    SET @strQ = @strQ + ' Where ' + @where -- where clause
    END
    EXECUTE sp_executesql @strQ
    END
    GO
    Ref :http://technet.microsoft.com/en-us/library/ms188001.aspx
    http://www.vishalseth.com/post/2008/07/10/Dynamic-SQL-sp_executesql.aspx
    http://blog.sqlauthority.com/2013/03/28/sql-server-executing-dynamic-sql-sql-queries-2012-joes-2-pros-volume-4-query-programming-objects-for-sql-server-2012/
    Mark as Answer if you find it useful
    Shridhar J Joshi Thanks a lot

  • Select Query Based on date condition

    Hi ,
    Is it Possible.
    i want to run select query based on date condition.
    Eg...
    if the date between 01-jan-01 and 01-jan-05 then
    select * from table1;
    if the date between 02-jan-05 and 01-jan-08 then
    select * from table2;
    Becaz i have data in 2 diffrent tables , based on the date condition i wnt to run the select statement to diffrent tables.
    i dont want plsql here Just SQL needed.
    thanks,
    -R
    Edited by: infant_raj on May 5, 2009 11:48 PM

    Helo Kanish,
    this is not the one i was asking..
    wht i mean was .
    i use bind variable to get date while running the select statement , once i get the date then i want to choose any one of the table to run select query.
    EG..
    select col1,col2 from table1 where date between only if 01-jan-01 and 01-jan-05;
    select col1,col2 from table2 where date between only if 02-jan-05 and 01-jan-08;
    Run any one of the two . not all
    thanks,
    _raj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • JDBC to IDOC Scenario - select data in jdbc based on multiple conditions

    Hello
         I have a JDBC to IDOC Scenario. I have to select the records in JDBC based on different conditions each time. For example I have to select based on company code '1000' and Employee claasification 'E1' and date range. After I post these records in SAP again I want to select other records for some other company code '2000' and different business area and different dates. Basically I want to extract data multiple times based on different conditions.
    Hiow do I achieve this?
    Another question is in the JDBC to IDOC scenario since the sender adapter is JDBC and the sender adapter polls depending on the duration of time ( say 60 secs ) in the adapter once after I extract the data based on a condition how do I control in such a way that the same data is not extracted again.
    Thanks
    Naga

    Hi Naga,
    I have to select the records in JDBC based on different conditions each time. For example I have to select based on company code '1000' and Employee claasification 'E1' and date range. After I post these records in SAP again I want to select other records for some other company code '2000' and different business area and different dates. Basically I want to extract data multiple times based on different conditions.
    -->
    Such requirements cant be handle through select query of the sender...but you can handle this in the message mapping area.....you can fire a select query in the database to pick up records in a batch of 10K (do not keep any condition on this except for sorting). After the records come into PI you can send the message to your target based on the unique combination of "Company code+ Employee clasification + date range" handling this in the message mapping.
    Another question is in the JDBC to IDOC scenario since the sender adapter is JDBC and the sender adapter polls depending on the duration of time ( say 60 secs ) in the adapter once after I extract the data based on a condition how do I control in such a way that the same data is not extracted again.
    You can use the N--> C logic
    The data records that you pick have a corresponding control table i assume. There should be a field STATUS where the initial status of record should be N.
    After you pick the records this status should be made C so that only those records present in the database with status = N are picked up.
    Mention the condition Status = N in the select query.
    Thanks
    Dhwani

  • Oracle Business Intelligence How to choose data set based on a condition

    Hi,
    I am using Oracle Business Intelligence for creating reports, i am facing a situation where i have two quries (data sets in BI), one to display a Failure message and other to fetch data from the table to be displayed in the report.
    The problem is i am unable to choose which data set to run based on a condition. How to use a condition based on which the dataset will be run
    For example : i will read a table column value if it is 'S' means success, then i have to run the dataset to fetch the data from the table.
    If the column value has 'F' then i have to run the dataset which will display failure message
    Please let me know if any of you have any idea on this
    Thanks in advance
    Muthukumaran

    Hi Chinna,
    You have to use some scripting as well as coding to perform the tasks listed by you. First of all make your form Dynamic, In your Adobe lifecycle Designer, open your form,
    Goto, File --> Form Properties,
    Goto the Defaults tab,
    Select "Dynamic PDF" for the XDP Preview Format:
    Click OK.
    This setting will now allow dynamicity in your Form, when you view it in PDF Preview tab.
    For Hiding/Unhiding the fields/SF, you can use the presence property and set it based on the conditions. like:
    if (this.rawValue == null)
    TextField1.presence = "hidden";
    For your second task, you may map a method corresponding to onSubmit event of the IF and write the code to create the workflow and make RFC call here.
    For third one, you need to convert the PDFObject from Binary context into a byte array and save it at appropriate location.
    Hope I have answered all your queries.
    Cheers,
    Arafat

  • Date Condition based on time

    Hi :
    I am working on Plant Maintenance module, i extracted work orders ( aufnr ) from AUFK based on some conditions.
    In the selection screen i have s_date option where the user can give any date range .my question is ...after selecting all the work orders, i want to count work orders whose status is conformed and date condition is " For the calender week X, work order actual end date ( getri ) should not be later than the week ending of sunday night 11:59pm " .
    Here calender week X, starts on monday morning 00:01 am and ends sunday night 11:59pm
    I am able to extract work orders whose status is conformed , but i need logic for tha date condition based on the time ie, end date should not be later than the week ending of sunday night 11:59pm.
    points will be rewarded ..
    Thx.
    Raghu

    if you want the current date and time you can check with sy-datum or sy-uzeit.
    Or you can find if there is any date and time fields in the table and compare them against the date you want to.
    I am not sure if youa re looking for this.

  • How to cummulate the quantity based on the date condition?

    hi,
         In my query,i need to cummulate the open quantity based on the two date condition.
    If my Schedule line date > system date, i need to cummulate the open quantity.
          But in my query level i am getting 0 or 1 based on the above condition.
          i am struggling to cummulate the open qty based on the above condition.
        can any body throws an idea to resolve my issue.
    Regards,
    ravi.

    Thanks for suggestion,Almost i narrow down my issue to get the proper result.
    But  i have one doubt.
    Is it possible to user Formula variable  (Processing by replacement path-Reference char as Scheduline date) in my  Calculated Key Fig calculation.?? But here i am created  Scheduline date as Characher infoobject.
    Actually i am created Scheduline date as Character InfoObject,If i am using the following condition like
    (Schedule line date > system date) its throwing "X" value.
    For the above issue,if i am changing the Scheduline date as Key figure InfoObject means i will get the proper output for the condition(Schedule line date > system date) either 0 or 1.
    Is it correct????
    Regards,
    Ravi.

  • Trying to alter font on a report row based on data condition

    Hello.
    I have an Apex application with a "classic" SQL report and a corresponding form.
    In the report region I am pulling all items from a table (Select * from TASKS)
    The TASKS table contains many columns including DUE_DATE and COMPLETE_DATE field.
    I am trying to find a way to format the rows in my report based on the condition of those two fields.
    If the record has a complete_date (not null) then I want to change the font for the entire row (each column) to be grey.
    If the record does not have a complete_date (null) and due_date is before today, I want the row to be bold and red.
    Otherwise, the row would display standard black text.
    I can't seem to find a straightforward way to do this in Apex.

    Hi JodyMorin,
    Try looking at this post:
    Conditional item formatting (color)
    You will need to tweak the code a bit for your needs, but I hope it helps.
    -Marc

  • Date Condition

    Hi :
    I am working on Plant Maintenance module, i extracted work orders ( aufnr ) from AUFK based on some conditions, i am wondering to know how to code date condition for these.In the selection screen i have s_date option where the user can give any date range .my question is ...after selecting all the work orders i want only those work orders whose status is conformed and date condition is " For the calender week X, work order actual end date ( getri ) should not be later than the week ending of sunday night 11:59pm " .
    I am able to extract work orders whose status is conformed , but i need logic for tha date condition.
    points will be rewarded ..
    Thx.
    Raghu

    Hi
    For selecting records between date range,  s_date-low and s_date-high for a record which contains begin date field as begda and end date field as endda (This is for HR tables).
    We give date conditions as endda >= s_date-low AND begda <= s_date-high.
    When the user clicks on the checkbox, change the s_date-high to the appropriate date and you can filter records accordingly.
    Regards
    Navneet

  • Date condition not working correctly in Desktop

    Hello,
    I have two custom folders in Admin that are joined. One of the folders contains the following query:
    SELECT ORGANIZATION_ID, ASSET_NUMBER, MIN(CURRENT_READING_DATE) FIRST_READ_DATE, MIN(CURRENT_READING) FIRST_READING
    FROM EAM_METER_READINGS_V
    WHERE PREV_DESC IS NULL
    Group By ORGANIZATION_ID, ASSET_NUMBER
    I want my workbook to report the earliest meter reading that exists, based on the date that is specified in the parameters in Desktop. When I create a parameter for the date, the workbook reports the earliest reading in the database; it ignores the date restriction entered in the parameter. This is the parameter:
    First Read Date MIN BETWEEN :First Reading Date and SYSDATE
    If I include the date condition in the SQL of the custom folder the workbook functions exactly as it should. The date condition is in the SQL as the following:
    and current_reading_date between '01-JAN-2007' and SYSDATE
    Since the workbook functions correctly when the condition is coded in the SQL but not when it is based on a parameter, I assume the problem is with the parameter. Any ideas on how I may correct this?
    Thanks,
    Steve

    Thanks for the response Michael. I tried using the MIN function as you suggested, but I still am not getting the expected result. I’m not sure that I was clear in my initial problem description. I will try to provide more detail with this post.
    The reason I have two custom folders is that my original query has a nested Select statement (EAMV) and I couldn’t find a way to pass the parameter from EAMV to Discoverer. Following is the original query. I suppose the first logical questions would be, is there a way to pass the parameter to Discoverer? Would this alleviate the need for the second custom folder?
    SELECT K.ORGANIZATION_CODE "ORG" -- ORGANIZATION
    , K.ORGANIZATION_ID
    ,A.NAME "PM SCHEDULE NAME" -- PREVENTIVE MAINTENANCE SCHEDULE NAME
    --( (B.RUNTIME_INTERVAL/F.USER_DEFINED_RATE) + D.LAST_SERVICE_END_DATE) "PROJECTED READ DATE" -- USES USER_DEFINED_RATE FROM METER DEFINITION
    ,(C.LAST_SERVICE_READING + B.RUNTIME_INTERVAL) "PROJECTED READ UNITS" -- NEXT SERVICE READING DUE UNITS
    ,F.METER_UOM "UOM" -- UNIT OF MEASURE ON METER
    ,F.METER_NAME "METER NAME" -- METER NAME
    ,G.SERIAL_NUMBER "MAINT EQ NO" -- MAINTAINED EQUIPMENT NUMBER
    ,H.C_ATTRIBUTE1 "MAKE" -- MAINTAINED EQUIPMENT NUMBER - MAKE/MANUFACTURER
    ,H.C_ATTRIBUTE2 "MODEL" -- MAINTAINED EQUIPMENT NUMBER - MODEL
    ,H.C_ATTRIBUTE4 "SERIAL NO" -- MAINTAINED EQUIPMENT NUMBER - SERIAL NUMBER
    ,I.SEGMENT1 "ACTIVITY" -- ASSET ACTIVITY
    ,D.LAST_SERVICE_END_DATE "LAST READ DATE" -- DATE OF LAST PM SERVICE READING
    ,C.LAST_SERVICE_READING "LAST READ UNITS" -- UNITS OF LAST PM SERVICE READING
    ,E1.CURRENT_READING_DATE "CURRENT READ DATE" -- DATE OF CURRENT SERVICE READING (FROM METER FORM)
    ,E1.CURRENT_READING                                   "CURRENT READ UNITS" -- UNITS OF CURRENT SERVICE READING (FROM METER FORM)
    ,E1.LIFE_TO_DATE_READING "LIFE TO DATE READING" LIFE TO DATE READING
    --,(E1.CURRENT_READING - C.LAST_SERVICE_READING) "CURRENT/LAST VARIANCE" -- UNITS SINCE LAST PM SERVICE READING
    ,( (C.LAST_SERVICE_READING + B.RUNTIME_INTERVAL) - E1.CURRENT_READING ) "PROJECTED/CURR VARIANCE" -- UNITS REMAINING UNTIL NEXT SCHEDULED READING
    ,J.DESCRIPTION "LOCATION" -- OWNING DEPARTMENT DESCRIPTION OF ASSET NUMBER
    ,J.DEPARTMENT_CODE
    ,E1.DISABLE_FLAG
    ,G.CURRENT_STATUS
    ,B.RUNTIME_INTERVAL
    ,Y.SET_NAME
    ,EAMV.FIRST_READ_DATE READ_DATE
    ,EAMV.FIRST_READING READING
    FROM EAM.EAM_PM_SCHEDULINGS A
    ,EAM.EAM_PM_SCHEDULING_RULES B
    ,EAM.EAM_PM_LAST_SERVICE C
    ,INV.MTL_EAM_ASSET_ACTIVITIES D
    ,EAM.EAM_ASSET_METERS E
    ,EAM.EAM_METER_READINGS E1
    ,EAM.EAM_METERS F
    ,INV.MTL_SERIAL_NUMBERS G
    ,INV.MTL_EAM_ASSET_ATTR_VALUES H
    ,INV.MTL_SYSTEM_ITEMS_B I
    ,BOM.BOM_DEPARTMENTS J
    ,INV.MTL_PARAMETERS K
    ,EAM.EAM_PM_SET_NAMES Y
         ,(SELECT ORGANIZATION_ID, ASSET_NUMBER, MIN(CURRENT_READING_DATE) FIRST_READ_DATE, MIN(LIFE_TO_DATE_READING) FIRST_READING
              FROM EAM_METER_READINGS_V
              WHERE CURRENT_READING_DATE BETWEEN '01-JAN-2007' AND '30-JUN-2007'
              GROUP BY ORGANIZATION_ID, ASSET_NUMBER) EAMV
    WHERE A.PM_SCHEDULE_ID = B.PM_SCHEDULE_ID
    AND A.ACTIVITY_ASSOCIATION_ID = C.ACTIVITY_ASSOCIATION_ID
    AND C.ACTIVITY_ASSOCIATION_ID = D.ACTIVITY_ASSOCIATION_ID
    AND D.SERIAL_NUMBER = E.ASSET_NUMBER
    AND D.ORGANIZATION_ID = E.ORGANIZATION_ID
    AND E.METER_ID = E1.METER_ID
    AND E1.METER_READING_ID =
    (SELECT MAX(METER_READING_ID)
    FROM EAM_METER_READINGS
    WHERE METER_ID = E1.METER_ID
    AND (DISABLE_FLAG = 'N' OR DISABLE_FLAG IS NULL))
    AND E.METER_ID = C.METER_ID
    AND E.METER_ID = B.METER_ID
    AND E.METER_ID = F.METER_ID
    AND D.MAINTENANCE_OBJECT_ID = G.GEN_OBJECT_ID
    AND D.ORGANIZATION_ID = G.CURRENT_ORGANIZATION_ID
    AND G.SERIAL_NUMBER = H.SERIAL_NUMBER
    AND G.CURRENT_ORGANIZATION_ID = H.ORGANIZATION_ID
    AND D.INVENTORY_ITEM_ID = H.INVENTORY_ITEM_ID
    AND H.ATTRIBUTE_CATEGORY = 'EQUIPMENT DETAILS'
    AND D.ASSET_ACTIVITY_ID = I.INVENTORY_ITEM_ID
    AND D.ORGANIZATION_ID = I.ORGANIZATION_ID
    AND G.OWNING_DEPARTMENT_ID = J.DEPARTMENT_ID (+)
    AND I.ORGANIZATION_ID = K.ORGANIZATION_ID
    AND A.SET_NAME_ID = Y.SET_NAME_ID
    AND Y.SET_NAME IN ('MAIN','COMP')
    AND G.CURRENT_ORGANIZATION_ID = EAMV.ORGANIZATION_ID
    AND G.SERIAL_NUMBER = EAMV.ASSET_NUMBER
    AND K.ORGANIZATION_CODE = 'MCC'
    Using this query I want to show the most recent reading (current reading) and then give users the flexibility to enter an earlier date so the earliest reading as of that date will also show. For example, if they enter 1-JAN-2007 as the parameter and there was a reading taken on 2-JAN-07 and 28-JAN-07, the report should show the 2-JAN-2007 reading (in addition to the most recent reading in a separate column). Currently, everything on the report displays correctly, except for the reading based on the parameter.

  • Teradata database error when using a Universe-defined Date condition

    I have encountered an odd problem when connecting Crystal to a Universe.  There is a pre-defined Date condition built into the Universe that is defined as follows:
    @Select(Date\Week End Date)  >  @Select(Conditions\User Response Select Date week -28)  AND @Select(Date\Week End Date)  <=  @Select(Conditions\User Response Select Date)
    The filter is designed to retrieve a rolling 4 weeks of data.
    When I try and create and refresh a Crystal Report that includes this Date prompt, I get the following error:
    Failed to retrieve data from the database.
    Details: 22003:(ODBC Teradata Driver)(Teradata Database) A character string failed conversion to a numeric value.
    If I create the same query in a WebI report it works fine, but in Crystal the error is produced.  I have also tried constructing the same prompt and filter within Crystal rather than use the pre-built prompt but that did not work either.
    Does anyone have any experience or advice on this error?  I can't seem to find many related postings on this specific error.
    BO Enterprise XI 3.1 SP2 running on Windows 2008 Server R2
    Crystal Reports 2008 SP2 running on Windows XP SP3
    Universe is built on a Teradata 12 source
    Thanks!

    One item I found I had to do with Teradata was cast my date/time values to dates, otherwise I got weird errors like this. You say it's working in Web Intelligence, so this might not be the issue, but it is an easy thing to test.
    In the universe, change your end date definition to
    cast(table.end_date as date)
    and see if that helps.

  • SubSelect Not filter data for Parent/Child hierarchy

    I have data for my parent /child dimension like that
    DimCust
    Fact Sal
    Customer ID
    Parent ID
    Customer Type
    Product Id
    Customer ID
    Year
    Sales
    1
    1
    Retailer
    4
    1
    2015
    100
    2
    1
    Retailer
    4
    2
    2014
    200
    3
    3
    Retailer
    4
    3
    2014
    300
    4
    3
    Retailer
    4
    4
    2015
    400
    5
    5
    Retailer
    4
    5
    2015
    500
    In my query,
     I use sub select to filter 
    data for year 2014c and product  id 4,  when I got result
     it’s missed the aggregation of customer id 1 and 4.
     Even I try to pass in where clause it’s also not give correct result.
    code,
    with
       set ba EXISTS([DIMCustomer].[Level 02].allmembers, [DIMCustomer].[Hierarchy].&[MyHierarchy],"factTable")
       SELECT
    [Measures].[Sales]
      } ON 0,
    [ba]on 1
    FROM (SELECT ( { [CropYear].[CropYear].&[2014] } ) ON COLUMNS
    FROM (SELECT ( { [DimProduct].[ProductID].[4] } ) ON COLUMNS
    FROM [myCube]))
    please help me on this, what is the best practices.
    Regards,
    Manish

    Hi manishcal16PPS,
    According to your description, you want to slice the fact data on Year 2014 and Product 4. Now you find the result missing the customer 1 and 4. Right?
    In this scenario, based on your Fact Sal table, both customer 1 and 4 are on Year 2015. So when you filter the data, it will not show customer 1 and 4. It returns correct result. For filtering data, either using sub select or specifying slicer axis
    can achieve your requirement.
    Reference:
    Specifying the Contents of a Slicer Axis (MDX)
    Best Regards,
    Simon Hou
    TechNet Community Support

  • How to filter data from a source XML? Please help!

    Hi Experts,
       I have a source XML as shown below:
        <Inventory>
         <InventoryItem>
           <ItemCode>InTransit</ItemCode>
           <Quantity>1000</Quantity>
         </InventoryItem>
         <InventoryItem>
           <ItemCode>Available</ItemCode>
           <Quantity>1500</Quantity>
         </InventoryItem>
         <InventoryItem>
           <ItemCode>Restricted</ItemCode>
           <Quantity>2500</Quantity>
         </InventoryItem>
        </Inventory>
    My Target XML is as below
        <Inventory>
          <stock>1500</stock>
        </Inventory>
    The stock element contains Quantity value where ItemCode is 'Available'.
    But note that there are 3 InventoryItem nodes.
    So how to get the desired target XML in XI mapping? Basically I have to filter data from source XML based on value of an element. What is the best approach to handle this?
    Kindly help
    Thanks
    Gopal

    Hi venkat,
              Your solution does'nt work fine. But why are you using collapsecontext and splitbyvalue before putting the value into stock element?
               Kindly explain your concept.
    My target message is:
    <?xml version="1.0" encoding="UTF-8"?>
    <Inventory>
       <InventoryItem>
          <ItemCode>InTransit</ItemCode>
          <Quantity>1500</Quantity>
       </InventoryItem>
       <InventoryItem>
          <ItemCode>Available</ItemCode>
          <Quantity>1000</Quantity>
       </InventoryItem>
       <InventoryItem>
          <ItemCode>UnRestricted</ItemCode>
          <Quantity>2000</Quantity>
       </InventoryItem>
       <InventoryItem>
          <ItemCode>Available</ItemCode>
          <Quantity>2500</Quantity>
       </InventoryItem>
    </Inventory>
    I am getting the output even though stock is unbounded and I have used collapsecontext and splitbyvalue as:
    <InvStock>
      <Stock>1000</Stock>
    </InvStock>
    I should get:
    <InvStock>
      <Stock>1000</Stock>
      <Stock>2500</Stock>
    </InvStock>
    Thanks
    Gopal
    Message was edited by:
            gopalkrishna baliga

  • Oracle Apps Custom Form, How to Filter data in the LOV

    Detail Data Block I am Calling One LOV, Based on Master Block Item I want to filter data in the LOV.
    in the select statement
    SELECT * FROM MTL_SYSTEM_ITEMS WHERE
    ORGANIZATION_ID = :BLOCK_NAME.FIELD_NAME
    specified
    but it is showing no data found error.

    Do this:
    MESSAGE(:BLOCK_NAME.FIELD_NAME);
    MESSAGE(:BLOCK_NAME.FIELD_NAME);
    SELECT * FROM MTL_SYSTEM_ITEMS WHERE
    ORGANIZATION_ID = :BLOCK_NAME.FIELD_NAME
    This will tell you the value of BLOCK_NAME.FIELD_NAME
    Then use PLSQL and run the query using the value of BLOCK_NAME.FIELD_NAME
    and see if you get data. If you don't get data using PLSQL, then you won't get data using LOV.

  • How to filter data in JSP?

    Hi All,
    I have to filter data before I can display a drop down in my JSP. The scenario is as follows
    There are 2 buttons on screen A. Button B1 and button B2.
    Clicking on any one of these will result in screen B being displayed.
    But if B1 is clicked then option 'ABC' should not be displayed in my dropdown.
    If B2 is pressed only ABC should be displayed in the same field. (this is not a drop down now).
    The current code snippet to fetch the data from the DB and display in the dropdown is:
    <tr>
    <td align="right" class="label" scope="row">
    <span class="red"><html:label name="*" fieldId="<sectionId>.reasonId"/></span> 
    <html:label name="Reason:" fieldId= "<sectionId>.reasonId" />
    </td>
    <td colspan="2">
    <html:select name= "VoidPaymentForm" property = "paymentHeader.reasonId"
    fieldId = "<sectionId>.paymentHeader.reasonId" onchange="voidPaymentNSF();">
    <refdata:load id="listReason" source="<%=RefDataConstants.REASON %>"
    name = "VoidPaymentForm" property="paymentHeader.reasonId"
    parentSource="<%=RefDataConstants.ACCOUNTING_TRANSACTION_TYPE%>"
    parentCodeValue="reasonCodeRef" />
    <html:option value=""> </html:option>
    <refdata:options collection="listReason" labelProperty="label" property="value"/>
    </html:select>
    </td>
    </tr>
    Appreciate your help.
    Thanks and Regards,
    Ashley

    first, your screen A needs to send the information which button has been clicked. Then screen B needs to retrieve this value, if I'm not mistaken (it has been a view years ago, that I've written JSPs), you can put the html code within an if-statement. So, only when the condition is true, it will use the html code within.

  • Filter data in reports

    I would like to filter data in my report as below
    A column >>> revenue value if percentage = "100"
    B column >>> revenue value if percentage <>"100"
    How can I do this? Anyone can help me? Thank you very much.

    If both of your columns are measures then click on Fx of both the columns and choose filter. Then select revenue field from the left hand side and put in the appropriate condition.
    More useful information could be found <a href = "http://forums.oracle.com/forums/thread.jspa?threadID=955229&tstart=0" target = "_blank">here in the forum itself</a>
    Edited by: Max_Payne on Sep 10, 2009 1:16 PM

Maybe you are looking for

  • External USB drive partition not mounting after upgrade to 10.6.6

    Hello, I have a Mac Mini and have an external HDD (Seagate GoFlex Desk) setup with two partitions with "Mac OS Extended (Journaled)" format. After the recent OS upgrade, only one partition mounts. I have tried to verify/repair from DiskUtility and it

  • Choosing a partition map for an external usb, to be used with an external tv/media player

    hi there, i was wondering if the type of partition map makes a difference if I am to transfer movies from my mac onto a usb, which will then slot into the usb slot on my samsung tv, which has a medial player built in ? I am assuming that these media

  • Dreamweaver CS4 - Dynamic Form Question

    Hello you all.  I've been tasked with developing a form for my company that allows a user to add as many contacts into a form field as they like, i.e., they would enter a contact first and last name and then click on a "+" sign or button to add anoth

  • Can A SinglePlant  in some scenario Be assigned to two company codes?

    Hi, I want to know under what scenarios a single Plant can be assigned to Two Company codes. SAP allows me to assign the same without any error in T code OX 18. And I also know that since valuation is carried at plant level and it is not a good pract

  • Not calculating tax!

    Hi freinds, Whenever i am trying to give tax code in invoice, it is not calculating the tax and is giving a message "Customization for SWI1 j_1iindcus missing in the table"  where SWI1 is my company code. Can anybody tell what the problem is and how