How to place two constraints on a single column

hii
i have a column which will store data in date format
now i need all the records whose value is not null in tht column and date should be from last week to current week
is there any other way to write query other than like this
let us assume its terminate date coloumn
select * from <tablename>
where terminate date is not null
and terminate date between sysdate+7 and sysdate-7
or
select * from <tablename>
where terminatedate between sysdate-7 and sysdate+7
and terminatedate not null

Err... ok I may have said that wrong...
But I still think it might be exclusive, no?
eg. you store 1, 2, 3, 4 and 5 in a table.
select *
from table
where number between 1 and 5
and you will get 1, 2, 3, 4
That is exclusive of the second value.
That is the standard definition of exclusive.
Inclusive includes the last value (eg. 5).
Exclusive does not.
There is the exception of the time, which I would like to know more about.
I don't mean to ruffle everyone's feathers though!
Sorry if I sound like a know-it-all :P
I freely admit that I don't!!
So back onto the time thing...
Say if I store...
01/01/07 00:50:00
01/01/07 18:20:00
02/01/07 05:35:00
02/01/07 20:20:00
03/01/07 00:00:05
03/01/07 23:50:00
in a table
and i go
select *
from table
where date between to_date('01/01/07','dd/mm/yy') and to_date('03/01/07','dd/mm/yy')
Won't I get
01/01/07 00:50:00
01/01/07 18:20:00
02/01/07 05:35:00
02/01/07 20:20:00
back?
and if i go
select *
from table
where date between to_date('01/01/07','dd/mm/yy') and to_date('04/01/07','dd/mm/yy')
OR
select *
from table
where date between to_date('01/01/07','dd/mm/yy') and to_date('03/01/07 23:59:59','dd/mm/yy HH24:MI:SS')
I'll get them all?

Similar Messages

  • How to place two checkboxes in a single line.

    Hi all,
        In selection screen , how we place two checkboxes
    with labels in a sigle line.
    Regards,
    bala.

    hi,
    chk this.
    chk this.
    SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(3) TEXT-003
    FOR FIELD P_Chk1.
    SELECTION-SCREEN POSITION 30.
    PARAMETER: P_chk1 AS CHECKBOX.
    SELECTION-SCREEN POSITION 35.
    PARAMETER: P_chk2 AS CHECKBOX.
    SELECTION-SCREEN: END OF LINE.
    SELECTION-SCREEN: END OF BLOCK B2.
    rgsd
    anver
    if hlped mark points

  • How to concatenate two colums into one single column

    I need some ideas to concatenate two different columns into one single column using a set of distinct values.
    For Example,
    Customer Product Number
    xyz A 1
    xyz B 2
    xyz B 1
    AAA C 7
    AAA A 1
    The result should look like this,
    Customer Value
    xyz A1 B2 B1
    AAA C7 A1
    How would I group this into once value ?
    Thanks in advance ...

    Tom's discussion of writing your own aggregate routines
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:2196162600402
    starts off with a link to the 8i alternatives
    "see
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:229614022562
    for 8i methods (not aggregates)"
    Unforutnately, it's a lot more work in 8i.
    Justin

  • How to call two RFC in a single JAVA method.

    Dear all,
    I just want to know that how to call two RFC in a single java method which is defined in CRM implementation file. I'm using NWDS as the customization IDE & working on ISA 7.0.

    Hi Sunil,
    In the Backend Implementation class, in any method you can call multiple RFCs.
    It will be the same way as you do for the single RFC call.
    Following syntax is for your reference.
    Get the JCO connection
    JCoConnection  connection = getDefaultJCoConnection();
    JCO.Function func = connection.getJCoFunction("ZXXXXXXX");
    set the import parameters
    Execute it.
    connection.execute(func);
    get the data from export / table parameters
    Now call the second RFC
    func = connection.getJCoFunction("ZYYYYYYYYYY");
    set the import parameters
    Execute it.
    get the data from export / table parameters
    close the connection
    Hope this will help you.
    -Chandra.
    Edited by: Chandra Sekhar Seeli on Jan 13, 2011 2:04 PM

  • How to Append two  word documents into single  using   java

    How to Append two word documents into single using java
    we tried this but it's not append the one word document to other
    source code:public class AppendTwoWordFiles {
         public static void main(String []arg)throws IOException
              FileInputStream fi=null;
              FileOutputStream fo=null;
              try {
                   System.out.println("Enter the source file name u want to append");
                   BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
                   File f1=new File(br.readLine().toString());
                   System.out.println("Enter the Destination file name ");
                   File f2=new File(br.readLine().toString());
                   fi = new FileInputStream(f1);
                   fo = new FileOutputStream(f2,true);
                   byte b[]=new byte[2];
                   while((fi.read(b))!=-1);
              fo.write(b);
    System.out.println("Successfully append the file");
              } catch (FileNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              finally{
              fi.close();
              fo.close();
    plz reply me quickly ,,,what can i follow

    Use this code ..
    and give the path of the both file like this.....
    source file ---- C:/workspace/Practice/src/com/moksha/ws/test/practice.text
    destination file ---- C:/workspace/City/src/com/moksha/ws/test/practice1.text
    import java.io.*;
    public class AppendTwoWordFiles {
         public static void main(String[] arg) throws IOException {
              FileInputStream fi = null;
              FileOutputStream fo = null;
              try {
                   System.out.println("Enter the source file name u want to append");
                   BufferedReader br = new BufferedReader(new InputStreamReader(
                             System.in));
                   File f1 = new File(br.readLine().toString());
                   System.out.println("Enter the Destination file name ");
                   File f2 = new File(br.readLine().toString());
                   fi = new FileInputStream(f1);
                   fo = new FileOutputStream(f2, true);
                   byte b[] = new byte[2];
                   int len = 0;
                   while ((len = fi.read(b)) > 0) {
                        fo.write(b, 0, len);
                   System.out.println("Successfully append the file");
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
              } finally {
                   fi.close();
                   fo.close();
    }

  • How to place two narrow portlets in the same row of a wide column

    Hi,
    How to place two narrow portlets in the same row of a wide column.
    Im using ALUI 6.1
    Thanks in advance
    sandeep

    As I understand there is no easy way to do it now. I guess in theory that can be done by customizing ALUI page layout source code, but this is significant efforts. Correct me if there is more easy way to do it.
    Edited by Bryazgin at 05/23/2007 7:32 AM

  • How to place two different indesign documents side by side on my desktop in order to copy and paste images and text from one to the other?

    How to place two different indesign documents side by side on my desktop in order to copy and paste images and text from one to the other?

    Or choose Window > Arrange > Tile
    And, you of course can copy/paste without tiling.

  • How to identify missing records in a single-column table?

    How to identify missing records in a single-column table ?
    Column consists of numbers in a ordered manner but the some numbers are deleted from the table in random manner and need to identify those rows.

    Something like:
    WITH t AS (
               SELECT 1 ID FROM DUAL UNION ALL
               SELECT 2 ID FROM DUAL UNION ALL
               SELECT 3 ID FROM DUAL UNION ALL
               SELECT 5 ID FROM DUAL UNION ALL
               SELECT 8 ID FROM DUAL UNION ALL
               SELECT 10 ID FROM DUAL UNION ALL
               SELECT 11 ID FROM DUAL
    -- end of on-the-fly data sample
    SELECT  '[' || (id + 1) || ' - ' || (next_id - 1) || ']' gap
      FROM  (
             SELECT  id,
                     lead(id,1,id + 1) over(order by id) next_id
               FROM  t
      where id != next_id - 1
    GAP
    [4 - 4]
    [6 - 7]
    [9 - 9]
    SQL> SY.
    P.S. I assume sequence lower and upper limits are always present, otherwise query needs a little adjustment.

  • How To place two images in a obiee 11g Report Page header

    Hi ,
    Greetings for the day!.
    I want to place two images (one at top left and another at top right ) above the table view . I am not sure how it is called as. i think it is page header . Can anyone let me know how to accomplish this ?
    Kind Regards
    Sudarshan

    Hi,
    Will you pls let me know the best pixel size can be given for both images ?
    Also how can i make the images left and right aligned .Formatting option is not allowing to move the images left or right.
    Pdf output of the report header should display images one at extreme left and extreme right.
    Will you pls let me know whether i can try in single view(title/static/narrative) with html code like below :
    <img src="smiley.gif" alt="Smiley face" align="middle" />
    If so pls provide the details.

  • How to join two hiearchy in a single report

    Hi,
        I have two hiearchyes on two master data objects, How best can i  customise to view this two hiearchies in a single report.

    Hi Nagendra,
    Find the below links and blogs..
    May be this will helps you
    A BW hierarchy has the following properties:
    Hierarchies are created for basic characteristics
    Hierarchies are stored in special master data tables. They behave in a similar way to master data,
    and can therefore be used and modified in all Info Cubes.
    You can define several hierarchies for a single characteristic.
    A hierarchy can have a maximum of 98 levels.
    http://help.sap.com/saphelp_nw70/helpdata/EN/80/1a670fe07211d2acb80000e829fbfe/frameset.htm
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b07849c7-3a5b-2b10-7586-c431d300a578
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20a709c1-0a8e-2a10-21b4-f779728c63bf
    /people/vijay.vijayasankar/blog/2008/03/13/crm2007-who-gets-to-see-what--some-strategies-for-managing-internal-and-external-users-part-1
    /people/shafiq.rehman3/blog/2008/01/22/hr-interface-toolbox--pu12
    /people/kamal.khanna/blog/2008/07/09/managing-data-of-most-valuable-asset-of-an-organization-employees
    Regards
    Sudheer

  • How to Insert two queries in a single workbook in BI 7 ?

    Hi,
               I am trying to insert two queries in a single workbook. The queries are of Accounts Receivable.I have inserted one query in a workbook , but am not able to proceed to inserting the second query. In BEx analyzer, in design mode , using analysis grid , i tried inserting the second query but when saving and running, i am getting message " Variables are present, change their values " . should i maintain same variables for two queries ? i am stuck up. please explain me as how can this be done.
    Roja.

    Hi,
    If you get the message "Variables are present, change their values" ,it means that the query which you inserted having variables.
    You just click the "Change Variables" icon in the Analysis Toolbox,which will invoke the variable screen.
    Set the values in the variable screen and click OK.
    Now you will be able to see the data in the grids based on the values selected in the variable screen.
    Both queries data will be displayed in the workbook.
    Let me know in case of any clarifications!
    Rgds,
    Murali

  • How to Combine Two SubPaths into a Single SubPath

    For CS 5, ActionScript:
    I have a Path which contains two subpaths, which may or may not overlap.
    How do I combine them into a single SubPath (i.e., union) via scripting?
    I know that in the GUI, I can select both SubPaths and then press the "combine" button - this is the effect I want.
    TIA,
    mlavie

    This should combine the first path in the Paths Panel:
    // 2012, use at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
    var myDocument = app.activeDocument;
    if (myDocument.pathItems.length > 0) {
    myDocument.pathItems[0].select();
    // =======================================================
    var idcombine = stringIDToTypeID( "combine" );
        var desc10 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref7 = new ActionReference();
            var idPath = charIDToTypeID( "Path" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref7.putEnumerated( idPath, idOrdn, idTrgt );
        desc10.putReference( idnull, ref7 );
    executeAction( idcombine, desc10, DialogModes.NO );

  • How to have cascading lov for a single column in tabular form

    Hi,
    How to have a cascading lov for a single column in tabular form
    ie i have one employee name column
    in tabular form if v pressed add row then one row ll be added
    In my scenario based on first row value
    the second row value to be displayed
    To achieve this what i have to do ..
    Regards,
    Pavan

    READ Cascading select list on tabular form  and
    Oracle APEX 4.0: Cascading LOVs/Select Lists | Inside Oracle APEX by Patrick Wolf BLOG
    helps you,
    Pars.

  • How to add two X Axis in the Column chart?Need Help

    Hi,
    I have a requirement to add two X axis in the SSRS column chart.Can someone please help how to add two X axis. I tried the secondary axis for horizontal axis but current x axis is shifting to other side, second X axis is not coming.
    Regards
    Jon

    Hi Jon,
    According to your description, you want to add secondary X axis for one series in a column chart, right?
    The secondary axis is useful when comparing two value sets with two distinct data ranges that share a common category. In Reporting Services, it’s not supported to create two X axis for one series. We can create secondary X axis when there are two series
    in a column chart. As we tested in our local environment, we can add secondary X axis for specific series. Please refer to the screenshots below:
    So I would like to know what’s your exact needs about creating two X axis for one series. If possible please share some detail information about your data and expected looking of the chart.
    Reference: Plot Data on a Secondary Axis (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • How to remove dotted lines in a single column using javascript?

    Hi,
    In InDesign document,i want to remove the dotted lines in a single column using javascript.here i want to remove only the dotted lines has presented at the end of text in a cell.kindly help me if anyone has idea regarding this.
    Thanks in advance!
    Vimala L

    Hi,
    Those dotted lines have added in the document by manually. The dotted lines have presented in all the columns but in a single column i need to remove it.
    Thanks,
    Vimala L

Maybe you are looking for