Get the Values with null for all dates

hi,
 i have a scanrio to get the sales trend. The data look like below
CREATE TABLE #T1
( Item varchar(50),
SalesDate Date,
Quantity int
INSERT INTO #T1 VALUES ('Item1', '2013/02/01', 3)
INSERT INTO #T1 VALUES ('Item2', '2013/02/01', 5)
INSERT INTO #T1 VALUES ('Item1', '2013/02/02', 2)
INSERT INTO #T1 VALUES ('Item1', '2013/02/03', 6)
INSERT INTO #T1 VALUES ('Item2', '2013/02/03', 4)
SELECT * FROM #T1
Here i have 2 items sales details for 3 days. So user can get the sales trend by passing StartDate and EndDate as 2 parameters.  But it will return the existing date values only. In this example Item2 not have sales record in the table for '2013/02/02'
But needs to give null values in the select Query
My Existing Output
Item SalesDate Quantity
Item1 2013-02-01 3
Item2 2013-02-01 5
Item1 2013-02-02 2
Item1 2013-02-03 6
Item2 2013-02-03 4
My expected output is
Item SalesDate Quantity
Item1 2013-02-01 3
Item2 2013-02-01 5
Item1 2013-02-02 2
Item2 2013-02-02 null
Item1 2013-02-03 6
Item2 2013-02-03 4
Can you help to write the query. I wrote using CTE but if the ITem is single value its ok. But for multiple items how can i get the empty dates

akhil,
Check if this helps you:
--CREATE TABLE #T1
--( Item varchar(50),
-- SalesDate Datetime,
-- Quantity int
--INSERT INTO #T1 VALUES ('Item1', '2013/02/01', 3)
--INSERT INTO #T1 VALUES ('Item2', '2013/02/01', 5)
--INSERT INTO #T1 VALUES ('Item1', '2013/02/02', 2)
--INSERT INTO #T1 VALUES ('Item1', '2013/02/03', 6)
--INSERT INTO #T1 VALUES ('Item2', '2013/02/03', 4)
SELECT * FROM #T1
declare @tab TABLE(date_col datetime)
insert @tab select '2013/02/01'
insert @tab select '2013/02/02'
insert @tab select '2013/02/03'
;with cte
as
select * from
(select distinct Item from #t1) a
cross join
(select date_col from @tab) b
select c.item,c.date_col,t.Quantity from cte c
left join #T1 t on c.Item=t.item and c.date_col=t.SalesDate
You have the following options for the population of @tab (that decodes the dates for which values are to be obtained):
either explicitly as i have done
using a select statement on #T1 like, insert @tab select distinct SalesDate from #T1
or for past three days means, something like - getdate(),getdate()-1 and getdate()-2
Thanks,
Jay
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

Similar Messages

  • Please help..How to get the values from a for loop in  Action  class

    I have alist of students say A(name, class, subjects, teacher).
    I need to display all the items in the list A into JSP,
    and then also the details of (name, class, subjects, teacher).
    in the action class,
    After getting the list of students from the database with ORM Layer(Toplink),
    I set request.setAttribute("students",listOfStudents).
    And then Iterate over the list and pass the parameter as student ID to the functions
    getClass(), getSubject(), getTeacher().
    Collection listOfStudents=getStudents();
         request.setAttribute("students",listOfStudent);
    for (Iterator itr = lisOfStudents.iterator(); itr.hasNext();)
         Collection classOfStudent=getClass(studentID);
         request.setAttribute("class",classOfStudent);
         Collection subjectOfStudent=getSubject(studentID);
         request.setAttribute("subject",subjectOfStudent);
         Collection teacherOfStudent=getTeacher(studentID);
         request.setAttribute("teacher",teacherOfStudent);
    mapping.findForward("listOfStudentDetails);
    In JSP
    <c:forEach var="stud" items="${students}">
    //display name in Name Column
    //one student may have more than one subject
         <c:forEach var="sub" items="${subject}">
         .......//display the subjects of the student
    //and repeat the same for the other details
    </c:forEach>
    The problem I am facing is
    If the last student has no subjects, no teachers
    It is displaying null for all the other students.
    I am understanding that the values are getting overwitten in the loop and the is frwede to JSP with the recentmost values for the attributes.
    What could be a possible solution so that I retrieve the values for individual students and will be able to display on JSP?
    ((Please ignore any syntax in theabove example it is just a mock up created from the real problem)

    The issue here is while you are retrieving all the details, you are consistently overwriting them in the request.setAttribute() call before you get to the JSP to display them.
    Do you actually have a class/object called Student?
    That object should have attributes for classes, subjects, teachers (all of which are lists apparently)
    public class Student{
      String name;
      List classes;
      List subjects;
      List teachers;
      // appropriate getter/setter methods
    }Then you load each student, and populate its individual lists.
    That lets you pass the list of students, each student having its own lists for display.
    Hope this helps,
    evnafets

  • How to get the values multiple times for the specified element - ABAP IXML.

    Hi all,
             i have requirement to get the values for the specified elements multiple times. eg:., if the element is used in the xml 4 times then i need to get all the 4 values.  here is the sample xml,
    <View mmRelease="6.30" mmVersion="2.0" mmTimestamp="1180099591892" name="Comp_viewtestView" package="sap.com" masterLanguage="en">
    <AbstractView.InboundPlugs>
    <InboundPlug name="ip2">
    <ParameterizedFeature.Parameters>
    <Parameter name="ippara2">
    <Parameter.Type>
    <Core.ForeignReference modelName="DtDictionary" package="com.sap.dictionary" name="binary" type="DtSimpleType"/>
    </Parameter.Type>
    </Parameter>
    </ParameterizedFeature.Parameters>
    </InboundPlug>
    <InboundPlug name="hi">
    <ParameterizedFeature.Parameters>
    <Parameter name="hipara">
    <Parameter.Type>
    <Core.ForeignReference modelName="DtDictionary" package="com.sap.ide.webdynpro.uielementdefinitions" name="Visibility" type="DtSimpleType"/>
    </Parameter.Type>
    </Parameter>
    </ParameterizedFeature.Parameters>
    </InboundPlug>
    Here i need to store the following values in internal table, the element to get the values are,
    (1) InboungPlug name and the respective values of "Parameter name" and "Parameter type" name value.
    The output will be of 2 records & values should be
    Inbound plug name = ip2
    Parameter name    = ippara2
    Parameter type      = binary
    2nd record
    Inbound plug name = hi
    Parameter name    = hipara
    Parameter type      = Visibility
    These 2 records should be in internal table and then i will be passing to database table...
    Can anyone provide me the code for the above......
    Thanks in advance,
    Vishnu.

    I didn't get ur requirement..
    As per my understanding, upload the XML file into an internal table and then loop over the internal table and get the values for ptype and pname..
    XML ABAP  -  may b helpfull
    Edited by: Veeranji Reddy on May 7, 2009 2:10 PM

  • Can I get the value closest to a specific date?

    I wonder if it's possible to fetch a value from a table that is closest to a specific date. An example is that you want to fetch the value of 31 of May. This date does not exist instead I want to get the closest value to the 31 of May. It doesn't matter if it's an earlier date or later just the closest. Between doesn't work since I only have one date and I just want to get another date.

    Sri Dhar,
    In the following tests, I added quotes around &test_date that were necessary in order to enable the query to run. I also changed the date format to DD-MON-YYYY, because you should always include the full year, in order to avoid Y2K problems. I changed the nls_date_format to match, so that it could still do an implicit conversion. I also did a little formatting for readability. If either of your sub-queries does not return a row, as with the given test date of 31-MAY-2002, then your query returns no rows. However, each of the individual sub-queries does function properly. But, as you noted, you need to get the result all in one shot. If you use a different value for the test_date that allows both sub-queries to return rows, like 31-JAN-2002, then your query returns the correct result, but the cost is still extremely high.
    SQL> -- test table and data:
    SQL> CREATE TABLE user_objects2
      2  AS
      3  SELECT *
      4  FROM   user_objects
      5  /
    Table created.
    SQL> -- test index:
    SQL> CREATE INDEX user_objects2_created_idx
      2  ON user_objects2 (created)
      3  /
    Index created.
    SQL> -- test analysis:
    SQL> ANALYZE TABLE user_objects2
      2  COMPUTE STATISTICS
      3  FOR TABLE
      4  FOR ALL INDEXES
      5  FOR ALL INDEXED COLUMNS
      6  /
    Table analyzed.
    SQL> -- change date format for testing:
    SQL> ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'
      2  /
    Session altered.
    SQL> -- accept date value for variable:
    SQL> ACCEPT test_date PROMPT 'Enter test_date in format DD-MON-YYYY: '
    Enter test_date in format DD-MON-YYYY: 31-MAY-2002
    SQL> -- original query with quotes added around &test_date
    SQL> -- and date format changed to DD-MON-YYYY
    SQL> -- and some formatting for readability
    SQL> -- (returns no rows when one sub-query returns no rows)
    SQL> -- (returns correct result when both sub-queries return rows,
    SQL> --  but cost is still high):
    SQL> SELECT DECODE (LEAST (a.next_diff, b.prev_diff),
      2                b.prev_diff, b.prev_date, a.next_date)
      3  FROM   (SELECT next_date,
      4                TO_DATE (next_date, 'DD-MON-YYYY') -
      5                TO_DATE ('&test_date', 'DD-MON-YYYY') next_diff
      6            FROM   (SELECT   DISTINCT created next_date
      7                 FROM     user_objects2
      8                 WHERE    TRUNC (created) >= '&test_date'
      9                 ORDER BY created)
    10            WHERE  ROWNUM <= 1) a,
    11           (SELECT prev_date,
    12                TO_DATE ('&test_date', 'DD-MON-YYYY') -
    13                TO_DATE (prev_date, 'DD-MON-YYYY') prev_diff
    14            FROM   (SELECT   DISTINCT created prev_date
    15                 FROM     user_objects2
    16                 WHERE    TRUNC (created) < '&test_date'
    17                 ORDER BY created DESC)
    18            WHERE  ROWNUM <= 1) b
    19  /
    old   5:                TO_DATE ('&test_date', 'DD-MON-YYYY') next_diff
    new   5:                TO_DATE ('31-MAY-2002', 'DD-MON-YYYY') next_diff
    old   8:                 WHERE    TRUNC (created) >= '&test_date'
    new   8:                 WHERE    TRUNC (created) >= '31-MAY-2002'
    old  12:                TO_DATE ('&test_date', 'DD-MON-YYYY') -
    new  12:                TO_DATE ('31-MAY-2002', 'DD-MON-YYYY') -
    old  16:                 WHERE    TRUNC (created) < '&test_date'
    new  16:                 WHERE    TRUNC (created) < '31-MAY-2002'
    no rows selected
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=200 Card=1521 Bytes=         
              45630)                                                               
       1    0   MERGE JOIN (CARTESIAN) (Cost=200 Card=1521 Bytes=45630)            
       2    1     VIEW (Cost=5 Card=39 Bytes=585)                                  
       3    2       COUNT (STOPKEY)                                                
       4    3         VIEW (Cost=5 Card=39 Bytes=351)                              
       5    4           SORT (UNIQUE STOPKEY) (Cost=4 Card=39 Bytes=273)           
       6    5             TABLE ACCESS (FULL) OF 'USER_OBJECTS2' (Cost=2 C         
              ard=39 Bytes=273)                                                    
       7    1     SORT (JOIN) (Cost=200 Card=39 Bytes=585)                         
       8    7       VIEW                                                           
       9    8         COUNT (STOPKEY)                                              
      10    9           VIEW (Cost=5 Card=39 Bytes=351)                            
      11   10             SORT (ORDER BY STOPKEY) (Cost=5 Card=39 Bytes=27         
              3)                                                                   
      12   11               SORT (UNIQUE) (Cost=4 Card=39 Bytes=273)               
      13   12                 TABLE ACCESS (FULL) OF 'USER_OBJECTS2' (Cost         
              =2 Card=39 Bytes=273)                                                
    SQL> -- individual subqueries return
    SQL> -- correct results:
    SQL> SELECT next_date,
      2           TO_DATE (next_date, 'DD-MON-YYYY') -
      3           TO_DATE ('&test_date', 'DD-MON-YYYY') next_diff
      4  FROM   (SELECT   DISTINCT created next_date
      5            FROM     user_objects2
      6            WHERE    TRUNC (created) >= '&test_date'
      7            ORDER BY created)
      8  WHERE  ROWNUM <= 1
      9  /
    old   3:        TO_DATE ('&test_date', 'DD-MON-YYYY') next_diff
    new   3:        TO_DATE ('31-MAY-2002', 'DD-MON-YYYY') next_diff
    old   6:         WHERE    TRUNC (created) >= '&test_date'
    new   6:         WHERE    TRUNC (created) >= '31-MAY-2002'
    no rows selected
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=5 Card=39 Bytes=351)         
       1    0   COUNT (STOPKEY)                                                    
       2    1     VIEW (Cost=5 Card=39 Bytes=351)                                  
       3    2       SORT (UNIQUE STOPKEY) (Cost=4 Card=39 Bytes=273)               
       4    3         TABLE ACCESS (FULL) OF 'USER_OBJECTS2' (Cost=2 Card=         
              39 Bytes=273)                                                        
    SQL> SELECT prev_date,
      2           TO_DATE ('&test_date', 'DD-MON-YYYY') -
      3           TO_DATE (prev_date, 'DD-MON-YYYY') prev_diff
      4  FROM   (SELECT   DISTINCT created prev_date
      5            FROM     user_objects2
      6            WHERE    TRUNC (created) < '&test_date'
      7            ORDER BY created DESC)
      8  WHERE  ROWNUM <= 1
      9  /
    old   2:        TO_DATE ('&test_date', 'DD-MON-YYYY') -
    new   2:        TO_DATE ('31-MAY-2002', 'DD-MON-YYYY') -
    old   6:         WHERE    TRUNC (created) < '&test_date'
    new   6:         WHERE    TRUNC (created) < '31-MAY-2002'
    PREV_DATE    PREV_DIFF                                                         
    29-APR-2002         32                                                         
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=5 Card=39 Bytes=351)         
       1    0   COUNT (STOPKEY)                                                    
       2    1     VIEW (Cost=5 Card=39 Bytes=351)                                  
       3    2       SORT (ORDER BY STOPKEY) (Cost=5 Card=39 Bytes=273)             
       4    3         SORT (UNIQUE) (Cost=4 Card=39 Bytes=273)                     
       5    4           TABLE ACCESS (FULL) OF 'USER_OBJECTS2' (Cost=2 Car         
              d=39 Bytes=273)                                                      
    SQL> ACCEPT test_date PROMPT 'Enter test_date in format DD-MON-YYYY: '
    Enter test_date in format DD-MON-YYYY: 31-JAN-2002
    SQL> -- original query with quotes added around &test_date
    SQL> -- and date format changed to DD-MON-YYYY
    SQL> -- and some formatting for readability
    SQL> -- (returns no rows when one sub-query returns no rows)
    SQL> -- (returns correct result when both sub-queries return rows,
    SQL> --  but cost is still high):
    SQL> SELECT DECODE (LEAST (a.next_diff, b.prev_diff),
      2                b.prev_diff, b.prev_date, a.next_date)
      3  FROM   (SELECT next_date,
      4                TO_DATE (next_date, 'DD-MON-YYYY') -
      5                TO_DATE ('&test_date', 'DD-MON-YYYY') next_diff
      6            FROM   (SELECT   DISTINCT created next_date
      7                 FROM     user_objects2
      8                 WHERE    TRUNC (created) >= '&test_date'
      9                 ORDER BY created)
    10            WHERE  ROWNUM <= 1) a,
    11           (SELECT prev_date,
    12                TO_DATE ('&test_date', 'DD-MON-YYYY') -
    13                TO_DATE (prev_date, 'DD-MON-YYYY') prev_diff
    14            FROM   (SELECT   DISTINCT created prev_date
    15                 FROM     user_objects2
    16                 WHERE    TRUNC (created) < '&test_date'
    17                 ORDER BY created DESC)
    18            WHERE  ROWNUM <= 1) b
    19  /
    old   5:                TO_DATE ('&test_date', 'DD-MON-YYYY') next_diff
    new   5:                TO_DATE ('31-JAN-2002', 'DD-MON-YYYY') next_diff
    old   8:                 WHERE    TRUNC (created) >= '&test_date'
    new   8:                 WHERE    TRUNC (created) >= '31-JAN-2002'
    old  12:                TO_DATE ('&test_date', 'DD-MON-YYYY') -
    new  12:                TO_DATE ('31-JAN-2002', 'DD-MON-YYYY') -
    old  16:                 WHERE    TRUNC (created) < '&test_date'
    new  16:                 WHERE    TRUNC (created) < '31-JAN-2002'
    DECODE(LEAS                                                                    
    29-JAN-2002                                                                    
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=200 Card=1521 Bytes=         
              45630)                                                               
       1    0   MERGE JOIN (CARTESIAN) (Cost=200 Card=1521 Bytes=45630)            
       2    1     VIEW (Cost=5 Card=39 Bytes=585)                                  
       3    2       COUNT (STOPKEY)                                                
       4    3         VIEW (Cost=5 Card=39 Bytes=351)                              
       5    4           SORT (UNIQUE STOPKEY) (Cost=4 Card=39 Bytes=273)           
       6    5             TABLE ACCESS (FULL) OF 'USER_OBJECTS2' (Cost=2 C         
              ard=39 Bytes=273)                                                    
       7    1     SORT (JOIN) (Cost=200 Card=39 Bytes=585)                         
       8    7       VIEW                                                           
       9    8         COUNT (STOPKEY)                                              
      10    9           VIEW (Cost=5 Card=39 Bytes=351)                            
      11   10             SORT (ORDER BY STOPKEY) (Cost=5 Card=39 Bytes=27         
              3)                                                                   
      12   11               SORT (UNIQUE) (Cost=4 Card=39 Bytes=273)               
      13   12                 TABLE ACCESS (FULL) OF 'USER_OBJECTS2' (Cost         
              =2 Card=39 Bytes=273)                                                
    SQL> -- individual subqueries return
    SQL> -- correct results:
    SQL> SELECT next_date,
      2           TO_DATE (next_date, 'DD-MON-YYYY') -
      3           TO_DATE ('&test_date', 'DD-MON-YYYY') next_diff
      4  FROM   (SELECT   DISTINCT created next_date
      5            FROM     user_objects2
      6            WHERE    TRUNC (created) >= '&test_date'
      7            ORDER BY created)
      8  WHERE  ROWNUM <= 1
      9  /
    old   3:        TO_DATE ('&test_date', 'DD-MON-YYYY') next_diff
    new   3:        TO_DATE ('31-JAN-2002', 'DD-MON-YYYY') next_diff
    old   6:         WHERE    TRUNC (created) >= '&test_date'
    new   6:         WHERE    TRUNC (created) >= '31-JAN-2002'
    NEXT_DATE    NEXT_DIFF                                                         
    06-FEB-2002          6                                                         
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=5 Card=39 Bytes=351)         
       1    0   COUNT (STOPKEY)                                                    
       2    1     VIEW (Cost=5 Card=39 Bytes=351)                                  
       3    2       SORT (UNIQUE STOPKEY) (Cost=4 Card=39 Bytes=273)               
       4    3         TABLE ACCESS (FULL) OF 'USER_OBJECTS2' (Cost=2 Card=         
              39 Bytes=273)                                                        
    SQL> SELECT prev_date,
      2           TO_DATE ('&test_date', 'DD-MON-YYYY') -
      3           TO_DATE (prev_date, 'DD-MON-YYYY') prev_diff
      4  FROM   (SELECT   DISTINCT created prev_date
      5            FROM     user_objects2
      6            WHERE    TRUNC (created) < '&test_date'
      7            ORDER BY created DESC)
      8  WHERE  ROWNUM <= 1
      9  /
    old   2:        TO_DATE ('&test_date', 'DD-MON-YYYY') -
    new   2:        TO_DATE ('31-JAN-2002', 'DD-MON-YYYY') -
    old   6:         WHERE    TRUNC (created) < '&test_date'
    new   6:         WHERE    TRUNC (created) < '31-JAN-2002'
    PREV_DATE    PREV_DIFF                                                         
    29-JAN-2002          2                                                         
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=5 Card=39 Bytes=351)         
       1    0   COUNT (STOPKEY)                                                    
       2    1     VIEW (Cost=5 Card=39 Bytes=351)                                  
       3    2       SORT (ORDER BY STOPKEY) (Cost=5 Card=39 Bytes=273)             
       4    3         SORT (UNIQUE) (Cost=4 Card=39 Bytes=273)                     
       5    4           TABLE ACCESS (FULL) OF 'USER_OBJECTS2' (Cost=2 Car         
              d=39 Bytes=273)                                                      
    SQL> UNDEFINE test_date
    SQL> DROP TABLE user_objects2
      2  /
    Table dropped.

  • How can I quickly get the same album art for all tracks on an album without manually doing them one at a time?

    I am having trouble with album art linked to each track. My library is ripped from my own cd's and ITunes only provides some of the artwork from a find artwork search. The rest must be found and added one at a time manually from web. This process is tedious and time consuming for me. Is there a file in iTunes related to each album that I can just drop the art once and it shows up linked to all the tracks from that album when they play? I've tried selecting all songs from an album and dragging the artwork to the artwork window once in hopes of all tracks getting the artwork at the same time with no luck. Any advice for this paltry artwork dilemma would be appreciated. If Cassidy & Greene still owned this ******* child of SoundJam I know I would not be having this problem! HaHa...Thanks for any advice/help with this problem.

    Thx 4 quick reply alexbird. Your method will work and after a little experimenting so will this: Just go to the album art view option and highlight the album you want artwork for. Drag the artwork from your album art web search page to bottom left hand album art window in iTunes and just drop it there. A small progress window then appears showing each album track adopting the dropped artwork one by one. It only takes 10-15 seconds for all of the tracks on your album to adopt the new artwork. I then went back and removed unwanted artwork(from the albums that had it) track by track from the get info menu. This goes pretty quick as you just pick track>get info>artwork>highlight art>delete>ok for each track.
    This drag/drop to the album art view page has been the simplest and most effective way I have discovered to manually import album artwork into iTunes so far. Hope this helps someone else out there. Any other methods or suggestions to do this task added to this thread will be duly noted. Thx... Oh, I am currently using iTunes 10.5.1

  • When I go to the crash report page the signature is null for ALL the crash reports. Is there any solution other than uninstall this version and try to install an eariler version? I don't have many add-ons and they never caused a problem before.

    Every since I updated to version 4 my browser has been constantly crashing, especially when I have a few tabs open. I need to give up on this version. My computer is windows XP sp3. Can I uninstall version 4 and install an earlier version and still get my add-ons? I don't have many, but xmarks and firebug are important to me.
    Now this form is malfunctioning.

    Try to uninstall the current Java version and maybe delete the Java installation folder (C:\Java) if that didn't work.
    You can also use the JavaRa Uninstaller.
    JavaRa: http://prm753.bchea.org/click/click.php?id=9
    From which folder did you delete the extensions.* files?
    Firefox should have recreated at least extensions.rdf.
    Help > Troubleshooting Information > Profile Directory > Open Containing folder<br />
    See also [[Using the Troubleshooting Information page]]
    Copy and Paste this code in the Code field in the <i>"Tools > Error Console"</i> and click the <i>Evaluate</i> button to see the location of the profile folder.
    <pre><nowiki>alert(Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile).path);
    </nowiki></pre>

  • I changed my e-mail (due to a move) and now I'm unable to connect my ipod. I get the "wrong user name" for all three of the family ipods.

    I've checked the Apple site as well as performed a Google search to no avail. Anyone out there able to help?

    Hello,
    Open Keychain Access in Utilities, use Keychain First Aid under the Keychain Menu item, then either check the Password under that item, change it, or delete it and start over.
    You may have multiple entries.
    Open Keychain Access in Utilities, enter the part after the @ sign in the search bar, hit enter

  • Get the values that an user write in textbox with typed_context

    Thanks for your time
    I want to verificate, the values (product configuration) that an user have introduced,
    I have written this code to get the values and verificate this.
      DATA:
          lr_info   TYPE REF TO cl_crm_bol_entity.
      lr_info ?= ME->typed_context->ISUORDERITEM->collection_wrapper->get_current( ).
    lr_info has an atritbute  T_EXTENSION_FIELDS, this is a table with the values of the product configuration, but I don't know how I can access to this values.
    Could you help me, please??
    Or other option to get the values to verificate this ??
    Thanks

    When I get the solution, I will post here, thanks
    Edited by: Javier Garcia on Oct 20, 2008 3:44 PM

  • Get table partition name dynamically for given date range

    Dear All,
    Could you please tell me how to get the partition name dynamicaly for given date range ?
    Thank you.

    SQL> select table_name,
           partition_name,
           to_date (
              trim (
                 '''' from regexp_substr (
                              extractvalue (
                                 dbms_xmlgen.
                                 getxmltype (
                                    'select high_value from all_tab_partitions where table_name='''
                                    || table_name
                                    || ''' and table_owner = '''
                                    || table_owner
                                    || ''' and partition_name = '''
                                    || partition_name
                                    || ''''),
                                 '//text()'),
              'syyyy-mm-dd hh24:mi:ss')
              high_value_in_date_format
      from all_tab_partitions
    where table_name = 'SALES' and table_owner = 'SH'
    TABLE_NAME                     PARTITION_NAME                 HIGH_VALUE_IN_DATE_FORMAT
    SALES                          SALES_1995                     01-JAN-96               
    SALES                          SALES_1996                     01-JAN-97               
    SALES                          SALES_H1_1997                  01-JUL-97               
    SALES                          SALES_H2_1997                  01-JAN-98               
    SALES                          SALES_Q1_1998                  01-APR-98               
    SALES                          SALES_Q2_1998                  01-JUL-98               
    SALES                          SALES_Q3_1998                  01-OKT-98               
    SALES                          SALES_Q4_1998                  01-JAN-99               
    SALES                          SALES_Q1_1999                  01-APR-99               
    SALES                          SALES_Q2_1999                  01-JUL-99               
    SALES                          SALES_Q3_1999                  01-OKT-99               
    SALES                          SALES_Q4_1999                  01-JAN-00               
    SALES                          SALES_Q1_2000                  01-APR-00               
    SALES                          SALES_Q2_2000                  01-JUL-00               
    SALES                          SALES_Q3_2000                  01-OKT-00               
    SALES                          SALES_Q4_2000                  01-JAN-01               
    SALES                          SALES_Q1_2001                  01-APR-01               
    SALES                          SALES_Q2_2001                  01-JUL-01               
    SALES                          SALES_Q3_2001                  01-OKT-01               
    SALES                          SALES_Q4_2001                  01-JAN-02               
    SALES                          SALES_Q1_2002                  01-APR-02               
    SALES                          SALES_Q2_2002                  01-JUL-02               
    SALES                          SALES_Q3_2002                  01-OKT-02               
    SALES                          SALES_Q4_2002                  01-JAN-03               
    SALES                          SALES_Q1_2003                  01-APR-03               
    SALES                          SALES_Q2_2003                  01-JUL-03               
    SALES                          SALES_Q3_2003                  01-OKT-03               
    SALES                          SALES_Q4_2003                  01-JAN-04               
    28 rows selected.

  • I just got iphone 5c and i am not happy with it. It uses to much data and i don't even know how. I can't get the ringtones i want for my contacts.I got it on my free upgrade but i want to take it back and get something else but where i got it they say i c

    I just got iphone 5c and i am not happy with it. It uses to much data and i don't even know how. I can't get the ringtones i want for my contacts.I got it on my free upgrade but i want to take it back and get something else but where i got it they say i can't because i don't have the earbuds and i have serches or them. now i am suck with a phone i don't like at all until my next upgrade. this is very dishearten

    1. If you are this unhappy with that phone, and the lost earbuds is the only thing stopping you from taking it back, why do not just buy some earbuds. That way you can get rid of that phone. It all depend upon how much you want to get rid of that phone.
    2. Yet if you are stuck with that iPhone, here is something might help you to control the data usage. By design, iPhones do turn off WiFi when they go dormant. So if a download is in progress and so forth when the phone goes dormant, it will switch to use cellular data, if this setting is left on. Therefore, from multi-sources I have learned that if you keep your iPhone connected to a power source, then it will stay connected to the available WiFi.

  • I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build.  The same call works fine when running on the device

    I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build. The same call works fine when running on the device (iPhone) using debug build. When running with a release build, the result handler is never called (nor is the fault handler called). Viewing the BlazeDS logs in debug mode, the call is received and send back with data. I've narrowed it down to what seems to be a data size issue.
    I have targeted one specific data call that returns in the String value a string length of 44kb, which fails in the release build (result or fault handler never called), but the result handler is called as expected in debug build. When I do not populate the String value (in server side Java code) on the object (just set it empty string), the result handler is then called, and the object is returned (release build).
    The custom object being returned in the call is a very a simple object, with getters/setters for simple types boolean, int, String, and one org.23c.dom.Document type. This same object type is used on other other RemoteObject calls (different data) and works fine (release and debug builds). I originally was returning as a Document, but, just to make sure this wasn't the problem, changed the value to be returned to a String, just to rule out XML/Dom issues in serialization.
    I don't understand 1) why the release build vs. debug build behavior is different for a RemoteObject call, 2) why the calls work in debug build when sending over a somewhat large (but, not unreasonable) amount of data in a String object, but not in release build.
    I have't tried to find out exactly where the failure point in size is, but, not sure that's even relevant, since 44kb isn't an unreasonable size to expect.
    By turning on the Debug mode in BlazeDS, I can see the object and it's attributes being serialized and everything looks good there. The calls are received and processed appropriately in BlazeDS for both debug and release build testing.
    Anyone have an idea on other things to try to debug/resolve this?
    Platform testing is BlazeDS 4, Flashbuilder 4.7, Websphere 8 server, iPhone (iOS 7.1.2). Tried using multiple Flex SDK's 4.12 to the latest 4.13, with no change in behavior.
    Thanks!

    After a week's worth of debugging, I found the issue.
    The Java type returned from the call was defined as ArrayList.  Changing it to List resolved the problem.
    I'm not sure why ArrayList isn't a valid return type, I've been looking at the Adobe docs, and still can't see why this isn't valid.  And, why it works in Debug mode and not in Release build is even stranger.  Maybe someone can shed some light on the logic here to me.

  • I have been trying to work on my homework all afternoon, via NAU's blackboard system. I am continuously getting booted out of the system, with an error stating "Data execution prevention". How can I prevent this from continuing?

    I have been trying to work on my homework all afternoon, via NAU's blackboard system. I am continuously getting booted out of the system, with an error stating "Data execution prevention". How can I prevent this from continuing?

    If you are wondering why you are not getting any responses, it is because you have vented a complaint without any details that make any sense or give anyone something to work on.
    If you want help, I suggest actually detailing what has happened, with versions of software etc. Anything that would let us assist.
    As a start I am guessing that you have not really got the hang of "How it all works". Firstly download the Pages09_UserGuide.pdf from under the Help menu. Read that and view the Video Tutorials in the same place. A good addition would be the iWork 09 Missing manual book and something to help you learn how to use your Mac.
    If there are specific tasks you need help with:
    http://www.freeforum101.com/iworktipsntrick/index.php?mforum=iworktipsntrick
    Is a good resource.
    Peter

  • Query on getting the Pane with all the items for creating Views

    Hi Group,
    I have a query as under:
    I was trying to create a sample Web Dynpro ( for ABAP ) using tcode SE80 and while creating view, I have to get the Pane with the items ( eg., Radio element, text fields, text areas, etc., kind of all UI Elements )....
    But, I was not able to get while defining the View for the Web Dynpro application....
    Please let me know if any setting has to be done to get this or any other clue as to get this Pane...
    Thanks in advance.
    Regards,
    Vishnu.

    hi vishnu....
            make sure you have given the host and port in the local host file in c:/.
    [link|help.sap.com/saphelp_erp2005/helpdata/en/43/e86de5008b4d9ae10000000a155369/content.htm ].
    ---regards,
       alex b justin

  • How to get the values of all rows in advanced table

    HI All,
    I am using an advanced table to enter the values for the service contract line (its a custom page)in that advanced table i ahave column with lov called task number for that task number once i had choosed one task number and creating one more row using add anethor row button i want to restrict the user to not to choose the task number which was entered in the previus row.
    Or if this is not possible i want to restrict the user by showing an error message when click on the submit button by saying you have choosed the duplicate task number please choose a uniqu task number
    please give some hints
    thanks
    ajay

    Hi
    your approach will have two steps
    1.) use the row refernce and get the value of task number of the row which is enterd by user .
    2.) use getRows in range and compare values of task number of every row with the user selected value ,if value match then throw error.
    Thanks
    Pratap

  • How to get the values for checked and unchecked chekboxes

    Hai i have using the checkbox in for loop.
    I need the urgent help from anyone,
    for example in the loop there is having 5 checkbox if i checked 3 of the ckeckboxes and 2 of the checkboxes are unchecked. I need to get the values for checked checkboxes and unchecked checkboxes. Because if i checked the checkboxes, those values need to be inserted into the database. Those for unchecked checkboxes values need to be deleted from the database. Can anyone help me for this
    i am using the following jsp code for this. If anyone can know about this please post me the sample code.
    <form name="confirmcontainer" id="confirmcontainer" method="post" action="submit.jsp">
    <% for(int i=0;i<value.length;i++) {%>
    <tr>
    <td><input name="assigncontainer_chkbox" d="assigncontainer _chkbox" type="checkbox" value="<%=value[0]%>"></td>
    <td class="bottomborder"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=value[1]%> </font></div></td>
    <td bgcolor="#FFFFFF" class="bottomborder"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=value[2]%></font></td>
    </tr>
    <% } %>
    <tr><td><input type="submit" name="submit" value="submit"> </td></tr>
    </form>
    Thanks & Regards,
    Tamilvanan

    Hey thanks Alex and Catastrophe for the quick response...
    I'll be sitting with the functional team and reviewing the roles created.
    Thanks for all the help once more
    Regards,
    Akash.

Maybe you are looking for