Query to ignore the records which are 6 months older

I need a query to ignore the records which are 6 months older . my table is having a column named quote_date . I need to ignore the records whose quote date is 6 months older . Can any one help me in this regard.
thanks in advance
rakesh

Hi:
SELECT *
  FROM table_name
WHERE MONTHS_BETWEEN (SYSDATE, quote_date) > 6HTH
Saad,

Similar Messages

  • How to create an XSD for file adaptor which will ignore the records that are not required.

    Hi All,
       I have a requirement, the Fixed Length file contains
    30013742387462382938742      82347023984623087   
    30037348237  983743  9837423098  98347 
    10108472398   98034702398409238 9838472398   09823409238
    300163527 387462398746 38746293874693746324763
    101037642873643 37438724683746837648 873648736
    200138743986493874398
    2002738469837246
    10003784629837469283746937463987469387
    I need to select only the records that startswith 3001 and 3003 which are of different types and ignore the remaining records like 1010,2001,2002,1000.
    Can any one help me on this.

    You can make use of "conditionValue" or "startsWith" attributes while designing you native XSD.
    Check this example - Native Format Builder Wizard - 11g Release 1 (11.1.1.6.3) for better understanding.

  • Can we export the records which are failed on an validation

    Hi
    My Question is after a validation is run on an record in the data manager,I like to extract the records from Data Manager,with the validation success(Tick) and failed(X) column which is generated by the system for each validation.
    As the validation fields in the Data manager are system fields , is it possible to extract ?, is there any other workaround for this.
    As in my system there are 10 validations which are grouped in to a validation group.when i run the validation group, i want to take a report kind of recordswith the validation Name Fields (tick) and (x) in to an excel or any format.
    Regards
    Sowseel.

    Hello Sowseel.
    In DM FreeFormSearch you have expression field - you can use it for create filter. and than export all selected records.
    You can create special field and use assignment with similar as you validation rule
    Assignment wil put expression result to that field (in fact - validation result)
    Then you can extract records with validation result.
    Regards
    Kanstantsin Chernichenka

  • Query to retrieve the records which have more than one assignment_id

    Hello,
    I am trying to write a query to retrieve all the records from the table per_all_assignments_f which has more than one different assignment_id for each person_id. Below is the query i have written but this retrieves the records even if a person_id has duplicate assignment_id's but i need records which have more than one assignement_id with no duplicates for each person_id
    select assignment_id ,person_id, assignment_id
    From per_all_assignments_f
    having count(assignment_id) >1
    group by person_id, assignment_id
    Thank You.
    PK

    Maybe something like this?
    select *
    From   per_all_assignments_f f1
    where  exists (select 1
                   from   per_all_assignments_f f2
                   where  f2.person_id = f1.person_id
                   and    f2.assignment_id != f1.assignment_id
                  );Edited by: SomeoneElse on May 7, 2010 2:23 PM
    (you can add a DISTINCT to the outer query if you need to)

  • SQL query to populate the records, the maximum processed should be less than 10 records per week.

    Dear All,
    I have a requirement, to write a SQL query to populate the records which are inserted less than 10 no of records.
    The tables has the cretaed_date column and along with other key column which will have unique values.
    Ex1:  The user might have inserted records from application, per week basis, between the date range '01-jun-2013' - 08-jun-2013  , the no of records created by the user during this week may be less than 10 records or more.
    But I want to populate the records by giving date range that too, it should pick the records the count which fall with in 10 records.
    I dont want the query to populate the records if the user has inserted more than 10 records in a week.
    Ex2:
    User 1 has created 15 records during the week 1 ( the query should not populate this ).
    User 2: has cretaed less than 10 records from the UI during the week 2. ( This details should get populated ).
    Thanks

    Use COUNT to find how many rows where inserted in a week.
    If this does not answer your question then please read Re: 2. How do I ask a question on the forums? And provide necessary details.

  • How can we restrict the other user to change the record which has been entered by particular user in MDS

    I have created Product entity in MDS. It's having the following values:
    Name  Code  Owner
    Bike    1      ABC
    Car      2     XYZ
    Cycle   3     RRR
    owner XYZ can change the record of RRR. But if owner XYZ or any other owner in this entity tried to update the ABC's record, access should be denied. That means, no one should have the permission to change the records which are entered by ABC.
    For this i have executed this code
    CREATE TRIGGER mdm.party_trial_readonly ON mdm.tbl_1042_1278_EN AFTER UPDATE, DELETE AS
    IF EXISTS (SELECT * FROM deleted WHERE readonly = 1)
    BEGIN
       ROLLBACK TRANSACTION
       RAISERROR ('Attempt to change a read-only row', 16, 1)
       RETURN
    END;
    After executing this code i couldn't edit any of the records.
    Please help me out in this.

    I have created 2 entities called Party and Owner.  Party has following columns (name, Code, Owner (Domain Based Attribute)) Owner has following columns (name, Code) And I have Created one Derived Hierarchy.
    From user and Group Permision Section, Hierarchy Members tab I have given read only permision to me (administrator of the Model). When I gave the permision I have selected users and Inherited from group in permission tab. And I'm not the part of any group.
    Now I'm not able to see my model except the explorer area. And I'm not able to delete the permission from the user. As per the admin guide we need to delete permission from group.
    Though I'm not the part of any group, I'm not able to proceed further to delete the permission.
    Please help me out in this regard. Thanks!

  • How to set the link to the result which are executed my query from database

    Hi,
    i have successfully displayed the results which are available in the database by jdbc, query.
    Then, How to give the link like href to each & every result...
    note: The number of records may be change. depending upon the records availablity in the database. but every result have the link.
    Thanks in advance.
    Regards
    Kumar

    hai kumar..
    i post an example code ..
    <%
    ResultSet rs1=stmt.executeQuery("select fromu,subject,message,mdate,status,mesid from message where to='" + lname +"'" );
    while(rs1.next())
         l=rs1.getLong(6);
         out.println("<tr align='center'> <td> <a href='deletemessage.jsp?mesid="+ l + "'>Delete </a></td><td>" + rs1.getString(1) +"</td><td> <a href='viewmessage.jsp?mesid="+ l +"'>"+ rs1.getString(2) +"</a></td><td>"+ rs1.getString(4) +"</td><td>"+ rs1.getString(5) +"</td></tr>");
    %>

  • Displaying the records records which are coming more than once

    hi
    create table temp(comp_id int,branch_id int);
    comp_id | branch_id
    ---------+-----------
    1000 | 1
    1000 | 1
    1000 | 2
    1000 | 2
    1000 | 3
    2000 | 1
    2000 | 1
    2000 | 2
    2000 | 3
    how can i write a query which displays the records records which are coming more than once on the basis of fields comp_id and branch_id. e.g. 1000 | 1 should be displayed because it is coming more than once. 1000 | 3 should not be, because it has a single entry.

    select comp_id, branch_id, count(*)
    from temp
    group by comp_id, branch_id
    having count(*)>1
    Please note this forum is not a SQL class and it is not the place to have your homework done.
    Sybrand Bakker
    Senior Oracle DBA

  • Hi I shoot on a canon 5d mk11 and I record my audio on an external device yet when I open up my footage in final cut pro x I can't find my external audio files only the ones attached to the clip which are off the camera mic

    I shoot on a canon 5d mk11 and I record my audio on an external device yet when I open up my footage in final cut pro x I can't find my external audio files only the ones attached to the clip which are off the camera mic

    What device?
    What format?
    How are you importing it?
    Can you find the external audio with Finder?
    Where is your destination file when you import it?
    Andy

  • Delete the records which have the Data values are NULL before load data to BPC model

    Hi Everyone,
    I am loading the data from flat file to BPC Model (10.0 Version).
    Source data (Flat file) looks like below:
    RP_Employee RPT_Currency Data
    Test                USD                   8
    Test1              USD
    Test2              USD                    6
    My user requirement is that to delete the records which have the Data values are NULL before load data to BPC model.
    So,Please let me know how can i meet to this requirement.
    I am thinking that,it is possible by using start routine BADi. If i am correct please let me know process like creation of class and BADi implementation.
    Thanks in advance!!

    Hi Nilanjan,
    Please see my source data below:
    Account      Client       Employee     Time                Data
    123              XYZ            Vishu            2014.01               300
    456                                                       2014.01
    789              ABC         Alexander      2014.02               200
    If you see the second record,
    If data value is ZULL,  then the Employee or another dimension is also NULL.
    So I want to delete second records.
    If it is Start routine please share the code and steps to do.
    Thanks in advance!!
    Regards,
    Viswanath

  • Selecting records which are greater than or of current week

    Hi I have a table having table structure
    CREATE TABLE OMPPRODUCTION
    LOCATIONID VARCHAR2(200 BYTE) NOT NULL ,
    IPC VARCHAR2(200 BYTE) NOT NULL ,
    PRODUCTIONWEEK VARCHAR2(200 BYTE) NOT NULL ,
    QUANTITY VARCHAR2(2000 BYTE) ,
    PRODUCTIONCODE VARCHAR2(2000 BYTE) ,
    MOULDQUANTITY VARCHAR2(2000 BYTE) ,
    SOURCE VARCHAR2(2000 BYTE) ,
    APPLICATION VARCHAR2(2000 BYTE) ,
    COMMENTS VARCHAR2(2000 BYTE) ,
    TLM DATE ,
    ADSTAT CHAR(1 BYTE) ,
    SID NUMBER(10, 0) ,
    SECURITYLEVEL VARCHAR2(100 BYTE) ,
    CONSTRAINT OMPPRODUCTION_PK PRIMARY KEY ( LOCATIONID , IPC , PRODUCTIONWEEK ) ENABLE
    It has field PRODUCTIONWEEK which is having data as YYYYMMDD.
    I want to select records which are starting from current week(Monday as starting Day).
    eg Current Day is 20120210 so i would select rows having date more than or equal to 20120206.
    Can anyone guide me how it can be achieved ?
    Edited by: MaheshGx on Feb 6, 2012 4:16 PM

    Hi,
    Boneist wrote:
    ... Wow, why so complicated? ...
    So, taking account of the fact your column isn't DATE datatype, this would be more efficient for you;
    select *
    from   ompproduction
    where  trunc(to_date(productionweek,'yyyymmdd'), 'iw') >= trunc(sysdate, 'iw');
    This will be even less complicated and more efficient:
    select *
    from   ompproduction
    where  to_date(productionweek,'yyyymmdd') >= trunc(sysdate, 'iw');However, given that OP is stuck with a VARCHAR2 column, I would suggest:
    SELECT *
    FROM   ompproduction
    WHERE  productionweek     >= TO_CHAR ( TRUNC (SYSDATE, 'IW')
                                     , 'yyyymmdd'
    ;Instead of calling TO_DATE for every row in the table, this calls TO_CHAR only once.
    Also, when there is invalid data (which is very likely when using a VARCHAR2 column to store dates), this will not raise an error.
    OP: Note that this only works because the sort order of your VARCHAR2 column corresponds to the sort order you want. If February 6, 2012 were stored as '02/06/2012' or '06-FEB-2012', then you'd have to use TO_DATE on every row.
    Boneist's main point is right.
    Dates belong in DATE columns. If you're getting the data from a file, convert the strings to DATEs when the table is populated.

  • How to find the LoginNames which are only having the special chars %, @, .

    I have a table called LoginTable in that I have a column called LoginName
    I want to select only the LoginNames which are having the special charecters like %, @ and . how to write the query
    Please help me out.
    it is some thing like select LoginName from LoginTable where LoginName like (%, @, .) please correct my query

    Please use regexp_like, if your database is Oracle10g 10.1 or higher.
    Otherwise...
    how to search for '%' in data
    select * from LoginTable
    where
    LoginName like '%\%%' escape '\'
    or
    LoginName like '%@%'
    or
    LoginName like '%.%'
    ;

  • Segregate the values which are not in Hierarchy ............

    Hi All,
    Please help me in building the following query:
    Parent Child
    ==== ===
    10 20
    20 30
    30 40
    50 60
    70 80
    etc..... In the above data let us assue there is only one grand parent say 10 and the values 50,60,70,80 etc are not attached to grand parent 10.So i need to display the values which are forgotten to attach to the Top Node 10 i.e, here 50,60,70,80 etc. If my query helps in retreving these values then i can attach them back to the hierarchy.
    Thanks in advance.
    regards,
    kalyan

    SQL>WITH t AS
      2       (SELECT 10 AS par, 20 AS chi FROM DUAL UNION ALL
      3        SELECT 20, 30 FROM DUAL UNION ALL
      4        SELECT 30, 40 FROM DUAL UNION ALL
      5        SELECT 50, 60 FROM DUAL UNION ALL
      6        SELECT 70, 80 FROM DUAL)
      7  SELECT *
      8    FROM t
      9   WHERE chi NOT IN(SELECT     chi
    10                          FROM t
    11                    CONNECT BY PRIOR chi = par
    12                    START WITH par = 10);
           PAR        CHI
            50         60
            70         80hth, Urs

  • Need to process the records that are selected using checkbox in an ALV

    Hi ..
    I am displaying some data in an ALV using the Parent-child relation, the parent records has a check box which is input enabled.
    On click of a button on the toolbar, i need the checked records to be fetched and processed.
    Please help me on how to fetch the records that are checked..
    Thanks,
    Derek

    Hello Derek,
    Is ALV created using OOPS or using conventional FM?
    If you are making use of OOPS technique, then call this method:
    CALL METHOD <grid_name>->get_selected_rows.
    BR,
    Vishal.

  • Using Javax.print I have to print the data which are stored in resultsets.

    Using Javax.print I have to print the data which are stored in resultsets.
    Actually we ar working on a project where n numbers of records are fetched from database and stored in Resultsets. We made JSF pages which displayes the records in Web Browser.
    There is a link in that page. If we click that print link, It has to be printed all the records row by row using javax.print. It should act like Printer friendly in browser.
    Kindly send us any example code to proceed.

    Is it possible to access the cache datasource inside the script component which is available in the same data flow task??
    Thanks in advance,
    Saravanan

Maybe you are looking for

  • Can't get 4.3

    When I try to update IOS, it says I have the most up to date version and that iTunes will check again on 3.19.11. The version I have is 4.2.6. Anyone else having this issue? My phone is the Verizon iPhone 4. Thanks!

  • Problem in calling Java Script and Process at the same time

    Hi Frenz, I have a requirement like this. when i press the button a page level process(Not Application level Process) and java script function has to happen. i wrote the Java script function to close the child window and reload the Parent window. I w

  • Problem with statspack package in oracle 9i

    Hi we are using oracle 9i(9.2.0.1.0).Installed stats pack package ,its created perfstat user(( created tablespace called perfstat and size 500m ) but tables not created. Afetr that sql>conn perfstat/perfstat@x; sql>select * from tab; no rows selected

  • Can you record audio in mainstage?

    Can you record audio in mainstage?

  • MacBook Pro Retina SanDisk SSD electronic noise

    I ordered an rMBP 15 with the 512 SSD from SanDisk and had id exchanged 3 times. All of them were making an electronic noise when accessing the SSD. In the Store however older models with Samsung SSDs made no noise at all. Finally I cancelled my orde