Need sql querry for getting previous day records only

Hi ,
i have a table with following records,
emp sal date
111 200 03-mar-2011
100 200 03-mar-2008
15 200 06-mar-2012
17 200 03-mar-2003
178 200 03-mar-2004
11 200 11-jun-2012
i need only previous day records only(11 200 11-jun-2012).can any one help on this query?

insa wrote:
Except trun you can use Like operator--
select * from emp where date like sysdate-1;
Is it helpful for you?That is most certainly not a helpful answer. the LIKE operator is a string comparison operator and should not be used with dates. Doing so will cause an implicit date to character conversion based on the sessions NLS settings and would be not different to doing:
select * from emp where to_char(date) = to_char(sysdate-1)... which will cause a lack of index usage, and also not deal with any time component within the date.
Please ensure you test your answers before posting them. Several people had already given correct answers here with explanations as to why they are better than other methods.

Similar Messages

  • Need sql querry for  PreviousYear First Day Same Month And Currentday rec

    Hi ,
    I hAVE TABLE FOR EXAMPLE,
    emp sal Arrivaldate
    111 200 03-mar-2011
    100 200 03-mar-2008
    150 200 06-mar-2012
    170 200 03-mar-2003
    178 200 03-mar-2004
    112 200 12-jun-2012-------------------->For Example THIS IS TABLE WE HAVE LOT OF RECORDS
    I need querry to get based on this condition:Arrival Date is between Previous Year First Day Same Month And Current day.
    Any one help me on this.....

    Hi,
    To get the records between Previous Year First Day Same month to Current day..
    SELECT TRUNC (ADD_MONTHS (SYSDATE, -12), 'MM') AS last_yr_first_date, TRUNC(SYSDATE) AS PRESENT_DATE
      FROM DUAL;Which Outputs to:
    LAST_YR_FIRST_DATE     PRESENT_DATE
    6/1/2011                   6/13/2012When you give TRUNC(sysdate) It will removes the Time part of the SYSDATE.
    For Ex :
    TRUNC(SYSDATE) means that is 6/13/2012 which doesn't give the time part in the query.
    Which takes into account the day start that is from 12:00 A.M to today midnight 11.59 P.M.
    And, One thing is that
    emp sal Arrivaldate
    111 200 03-mar-2011
    100 200 03-mar-2008
    150 200 06-mar-2012
    170 200 03-mar-2003
    178 200 03-mar-2004
    112 200 12-jun-2012The arrivaldate is in Character format so you need to convert to date type as
    SELECT TO_DATE(ARRIVALDATE,'DD-MON-YYYY') from your_table;
    and the comparison can be done as
    SELECT *
      FROM YOUR_TABLE
    WHERE TO_DATE (ARRIVALDATE, 'DD-MON-YYYY')
       AND TRUNC (ADD_MONTHS (SYSDATE, -12), 'MM')
       AND TRUNC (SYSDATE);Good day!!!!!!!!!!!!!!!!!!!!!!!!
    Thanks,
    Shankar

  • Need sql querry for this logic

    Hi,
    Edited by: 937506 on Jun 10, 2012 7:35 AM

    937506 wrote:
    Hi,
    I have table like this,based on this table data i need one column for example "Value" based on this condition,
    KEY     A_VAL     ETA_VAL     RANGE     DATE_ID     SITE     AREA     UNIT     Monthnumber     Year
    1111     35     36     50.45     2778     PLANT1     AREA2     CDU-4     8     2011
    1111     40     41     50.45     2783     PLANT1     AREA2     CDU-4     8     2011
    9010     114     37     50.45     2779     PLANT1     AREA2     CDU-3     8     2011
    9010     41     35     50.45     2784     PLANT1     AREA2     CDU-3     8     2011
    9011     1500     38     50.45     2789     PLANT2     AREA3     DHT-1     8     2011
    9012     43     37     50.45     2774     PLANT1     AREA1     DHT-2     8     2011
    9012     38     39     50.45     2781     PLANT1     AREA1     DHT-2     8     2011
    9013     39     40     50.45     2782     PLANT1     AREA2     FCC     8     2011How to ask question
    SQL and PL/SQL FAQ

  • Need sql querry for records between Current Year First day and Current Day

    Hi,
    I have a table like this...
    Empid     Empname     DOJ
    TEST1     ERDDF     19-Jun-2011
    TEST2     AA     22-Mar-2011
    TEST3     SS     22-Oct-2011
    TEST4     VV     01-Jan-2012
    TEST5     HH     01-Apr-2012
    TEST6     AS     18-Jun-2012
    TEST7     ER     26-Jun-2012
    TEST8     ERDDF     28-Jun-2012
    My output like this...
    Empid     Empname     DOJ
    TEST4     VV     01-Jan-2012
    TEST5     HH     01-Apr-2012
    TEST6     AS     18-Jun-2012
    TEST7     ER     26-Jun-2012
    Logic:
    records between Current Year First day and Current Day(sysdate)

    937506 wrote:
    Hi,
    I have a table like this...
    Empid     Empname     DOJ
    TEST1     ERDDF     19-Jun-2011
    TEST2     AA     22-Mar-2011
    TEST3     SS     22-Oct-2011
    TEST4     VV     01-Jan-2012
    TEST5     HH     01-Apr-2012
    TEST6     AS     18-Jun-2012
    TEST7     ER     26-Jun-2012
    TEST8     ERDDF     28-Jun-2012
    My output like this...
    Empid     Empname     DOJ
    TEST4     VV     01-Jan-2012
    TEST5     HH     01-Apr-2012
    TEST6     AS     18-Jun-2012
    TEST7     ER     26-Jun-2012
    Logic:
    records between Current Year First day and Current Day(sysdate)Probably you are looking for :
    where DOJ between trunc(sysdate,'YYYY') and sysdateRead {message:id=9360002} and always provide details mentioned in this thread.

  • Need sql querry to retive the data from sysdate to last365 days data.

    Hi ,
    I need sql querry to retrive the data based on this condition:date Between Previous 365 days and current day.
    emp sal date
    1 200 03-mar-2011
    1 200 03-mar-2008
    1 200 06-mar-2012
    1 200 03-mar-2003
    1 200 03-mar-2004
    1 200 03-mar-2005
    and so on.......lot of records....
    i need the all the employee data from currentdate(sysdate) to previous 365 days data...
    Edited by: 937506 on Jun 7, 2012 4:26 AM

    937506 wrote:
    Hi ,
    I need sql querry to retrive the data based on this condition:date Between Previous 365 days and current day.
    emp sal date
    1 200 03-mar-2011
    1 200 03-mar-2008
    1 200 06-mar-2012
    1 200 03-mar-2003
    1 200 03-mar-2004
    1 200 03-mar-2005
    and so on.......lot of records....
    i need the all the employee data from currentdate(sysdate) to previous 365 days data...
    Edited by: 937506 on Jun 7, 2012 4:26 AMJust you can do this
    <date_column> between sysdate-365 and sysdateAnd DATE is a reserved word and you cannot use it as a column name.

  • How to get previous day of the date

    Hi,
    for a given date I need one day minus as a result date
    my input would be any date
    for example :
    Input Date : 2006-03-22 ( yyyy-mm-dd)
    Output should be : 2006-03-21
    If my input is 1st of April 2006, output i would expect is 31st March 2006
    Please suggest how to achieve this
    Thanks in advance
    Nilesh

    Find below the code to get previous day of the current date
    import java.util.Date;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    public class PreviosDay
    public static void main(String[] args)
    DateFormat dateFormat = new SimpleDateFormat( "MM/dd/yyyy");
    Calendar cl = Calendar.getInstance();
    // you can use a Date object's getTime() method , which is initialiazed
    // to desired date here directly ex: Date dt = new Date("10/10/2004");
    // cl.setTimeInMillis(dt.getTime());
    cl .setTimeInMillis(System.currentTimeMillis());
    cl.add(Calendar.DAY_OF_MONTH, -1);
    System.out.println("Previous date : "+dateFormat.format(
    new Date(cl.getTimeInMillis() ) ) );
    }

  • How to get previous day data if i dont have current day data.

    Hello Gurus,
    I have a stock levels data in ODS. when there is no movements, we are not getting any stocks into ODS. So we have to get previous day data as it is for current day data into another ODS.
    Could you please help me in this regard.
    Thanks in advance,
    Rama

    Rama -    
            0CALDAY can't help us in this scenario .
    Step 1 :
        To do this - You have to add one ZDATE (InfoObject ) to 1st ODS. ZDATE is updated by itself from current date of system  when ever you are loading data to 1st ODS.
    Step 2:
       You have to do full update to 2nd ods.At the selection screen of InfoPackage  (from 1st ODS to 2nd ODS ) you have to write following code for ZDATE.
    pseudo Code:
    1) Select fields "Rec_INSERT","Time stamp","Request Status" and "Request ID"  where ICUBE = ODS1 from table "RSMONICDP"
    2) Populate above selected fields data in INTERNAL TABLE
    3) Sort INTERNAL TABLE by Time stamp .
    4)
         If (Record Count = ' 0 ' for current date in internal table )
         update records from  ODS1 to ODS2 where ZDATE = "yesterday date"
         else
         update records from ODS1 to ODS2 where ZDATE= "today date"
         endif.
    Make sure this is full update not delta update from ODS1 to ODS2
    I am sorry, I m not good in Coding but I am sure if  u use this logic,You can meet your requirement.
    I hope you can understand my logic. Let me know if you have any questions,
    Anesh B .

  • SQL query to get last 10 records in the table?

    Hi,
    Can anyone tell me the SQL query to get last 10 records in the table?
    Thanks!!
    MCP

    Please, define what "last" means. Sets are unordered by definition, so if you want to retrieve rows from a table in a specific order you need to specify what that order is - e.g. by maintaining a value in a column (or a combination of columns) that you can use in the ORDER BY clause of the SELECT statement.
    If, for instance, you kept the time when the row was inserted in a special column (InsertedTime), you could use this in your query like this:
    select top (10)
      <column list>
      from <table or view>
      where <restriction(s)>
      order by InsertedTime desc;
    ML
    Matija Lah, SQL Server MVP
    http://milambda.blogspot.com

  • Getting the date for the previous day

    How do I get the previous day's date with LabView 7.0? Is there a built in function that will allow me to do this (taking into account the number of days in a month, leap years etc) or do I have to write my own vi?
    Thank you,
    KB

    All you have to do is use the Get Date/Time in Seconds and then subtract the number of seconds in a day. The result is a time stamp that should account for everything.
    Attachments:
    Subtract_Day.jpg ‏4 KB

  • Query for Getting previous date in oracle in specifc scenario

    I have the below data in a table A which i need to insert into table B along with one compute column.
    TABLE A:
    Account_No | Balance | As_on_date
    1001 |-100 | 1-Jan-2013
    1001 |-150 | 2-Jan-2013
    1001 | 200 | 3-Jan-2013
    1001 |-250 | 4-Jan-2013
    1001 |-300 | 5-Jan-2013
    1001 |-310 | 6-Jan-2013
    Table B:
    In table B,there should be no of days to be shown when balance is negative and the date one which it has gone into negative.
    So,for 6-Jan-2013,this table should show below data:
    Account_No | Balance | As_on_date | Days_passed | Start_date
    1001 | -310 | 6-Jan-2013 | 3 | 4-Jan-2013
    Here,no of days should be the days when the balance has gone negative in recent time and not from the old entry.
    I need to write a sql query to get the no of days passed and the start date from when the balance has gone negative.
    I tried to formulate a query using Lag analytical function,but i am not getting how should i check the first instance of negative balance by traversing back using LAG function. Even the first_value function was given a try but not getting how to partition in it based on negative value.
    Any help or direction on this will be really helpful.
    Thanks

    I think you can apply the Tabibitoshan method here. The query is more complex but performs better than other methods. For an explanation, see Tabibitosan method tutorial by Aketi Jyuuzou
    The idea behind the method is to identify "continuous" records without gaps. Here I identify records that are "continuous" because they contain an uninterrupted series of negative balances.
    drop table t;
    CREATE TABLE t (Account_No , Balance , As_on_date) AS SELECT
    1001 ,-100 , to_date('1-Jan-13', 'DD-MON-YY') FROM dual UNION ALL SELECT
    1001 ,-150 , to_date('2-Jan-13', 'DD-MON-YY') FROM dual UNION ALL SELECT
    1001 , 200 , to_date('3-Jan-13', 'DD-MON-YY') FROM dual UNION ALL SELECT
    1001 ,-250 , to_date('4-Jan-13', 'DD-MON-YY') FROM dual UNION ALL SELECT
    1001 ,-300 , to_date('5-Jan-13', 'DD-MON-YY') FROM dual UNION ALL SELECT
    1001 ,-310 , to_date('6-Jan-13', 'DD-MON-YY') FROM dual;
    SELECT Account_No, Balance, to_char(As_on_date, 'DD-MON-YYYY') as_on_date,
    CASE
      WHEN balance < 0
      THEN row_number() OVER(PARTITION BY account_no, grp ORDER BY as_on_date)
    END days_passed,
    CASE
      WHEN balance < 0
      THEN to_char(
        first_value(as_on_date) OVER(PARTITION BY account_no, grp ORDER BY as_on_date),
        'DD-MON-YYYY'
    end start_date
    from (
      SELECT Account_No, Balance, As_on_date,
      CASE WHEN balance >= 0 THEN NULL ELSE
        row_number() OVER(PARTITION BY account_no ORDER BY as_on_date) -
        sum(CASE WHEN balance < 0 THEN 1 ELSE 0 END) OVER(PARTITION BY account_no ORDER BY as_on_date)
      end grp
      FROM t
    order by account_no, As_on_date;
    ACCOUNT_NO
    BALANCE
    AS_ON_DATE
    DAYS_PASSED
    START_DATE
    1001
    -100
    01-JAN-2013
    1
    01-JAN-2013
    1001
    -150
    02-JAN-2013
    2
    01-JAN-2013
    1001
    200
    03-JAN-2013
    1001
    -250
    04-JAN-2013
    1
    04-JAN-2013
    1001
    -300
    05-JAN-2013
    2
    04-JAN-2013
    1001
    -310
    06-JAN-2013
    3
    04-JAN-2013

  • Get previous / next record

    Hi,
    I have a little problem with getting the previous / next record.
    Because build-in is not working, if user filters and sorts the table, I tried many things to get it managed. My last test was creating a query, returning the previous and next id. I have this PL/SQL statement
    DECLARE
    str_express varchar2(2000);
    str_order varchar2(500);
    str_where varchar2(500);
    BEGIN
    IF :F109_FILTER_PROJECT = 'N' THEN
    str_order := 'ORDER BY pro_id desc';
    ELSE
    str_order := :P250_SORT;
    IF :P250_WHERE != '0' THEN
    str_where := :P250_WHERE;
    END IF;
    END IF;
    str_express :=
    'SELECT DECODE(prev_id, 0, null,' || Chr(39) || 'value=' || prev_id || Chr(39) || ')
    FROM (
    SELECT pro_id,
    nvl(LAG(pro_id) OVER (' || str_order || '), 0) prev_id,
    nvl(LEAD(pro_id) OVER (' || str_order || '), 0) next_id
    FROM view_project ' ||
    str_where || ')
    WHERE pro_id = ' || :P251_PRO_ID;
    RETURN str_express;
    END;
    It should just show the previous id and if there is none, should show i.e. 'value=1'. If I let return only the prev_id (code: DECODE(prev_id, 0, null, prev_id) ) it is working fine, if I enter DECODE(prev_id, 0, null,' || Chr(39) || 'value=' || prev_id || Chr(39) || ') it's always showing the error, that prev_id is not declared.
    What's wrong?
    I thought, I can show buttons for prev and next id in the table with this code:
    DECODE(prev_id, 0, null,' || Chr(39) || '<input type="button" class="t10button" value="< Previous" onClick="javascript:html_GetElement(' || Chr(39) || 'P251_PRO_ID' || Chr(39) || ').value = '|| prev_id || ';doSubmit();" />' || Chr(39) || ') prev_id
    This is working fine without DECODE syntax, but then also a button is shown, if prev is none.
    Any ideas how to manage????
    Thanks

    Hi,
    I now understand why preV_id is not known ... it's way my fault in thinking ...
    but how can I set my prev and next ID ... has anybody an idea?
    It's very stupid, to move from table to form and back to table and form to get the next / prev record ...
    thanks
    chrissy

  • How to get previous days execution time?

    Hello All,
    I have below 3 tables in my Oracle Database --
    1) Table jobs
    Job ID  Job Name
    1      ABC
    2      PQR
    3      XYZ
    2) Table Job_Tasks
    Task_ID   TASK_NAME  Job_ID 
      T1              T_ABC            1
      T2              T_ABE            1
      T3             T_ABD            1
      T4             T_PQS            2
      T5             T_PQT            2
      T6             T_PQU            2
      T7             T_XYA            3
      T8             T_XYZZ           3
      T9             T_XYYA           3
    3) Job_LOG_Table
    JOB_SEQ  JOB_ID  JOB_NAME   START_TIME  END_TIME           STATUS
    1111              1        ABC    06/09/2013 11:00     06/09/2013 13:00   COMPL
    1234              1        ABC    07/09/2013 11:30     07/09/2013 13:30   COMPL
    1235              1        ABC    08/09/2013 11:30     08/09/2013 13:30   COMPL
    1244              1        ABC    09/09/2013 11:00     09/09/2013 13:00   COMPL
    1354              1        ABC    10/09/2013 11:30      10/09/2013 13:30   RUNNING
    Question Is --
       I would like to display the job status from yesterday and from time 20:00 onwards.. ie. it should display the job_SEQ 1354. ( start_time >= (sysdate-1)||'20:00:00') and  also want to disaply previous days execution time for same job (ie. for 9th Sep).
    The result should be --   Job_name PREV_START_TIME, PREV_END_TIME, TODAYS_START_TIME, TODAYS_END_TIME, STATUS
      As I am displaying the jobs from yesterday 20:00 hour onwards.. I am unable to get previous execution time for the same job.
    I tried with Analylitical function LAG  but it's showing PREV_START_TIME.and PREV_END_TIME as BLANK.
    Could you please help me to resolve the issue?
    Thank you in advance.

    As suggessted by Mike,  below is the modification I have done in my sql and I think it's working now....
    I will check for more volume of data and confirm.  --
    select original_sql as
    select w.job_id,
    w.job_name,
    r.start_time,
    r.end_time,
    r.status
    from
      jobs w,
      job_log_table r
    where
      r.job_id=w.job_id
    select job_id,job_name,
    (select start_time from job_log_table j where j.job_id=os.job_id and j.start_time>=sysdate-2 and rownum <2) prev_start_time,
    start_time,
    end_time,
    status
    from Original_sql os
    where
    os.start_time>=to_date(to_char(sysdate-1,'DD/MM/YYYY') || ' 20:00:00','Dd/MM/YYYYHH24:MI:Ss')
    as of now, I am getting the below result --
    job_id,  job_name  prev_start_time,      prev_end_time,            curr_start_time,           curr_end_time,           status 
           1           ABC  09/09/2013 11:30   09/09/2013 13:00      10/09/2013 11:30          10/09/2013 13:30          RUNNING
    Thank you !

  • Need SQL code for this logic - -  From Serial and To serial no.

    In Forms 4.5 Screen I have two text boxes where i will be entering From Serial No
    and to serial no.
    I want the code which will check whether any number in between these from and to serial exists in a table or not ?
    For Example
    Select * from t; -- contains
    serial number
    321-456-789
    123-456-654
    321-569-986
    321-569-987
    When I enter from Serial no 321-456-789 and to serial no as 321-456-789.. I should get a message sayinig that 321-456-789 exists.
    When I enter from Serial no 321-569-986 and to serial no as 321-569-988.
    I should get a message sayinig that 321-456-986 exists.
    I should get a message sayinig that 321-456-987 exists.
    I should get a message sayinig that 321-456-988 not exists.
    is it possible with a SQL query or do we need to go for procedure or temp table ?
    If anybody ahving similar code please post it here.
    Thanks in Advance
    Devender

    Hi Devender,
    Try this :
    SQL> select * from t;
    SN
    321-456-789
    123-456-654
    321-569-986
    321-569-987
    SQL> var sn1 varchar2(11)
    SQL> exec :sn1 := '321-569-986'
    Procédure PL/SQL terminée avec succès.
    SQL> var sn2 varchar2(11)
    SQL> exec :sn2 := '321-569-988'
    Procédure PL/SQL terminée avec succès.
    SQL>1  select a.sn, decode(t.sn,null,'does not exists','already exists')
      2  from
      3  (select substr(replace(:sn1,'-','')+rownum-1,1,3)||'-'
      4        ||substr(replace(:sn1,'-','')+rownum-1,4,3)||'-'
      5        ||substr(replace(:sn1,'-','')+rownum-1,7,3) as sn
      6  from (select level
      7        from dual
      8        connect by level <= (replace(:sn2,'-','')-replace(:sn1,'-',''))+1
      9       )
    10  )a,
    11  t
    12* where a.sn=t.sn(+)
    SQL> /
    SN                            DECODE(T.SN,NUL
    321-569-986                   already exists
    321-569-987                   already exists
    321-569-988                   does not exists
    SQL> exec :sn1 := '321-456-789'
    Procédure PL/SQL terminée avec succès.
    SQL> exec :sn2 := '321-456-789'
    Procédure PL/SQL terminée avec succès.
    SQL> l
      1  select a.sn, decode(t.sn,null,'does not exists','already exists')
      2  from
      3  (select substr(replace(:sn1,'-','')+rownum-1,1,3)||'-'
      4        ||substr(replace(:sn1,'-','')+rownum-1,4,3)||'-'
      5        ||substr(replace(:sn1,'-','')+rownum-1,7,3) as sn
      6  from (select level
      7        from dual
      8        connect by level <= (replace(:sn2,'-','')-replace(:sn1,'-',''))+1
      9       )
    10  )a,
    11  t
    12* where a.sn=t.sn(+)
    SQL> /
    SN                            DECODE(T.SN,NUL
    321-456-789                   already exists
    SQL> Nicolas.

  • To get previous day timestamp of a timestamp value in java

    Hi,
    I have a timestamp variable, say settledTimeStamp which is passed as a runtime argument to a query. I should also send another timestamp variable say previousTimeStamp whose value should be previous day timestamp, ie for settledTimeStamp.
    For example,
    Todays date= May 9th 2008.
    say settledTimeStamp to May 7th 2008.
    I should get the timestamp value for previous day to SettleDate i.e May 6th, 2008.
    I am showing this as an example because I tried with Calendar options too but it takes current timestamp and gives previous days timestamp which is not the same as I required. Like it returns May 8th as my previousTimeStamp if I work with Calendar options....
    Can anyone help me on this?

    An object of the Calendar class represents a specific point in time. The fields, such as DAY_OF_MONTH, allow you to access meaningful parts of that specific point in time and use them. Calendar.DAY_OF_MONTH is a field, and it doesn't represent the "current day" or any particular point in time at all. It's used to ask a particular Calendar object what its DAY_OF_MONTH is.
    import java.util.Calendar;
    public class Test {
         public static void main(String[] args) {
              Calendar cal = Calendar.getInstance();
              cal.setTimeInMillis(99999999999L);
              int year = cal.get(Calendar.YEAR); //cal, what is your YEAR?
              System.out.println(year);
              int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK); //cal, what is your DAY_OF_WEEK?
              System.out.println(dayOfWeek);
              boolean inApril = Calendar.APRIL == cal.get(Calendar.MONTH); //cal, are you in the month of APRIL?
              System.out.println(inApril );
              System.out.println(cal); //cal, tell me all about yourself
    }Really, the documentation can do a better job explaining it than I can. Read it. And there are numerous Calendar and Date tutorials all over the internet. Date processing in java is not the easiest thing, so it can take a bit of getting used to, but you will have to read the documentation and write code yourself to understand it.
    Oh, and you mark your question as answered and then dispense duke stars to posts you felt were helpful. I don't think people here really care much about them.

  • OIM sql Query for getting the status of the task which got failed

    Hi Everyone,
    We have a requirement like we need to get the status of a particular task(say Create User in OID resource - Completed\Rejected status) for the particular user.We are able to get the status of the resource provisioed to the user but not the status of the particular task getting trigerred for the user.can someone put some light on this.We need to get the SQL query for this.
    Thanks in Advance.
    Regards,
    MKN

    Hi
    Use this sample query to get the task status, also check the cooments
    SELECT USR.USR_LOGIN, OSI.SCH_KEY,SCH.SCH_STATUS,STA.STA_BUCKET FROM
    OSI,SCH,STA,MIL,TOS,PKG,OIU,USR,OBJ,OST
    WHERE OSI.MIL_KEY=MIL.MIL_KEY
    AND SCH.SCH_KEY=OSI.SCH_KEY
    AND STA.STA_STATUS=SCH.SCH_STATUS
    AND TOS.PKG_KEY=PKG.PKG_KEY
    AND MIL.TOS_KEY=TOS.TOS_KEY
    AND OIU.USR_KEY=USR.USR_KEY
    AND OIU.OST_KEY=OST.OST_KEY
    AND OST.OBJ_KEY=OBJ.OBJ_KEY
    AND OSI.ORC_KEY=OIU.ORC_KEY
    AND OBJ.OBJ_NAME='AD User'
    AND OST.OST_STATUS = 'Provisioning' -- filter accordinglly
    AND STA.STA_BUCKET = 'Pending' -- filter accordinglly
    AND PKG.PKG_NAME='AD User' -- filter accordinglly
    AND MIL.MIL_NAME='System Validation' ---- filter accordinglly
    Thanks,
    Kuldeep

Maybe you are looking for

  • How do you add a third party web text editor to Muse?

    I'm recreating a site and I need a way to store publications on one of the pages of the site. It's something that is updated weekly so I need it to have an archive feature but I really no idea how this can be done. Here's an example: I downloaded thi

  • Faulting application iexplore.exe, faulting module jvm.dll

    I see there are a few posts on this sort of problem, but please bear with me as this is somewhat different. I develop a browser Add-on and one of my customers is experiencing an IE7 crash using Oracle/Jinitiator, with an event log message: Faulting a

  • How to send FAX using JSP

    Hi All I have a requirement in my JSP application to send documents stored on a system by FAX to a fax machine, I had also the requirement to send mails but that was solved using JavaMail. But is there any method through which a FAX can be sent to a

  • Play Audio On Scroll?? (nothing works for me...)

    I am using a form of parallax on the stage which controls the time playback based on the position of the scroll. This app (page) will be part of an iPad DPS package (one of many pages). I am including the script from the stage, and a link to download

  • Build a target group by Partner Function

    Hi forum friends Please I need a help. I want to create a target group by Partner function (BUT100). I have tried to use the join: BUT100(partner field) + BUT0CC(Partner) + BUT051(Partner1) + BUT000(Partner) but it doenst work. How can i do it? Thank