Simple select to get data based on a date

Hi all
I have written some data to a table and am having issues trying to do a select and get that data based on the query.
I want to filter on a column called: TIMESTAMP based on the condition that the data was written to the DB on the following date:
01-OCT-09 10.47.35.597914000
I thought this would be enough:
select * from tableX
where current_value = 999
and TIMESTAMP = '01-Oct-2009'
I know the 999 exists because if I take out the last line I get the data I want.
A basic question I know but any help much appreciated.

Dird wrote:
Hi Boneist,
When using > or < I use TO_DATE with DD-MON-YYYY or whatever format I need. TO_CHAR just comes to mind naturally when I need an equality test.
MikeHmm....
Let's see ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE    11.1.0.6.0      Production
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
Elapsed: 00:00:00.02
satyaki>
satyaki>
satyaki>select * from emp;
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
      7566 JONES      MANAGER         7839 02-APR-81       2975                    20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
      7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
      7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
      7839 KING       PRESIDENT            17-NOV-81       5000                    10
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
      7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7900 JAMES      CLERK           7698 03-DEC-81        950                    30
      7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
      7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
14 rows selected.
Elapsed: 00:00:00.07
satyaki>
satyaki>
satyaki>select *
  2     from emp
  3     where hiredate < to_date('01-MAR-1981','DD-MON-YYYY');
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
Elapsed: 00:00:00.00
satyaki>
satyaki>select *
  2     from emp
  3     where to_char(hiredate,'DD-MON-YYYY') < {noformat}'{noformat}01-MAR-1981{noformat}'{noformat} ;
no rows selected
Elapsed: 00:00:00.00
satyaki>
satyaki>So, as you can clearly see considering date as string may cost you heavy. Or don't you think so?
Regards.
Satyaki De.
N.B.: Some problem with the formatting. So, date is not appearing in the second case. :(

Similar Messages

  • FM to get the previous sunday date based on current date(sy-datum)

    hi all,
    Is there any function module to get the previous sunday date based on current date(sy-datum)?
    Regards,
    Kapil Sharma
    Moderator Message: Basic date related questions are not allowed
    Edited by: Suhas Saha on Sep 19, 2011 11:39 AM

    Hi,
    There are function modules to find out the current day of the week depending on sy-datum. These are as below:
    1. DATE_COMPUTE_DAY - Returns a number indicating what day of the week the date falls on. e.g. Monday is returned as a 1, Tuesday as 2,...., Sunday as 7.
    2. RH_GET_DATE_DAYNAME  - Returns the day based on the date provided, e.g. Monday, Tuesday,..., Sunday.
    Using any of the above, if you can find out the current day, then you can calculate and compute the date of the previous Sunday.
    My observation is that using the first FM might make the calculation simpler.
    Hope this is of help to you.
    Regards,
    Shayeree

  • FM to get previous sunday date based on current date(SY-DATUM)

    hi all,
    Is there any function module to get the previous sunday date based on current date(sy-datum)?
    Regards,
    Kapil Sharma

    Hi Kapil,
    You can follow the logic below:
    data:
    l_date like sy-datum, **TODAY
    l_date2 like sy-datum, **Previous Sunday
    data:
    l_daynr like HRVSCHED-DAYNR.
    *Get today's date
    l_date = sy-datum.
    *Gey today's day (Monday, Tuesday, etc.)
    CALL FUNCTION 'HRIQ_GET_DATE_DAYNAME'
    EXPORTING
    langu = 'EN'
    date = l_date
    IMPORTING
    daynr = l_daynr.
    CASE l_daynr.
    *If it is Monday
    WHEN 1.
    -Subtract 2 days for the previous Sunday
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 2
    IMPORTING
    ed_date = l_date2.
    *If it is Tuesday
    WHEN 2.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 3
    IMPORTING
    ed_date = l_date2.
    *If it is Wednesday
    WHEN 3.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 4
    IMPORTING
    ed_date = l_date2.
    *If it is Thursday
    WHEN 4.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 5
    IMPORTING
    ed_date = l_date2.
    *If it is Friday
    WHEN 5.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 6
    IMPORTING
    ed_date = l_date2.
    *If it is Saturday
    WHEN 6.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 7
    IMPORTING
    ed_date = l_date2.
    *If it is Sunday
    WHEN 7.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 8
    IMPORTING
    ed_date = l_date2.
    ENDCASE.
    Regards,
    Dilek

  • Get weeks based on start date

    Hi ,
    i need a query that will determine the weeks based on start date.
    if the table consists of:
    vDate vAmount
    06/25/2007 100
    06/27/2007 200
    07/04/2007 400
    If one enters start date as 6/25/2007 , amounts should be broken out in 7 day increments.
    Result should be
    week1 300
    week2 400
    where week1 should be from 6/25/2007 to 07/01/2007,
    week2 should be from 07/02/2007 to 07/08/2007
    and start date is not always on a Monday or Sunday...
    any idea?
    thanks in advance

    try this...
    SQL> with rt as
      2  (select 'week'||(trunc(l/7,0)+1) wk_no,to_char(trunc(sysdate)+l,'dd-Mon-yyyy') dt,to_char(trunc(sysdate)+l,'Day') "Day" from
      3  (select level-1 l from dual connect by level <= 367) where trunc(sysdate) between trunc(sysdate) and add_months(trunc(sysdate),12)),
      4  xx as
      5  (select '06/25/2007' vdate, 100 vamount from dual union all
      6  select '06/27/2007', 200 from dual union all
      7  select '07/04/2007', 400  from dual)
      8  select wk_no,sum(vamount) from
      9  (select (select wk_no from rt where dt = to_date(vdate,'MM/DD/YYYY')) wk_no,vamount from xx)
    10  group by wk_no;
    WK_NO                                        SUM(VAMOUNT)
    week1                                                 300
    week2                                                 400
    SQL>
    SQL> select 'week'||(trunc(l/7,0)+1) wk_no,to_char(trunc(sysdate)+l,'dd-Mon-yyyy') dt,to_char(trunc(sysdate)+l,'Day') "Day" from
      2  (select level-1 l from dual connect by level <= 367) where trunc(sysdate) between trunc(sysdate) and add_months(trunc(sysdate),12);
    WK_NO                                        DT          Day
    week1                                        25-Jun-2007 Monday
    week1                                        26-Jun-2007 Tuesday
    week1                                        27-Jun-2007 Wednesday
    week1                                        28-Jun-2007 Thursday
    week1                                        29-Jun-2007 Friday
    week1                                        30-Jun-2007 Saturday
    week1                                        01-Jul-2007 Sunday
    week2                                        02-Jul-2007 Monday
    week2                                        03-Jul-2007 Tuesday
    week2                                        04-Jul-2007 Wednesday
    week2                                        05-Jul-2007 Thursday
    .

  • ABAP to select all AL11 files based on creation date

    Hi,
    I want to create an ABAP that can select all the files in all the subdirectory folders for a given SAP Directory. The files I want to retrieve will be based on the creation date, i.e. when the file was written to the server, it must be greater than 1 hour and less than 3 hours. The problem I have is, I don't know of any table that stores this type of information. Can any one hepl?
    Thanks, D

    Hi,
    here's a sample-prg.:
    REPORT zzzz66 .
    TABLES epsf.
    PARAMETERS dir  LIKE epsf-epsdirnam DEFAULT '/home/user1/'.
    PARAMETERS file LIKE epsf-epsfilnam DEFAULT 'file001.dat'.
    DATA mtime TYPE p DECIMALS 0.
    DATA time(10).
    DATA date LIKE sy-datum.
    CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
         EXPORTING
              file_name              = file
              dir_name               = dir
         IMPORTING
              file_size              = epsf-epsfilsiz
              file_owner             = epsf-epsfilown
              file_mode              = epsf-epsfilmod
              file_type              = epsf-epsfiltyp
              file_mtime             = mtime
         EXCEPTIONS
              read_directory_failed  = 1
              read_attributes_failed = 2
              OTHERS                 = 3.
    PERFORM p6_to_date_time_tz(rstr0400) USING mtime
                                               time
                                               date.
    WRITE: / mtime,
           / date, time.
    pls reward useful answers
    thank you!
    Andreas

  • Date based Resultset and Date display

    Hi
    I have two jsp pages. In first page user selects a Date and name, based on that 2nd jsp display a resultset in a table. I want to Display Selected name and Date on 2nd Page. I done it for name and unable to show the Date and query is also to be modified.
    Here is code for my two jsp pages:
    first.jsp
      <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ include file="DataSource.jsp" %>
    <html>
    <head>
    <title>abcd</title>
    <script type="text/javascript" language="javascript">
    function HTML(p){
    if(!p){
    /*default*/
    p='A action align alt B background Base bgcolor BIG BLINK BODY border bordercolor bordercolordark bordercolorlight Br cellpadding cellspacing checked color cols colspan compact content dir DIV enctype face FONT FORM H1 H2 H3 H4 H5 H6 HEAD height Hr href hspace HTML I id Img Input lang language leftmargin LI marginheight marginwidth maxlength Meta method name NOSCRIPT noshade nowrap OL onblur onchange onclick onfocus onload onmouseout onmouseover onreset onselect onsubmit onunload OPTION P PRE profile readonly rows rowspan SCRIPT SELECT size SMALL SPAN src start STRIKE STYLE style SUB SUP TABLE target TD TEXTAREA TH TITLE title topmargin TR TT type U UL valign value vspace width wrap'
    String.prototype.write=function(){
    document.write(this);
    return this
    String.prototype.alert=function(){
    window.alert(this);
    return this
    String.prototype.status=function(){
    window.status=this;
    return this
    var x=[
    function(W){var q=String.fromCharCode(34);return ' x='+q+((typeof(W)!='undefined')?W:'x')+q}/*attr*/,
    function(W){return '<x'+((typeof(W)!='undefined')?W:'')+' />'}/*tag*/,
    function(W){return '<x'+((typeof(W)!='undefined')?W:'')+'>'+this+'</'+'x>'}/*container*/,
    function(W){var o='<x'+((typeof(W)!='undefined')?W:'')+' />';return o+this.join(o)}/*tags*/,
    function(W){var o='<x'+((typeof(W)!='undefined')?W:'')+'>';var c='</'+'x>';return o+this.join(c+o)+c}/*containers*/
    var j=[];
    var f=0;
    var a=p.split(' ');
    var t,u,l;
    for(var i=0;i<a.length;i++){
    t=a;
    u=t.toUpperCase();
    l=t.toLowerCase();
    if(t==l){
    /*attr*/
    j[f]='window.'+u+'='+x[0]
    else if(t==u){
    /*container;containers*/
    j[f]='String.prototype.'+u+'='+x[2]+';Array.prototype.'+u+'='+x[4]
    else{
    /*tag;tags*/
    j[f]='window.'+u+'='+x[1]+';Array.prototype.'+u+'='+x[3]
    /*specific*/
    j[f]=j[f].replace(/x/g,l);
    f++
    window.status='HTML() bookmarklet library: Copyright (c) 2002-'+(new Date()).getFullYear()+', by Richard Edwards. ['+f+' tag/attrs added] ';
    /*implement!*/
    eval(j.join(';'))
    HTML();
    </script>
    <script type="text/javascript" language="javascript">
    function init(){m='January February March April May June July August September October November December'.split(' ');wd='Su M Tu W Th Fr Sa'.split(' ');lom=[31,28,31,30,31,30,31,31,30,31,30,31];sz=25;js='javascript';fn=[function(F){},function(F){DATE=new Date(F.date.value);if(isNaN(DATE.valueOf())){DATE=new Date()};M=DATE.getMonth();D=DATE.getDate();Y=DATE.getFullYear();lom[1]=28;if((Y%/**/4==0)&&((Y%/**/100>0)||(Y%/**/400==0))){lom[1]++}},function(F){if(D>lom[M]){D=lom[M]};F.date.value=(M<9?'0':'')+(1.0+M)+'/'+(D<10?'0':'')+D+'/'+Y;dv.value=F.date.value;if(opener.Page){opener.document.forms[0][dv.name].value=F.date.value}},function(){F=this.form;fn[1](F);M=this.selectedIndex;fn[2](F);fn[0](F)},function(){F=this.form;fn[1](F);D=this.value;fn[2](F);fn[0](F)},function(){F=this.form;fn[1](F);Y=this.value;fn[2](F);fn[0](F)},function(F){fn[1](F);var f=new Date(Y,M,1);var x=1-(f.getDay());for(var i=0;i<49;i++){F.d[i].value=(i<7?wd[i]:'');F.d[i].onclick=this;};for(var i=1;i<=lom[M];i++){w=Math.floor((i-1)/7);n=7+i-x;F.d[n].value=i;F.d[n].onclick=fn[4];if(i==D){F.d[7+i-x].focus()}};for(var i=0;i<F.m.length;i++){F.m[i].selected=(i==M)};F.m.onchange=fn[3];F.y.value=Y;F.y.onchange=fn[5];F.y.onblur=fn[5];fn[2](F)}];fn[0]=fn[6]};init();function popCal(datevalue){if(!datevalue){dv={name:'Today',value:(new Date())}}else{dv=datevalue};var c=ALIGN('center')+HEIGHT(sz);var h=(m.OPTION().SELECT(NAME('m'))+INPUT(TYPE('text')+SIZE(4)+NAME('y'))+INPUT(TYPE('hidden')+NAME('date')+VALUE(dv.value))).TD(COLSPAN(7)+c);var b=INPUT(TYPE('button')+NAME('d')+STYLE('width:'+sz+';height:'+sz)+WIDTH(sz)+c);var r=[b,b,b,b,b,b,b].TD(WIDTH(sz*7)+c);h=[h,r,r,r,r,r,r,r].TR(c).TABLE(BORDER('0')+CELLSPACING('0')+CELLPADDING('0')+c).FORM(NAME('frm')+ACTION(js+'://'));h+=(init+';init();dv=opener.dv;fn[0](document.forms.frm);').SCRIPT(LANGUAGE(js)+TYPE('text/'+js));window.open('','cal'+(new Date()).valueOf(),'height='+sz*9+',width='+sz*8).document.write(h)};
    </script>
    </head>
    <body bgcolor=lightblue>
    <center><h1>xyz</h1></center>
    <hr>
    <br>
    <p>
    <p>
    <p>
    <p>
    <h4>Select a date: </h4>
    <script type="text/javascript" language="javascript">
    (INPUT(NAME("DV")+READONLY())+INPUT(TYPE("button")+VALUE("Calendar..")+ONkLICK("popCal(this.form.DV)"))).FORM().write();
    </script>
    <p>
    <p>
    <br>
    <form method=post action="second.jsp">
    <sql:transaction dataSource="${example}">
         <sql:query var="Power">
              select unique trader_name from exchange_deal where unit_of_measure='mwh'
         </sql:query>
    </sql:transaction>
    <h4><p>Select a Trader:
         <select Name = "TraderDrop">
         <c:forEach var="row" items="${Power.rows}">
    <option size="20"><c:out value="${row.Trader_name}"/></option>
    </c:forEach>
         </select>
    <p>
    </h4>
    <br>
    <input type="submit" value="SUBMIT"/>
    <input type="reset" value="CANCEL"/>
    </form>
    </body>
    </html>
    Second jsp
      <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ include file="DataSource.jsp" %>
    <html>
    <head>
    <title>abc</title>
    </head>
    <body bgcolor=lightblue>
    <center><h1>xyz</h1></center>
    <hr>
    <form name="input" action="pqr.jsp"
    method="get">
    <c:set var="s" value="${param.TraderDrop}" />
    <h3>Trader : <c:out value="${s}" /></h3>
    <c:set var="d" value="${param.date}" />
    <h3>Trade Date: <c:out value="${d}" /></h3>
    <sql:transaction dataSource="${example}">
    <sql:query var="Power">
         SELECT DEAL_ID, DEAL_TYPE, EXCHANGE_NAME, HUB_NAME, ORGINATING_APPLICATION, PRODUCT_ID, TAKER_COMPANY FROM ENYWARE.EXCHANGE_DEAL where TRANSACTION_TIMESTAMP > sysdate - 3 and trader_name = '<c:out value="${s}" />'
    </sql:query>
    </sql:transaction>
    <table border="1">
    <%-- Get the column names for the header of the table --%>
    <tr>
    <c:forEach var="columnName" items="${Power.columnNames}">
    <th><c:out value="${columnName}"/></th>
    </c:forEach>
    </tr>
    <tr>
    <c:forEach var="column" items="${row}">
    <td><c:out value="${column.value}"/></td>
    </c:forEach>
    </tr>
    </c:forEach>
    </table>
    </form>
    </body>
    </html>
    I am using JavaScript calendar for entering date in a Text box.
    Please review code and help me.
    Thanks in Advance
    Surya

    Anitha123 wrote:
    Hi
    Thanks for your reply..
    We execute our application using a batch file which holds the main class file to be executed as below :
    batch file content as below :
    set PATH=.\_jvm\bin
    set JAVA_HOME=.\_jvm
    set CLASSPATH=.\_jvm\lib\rt.jar;.\_jvm\lib\itext.jar
    java -cp %CLASSPATH%;.\classes xx.yy.zz.Ourmainclass
    Here how can i set the time zone as users time zone? we don't use any manifest file for our application..can you please guide me on the same..Very Good...Then here is your answer..
    set PATH=.\_jvm\bin
    set JAVA_HOME=.\_jvm
    set CLASSPATH=.\_jvm\lib\rt.jar;.\_jvm\lib\itext.jar
    java -Duser.timezone=Asia/Calcutta -cp %CLASSPATH%;.\classes xx.yy.zz.OurmainclassIf this will solve your problem.. don't forget to reward duke stars...please..

  • How to schedule report filtered by dynamic date based on the date the Agent runs

    Hello
    I have a question about delivering report using OBIEE agent.
    If i am running an agent today to deliver report A, can I get report A based on Last Monday's date or any dynamic dates?
    For example, say today is Dec 18th 2013 and my agent is running according to how I set the schedule. Now the deliver content will have report A being delivered. Now report A has a date column, normally this column is filtered by current date. But if it's delivered through agents to various users, Report A's data should be the previous Monday, so in this case Dec 9th 2013. When this agent is run again said on Dec 27th 2013, then report A should be filtered by Dec 16th 2013, which is the previous monday of Dec 27th.
    Can something like this be achieved in OBIEE 11G?
    Thanks in advance.

    Yala,
    Not a straight forward way
    1) Let the report run through Agent with Current Date filter
    2) once it ran for the first time you can see IBOT name/last run time(LAST_RUNTIME_TS) in  S_NQ_JOB
    Create a repository variable 'last_run_agent' using below sql to get max(LAST_RUNTIME_TS)
    select max(LAST_RUNTIME_TS) from s_nq_job where name = 'AGENT_NAME';
    Edit the analysis report with current date filter and modify the filter condition accordingly to filter on newly created repository variable
    Thanks,
    Saichand

  • Invoice Date Based on POD Date and Requested Delivery Date

    Hello Experts,
    Could you please Help me How to get the Billing date in the invoice document based on POD date if the POD Report has been Posted , If not the system should pick up the requested delivery date.
    Thanks for your time

    Hi,
    Create an copy control routine (T.Code VOFM) as assign in copy control setting between Delivery doc to billing docuement (T.code VTFL).
    The new routine will be created with copy of existing routine assign under "Copying requirements" at item level, and assign on same place.
    Pl take help of ABAPer to write the new routine.
    regards
    Vivek.
    Edited by: Vievk Vardhan on Jan 7, 2010 1:50 PM

  • Last month end date based on current date

    Hi,
    How to show last month end date based on the current date.
    Eg:
    Current date = "08/26/09"
    Var- Last Month End Date = "07/31/09" etc...,
    Please help me how to get it...
    Thank You!

    Good to hear that it worked for you. but not for me.
    I tried like this:
    1st::
    1. var1= ToDate("06/30/09","MM/dd/yyyy")
    2.Var2= RelativeDate([Var1];-DayNumberOfMonth([Var1]))
    result: 5/30/09
    2nd:
    RelativeDate('6/30/2009';-DayNumberOfMonth('6/30/2009'))
    result: 5/30/09
    Am working on SAP OLAP cubes.
    Please help me where am going wrong....
    Thank You!

  • Calendar with preselected dates based on current date

    Can we get the calendar to be prepopulated with todays' date and today-7 date as the default before it starts running the initial queries when I log into dashboard.
    I have a calendar date range based on which my chart displays metrics. If I dont choose anything its picking up all the data first before I choose something
    Your help is always appreciated.

    I apologize I read your post too quickly and misunderstood your question. Unfortunately, I thought you were referring to a dashboard you had created and asking about setting up default dates for your bind variables/parameters.
    Well I'll have to leave this one to someone else. Sorry I couldn't be more help.
    David

  • Updation of SO Confirmed Delivery date based on GR date for BANC parts

    Dear All,
    Would appreciate an answer on the following issue:
    For Back to back/Indiv Purchase Order parts(BANC) the confirmed delivery date in the SO is updated based on the Order Acknowledgement date sent by the vendor for the corresponding PO generated for the SO. If the the vendor happens to deliver the parts in advance of the OA date(it happens quite often), the parts wait in stores till the confirmed delivery date is reached on the SO even thugh the original requested date on the Sales order is long past. If there is an order acknowledgement date in the system, at the time of GR, a warning message comes, but as our system is a high volume systme it is not possible to update the date in SO manually. Is there a way we can update the confirmed delivery date in the SO based on the Goods receipt date automaticall through config or a batch job?
    Thanks
    Suman

    Dspsac,
    Delivery date can be any date.  For instance, if your customer insisted on a Sunday delivery, you would accommodate him, regardless of any calendar.
    From the delivery date, the system counts backwards USING THE FACTORY CALENDAR ASSIGNED TO THE ROUTE by the number of days in the route.  You have to consult the FC assigned to your Route to determine if the GI date has been properly calculated.
    From the GI date, the system counts backward Pick/pack time, using the shipping point calendar, to arrive at Material availability date.
    Calculations are explained in SAP online help
    [Transportation and Delivery Scheduling|http://help.sap.com/erp2005_ehp_04/helpdata/EN/dd/5607e7545a11d1a7020000e829fd11/frameset.htm]
    Regards,
    DB49

  • Query to get values based on a date range.

    11g.
    Hi there,
    I have a simple requirement(hopefully).
    I have a parameter which is basically a count range which when I pass the sql query should fetch the values from a column falling in that range.
    My table is item details
    Item                  cost          
    item1                   1
    item2                   10
    item3                   20
    item4                   3
    .I have a parameter which I have to pass to this query where items are listed based on the cost.
    So I want to select items which cost between 0 -10, 11-20, 21-30 and 31-40
    Now I am using Apex to show the count report like
    0-10      11- 20    21- 30   31- 40
      3             2           0          0            
    The numbers are hyperlinked and I pass the parameters based on which another report shows the details. So if the user clicks on number 3 in the report. The underlying query would be something like
    select * from item_Details where cost between 0 and 10.So I was wondering how do pass the parameter to the sql in the best possible way to get the costs based on the range?
    Maybe the parameters should be some code which can be decoded in the SQL?
    Any help or suggestions please?
    Thanks,
    Ryan

    Hi,
    Try this to pass the parameter in the query...
    select * from item_Details where cost between to_number(substr('0-10',0,instr('0-10','-')-1)) and to_number(substr('0-10',instr('0-10','-')+1,length('0-10'));
    Regards,
    Niha

  • How to get the data based on below data-----pls help me...

    Hi,
    i have the data in my table.......
    SET_ID SET_Name Status date user_name
    SET974     F698671     I     24/03/2011 10:40:05     TEST1
    SET974     F698671     I     24/03/2011 10:40:05     TEST1
    SET974     F698671     N     24/03/2011 10:40:05     TEST1
    SET974     F698671     I     24/03/2011 10:40:05     TEST1
    SET528     A258961     I     22/03/2011 9:40:05     TEST2
    SET528     A258961     N     22/03/2011 9:40:05     TEST2
    SET528     A258961     I     22/03/2011 9:40:05     TEST2
    SET528     A258961     I     22/03/2011 9:40:05     TEST2
    SET974     F698671     I     25/03/2011 13:40:05     TEST1
    SET974     F698671     N     25/03/2011 13:40:05     TEST1
    SET974     F698671     N     25/03/2011 13:40:05     TEST1
    SET974     F698671     I     25/03/2011 13:40:05     TEST1
    SET974     F698671     I     26/03/2011 15:40:05     TEST5
    SET974     F698671     N     26/03/2011 15:40:05     TEST5
    SET974     F698671     N     26/03/2011 15:40:05     TEST5
    SET974     F698671     I     26/03/2011 15:40:05     TEST5
    I want to know each user ,how many sets modified.
    based on above input data,my output would be in the following way:
    user_name no.of sets upated for single user
    TEST1 2
    TEST2 1
    TEST5 1

    Based on your sample data, why does TEST1 have a count of 2? From what I can see, the only SET_ID that is associated with TEST1 is SET974 so I would think that you'd want TEST1 to have a count of 1.
    If I ignore the data you posted and just look at the text of your requirements, I would guess that you wanted
    SELECT user_name, COUNT( DISTINCT set_id ) cnt
      FROM some_table
    GROUP BY user_nameThis won't give the output you said you wanted based on the sample data you provided, however, for the reason I outlined above.
    If you actually do expect to get the output you posted from the sample data you posted, can you explain in a bit more detail why TEST1 should have a value of 2? It would also be helpful to post the CREATE TABLE and INSERT statements rather than just dumping the data. If you provide DDL & DML, we can create the objects locally and verify our solutions rather than guessing based on eyeballing the data.
    Justin

  • Get value based on last date

    I have a report that takes 2 date parameters ("Start Date" and "End Date"). Get fields back based on that criteria....I want to create a formula field that shows me the "Amount" field data that is equal to the "End Date".
    How can I do that?
    Thanks in Advance!!

    Hi shaun,
    You can take a running total of the date as
    Running total name : datecount
    Summary Field to Summarize as : yourdatefield
    Type of summary : Nth largest
    N is : 1
    Evaluate
    For Each Record
    Reset
    Never
    Now Create a Formula for ur fileld as
    if {Command.Yourdate} = {#datecount} then {Command.fieldname}
    I hope this solves your problem
    Regards,
    Pradeep

  • To get data based on entry dates..

    hi,
      In the input parameter there is start date and end date, if the new hire date falls between these two dates then only
      Get the details Name, SSN, birth date, status, position in text file.

    hi
    Make the date as select option
    Ex. SELECT-OPTIONS: s_budat FOR  faglflexa-budat
    in select condition
    sartdate>= s_budat -low and enddate <=  s_budat -high.
    I think it will work fine

Maybe you are looking for

  • Enable wireless doesn't work like expected

    Hej, When I press my wireless-button on my laptop, a popup shows up saying "Wireless hardware enabled". However, I have to click the "Enable wireless" checkbox in the networkmanager applet to really enable wireless networking. I don't think this is h

  • Copy file from one server to another

    I have two intranet sites on two different servers. There is an image on the site1 which I would like to copy to site2. How do I do that ? Here is my code. <cfset image1Ext = Right(firstStoryImg, 3)> where firstStoryImg evaluates to http://mycompany.

  • Itunes keeps quiting since i've enabled disc use on ipod

    hello i updated my ipod software to allow me to "enable disc use". since then, after onlya few moments my "itunes has detected a problem and must shut down". i can not update anything itunes does however remain open when ipod is not connected this is

  • XML Data archiving service - XML DAS

    Hello, does anybody know differences and dis/advantages between the archive solution in the ABAP stack and the simple archiving function in RWB for archive XI messages and the XML DAS (ABAP & JAVA)? Is there something in XML_DAS which gives advantage

  • What's up with filter bin content search not responding?

    Search function (filter bin content) in the project panel doesn't respond. It always dark gray, not light gray. The search function under the media browser tab runs fine. And everything else works fine: CS6, Intel i7; Nvidia GeoF 670. Windows 7/Profe