Between ......and........operator

Hi all,
I am using between and operator and getting the following result.
select empno,ename,sal
from emp
where sal between 1500 and 3000;
EMPNO ENAME SAL
7499 gunit 1600
7566 gunit 2975
7698 gunit 2850
7782 gunit 2450
but when i use null it gives me no row selected.
select empno,ename,sal
from emp
where sal between 1500 and null
no rows selected
My query is if we consider null as the highest value ,then it should show me 1500
onwards all results.

Some docs:
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/sql_elements5a.htm#59112
To test for nulls, use only the comparison conditions IS NULL and IS NOT NULL. If you use any other condition with nulls and the result depends on the value of the null, then the result is UNKNOWN. Because null represents a lack of data, a null cannot be equal or unequal to any value or to another null. However, Oracle considers two nulls to be equal when evaluating a DECODE function.
Rgds.

Similar Messages

  • Between and operator is not working

    Oracle 10g
    Hi
    SELECT to_char(reportingdatetime,'DD-MON-YYYY HH24:MI:SS'), code, description, details, processname, instanceid, order_number,upi,reference
    FROM XXHDNL_INT_HUB_ERROR_DETAILS
    where
    to_char(reportingdatetime,'DD-MON-YYYY HH24:MI:SS') between '30-NOV-2010 06:00:00' and '01-DEC-2010 05:59:59'
    and
    CODE ='2M-4103'
    I am using this query to get the error details but its not returning any row.
    But when ran the query without "between and" i am getting the output of 30 Nov and 01 Dec records
    Pls correct where i went wrong
    Thanks & Regards
    Srikkanth.M

    1) You have a data model error. Dates really really ought to be stored as a DATE or a TIMESTAMP. Storing date data as a VARCHAR2 is going to cause a whole raft of problems down the line.
    2) If ReportingDateTime is a VARCHAR2, it makes no sense to use TO_CHAR. It's already a string, no good can come from trying to convert it to a string. And you can introduce lots of fun bugs because the TO_CHAR call forces the string to be converted to a date using the session's NLS_DATE_FORMAT and then that date is converted back to a string. If the NLS_DATE_FORMAT for the session happens not to match the hard coded date format, you'll suddenly start getting errors.
    3) Your example works because '29-NOV' comes before '30-DEC' alphabetically. But you would also return data for '29-Oct' and '29-Sept' which is almost certainly not what you want.
    4) Until you correct the data model issue, you want
    WHERE to_date( ReportingDateTime, 'DD-MON-YYYY HH24:MI:SS' )
      BETWEEN to_date( '29-NOV-2010 06:00:00', 'DD-MON-YYYY HH24:MI:SS' )
          AND to_date( '30-DEC-2010 05:59:59', 'DD-MON-YYYY HH24:MI:SS' )5) If you are going to make the mistake of storing date date as a character string, it would make sense to at least choose a format that sorts the same alphabetically and chronologically (i.e. 'YYYYMMDDHH24MISS'). Not that this would make #1 any less true. But it would at least reduce the possibility that someone incorrectly doing a string comparison would at least get the right results.
    Justin

  • Error  while configuring SSO between Portal 7.0 and Operating System.

    Dear all,
    I am having an issue,i need to configure SSO between the Portal 7.0 and operating System.I have followed both the Kerberos as well as spNego wizard methods,but i am not able to configure UME settings as we are using datasourceConfiguration_abap.xml. I tried to edit the datasource confuiguration file but after editing the server is not starting.
    Please let me know the steps i have to do to edit the datasourceConfiguration_abap.xml
    We are not able to Map the Service USer to the UME CONFIGURATION XML File.
    Thanks
    Ravi.S

    Ravi,
    If you have successfully configured the SSO, please pass on the document if any you have.
    Regards,
    Mohammad.

  • Ctrl+Shift do not shift between languages in Firefox and Opera browers

    Pressing Ctrl+Shift on the keyboard do not shift between languages when typing in Firefox and Opera browsers, but it works fine in Word and other applications. I have Windows XP SP3. My browsers are updated.

    Firefox has menu items that use the Shift and Ctrl modifier keys (e.g. Ctrl+Shift+Z = Redo) and those can interfere, especially when typing in a text area.
    You might have more luck with Alt and Shift instead.
    Try to assign different keyboard shortcuts to each of the installed languages instead of using a key sequence to cycle between installed language layouts.

  • What is the differene between filter operation and NL semi join?

    Hi, all.
    The oracle is 10gR2 and 11gR2.
    There are differences between filter operation and HASH/MERGE semi join in processing subqueries.
    But I could not see the difference between filter operation and NL semi join?
    (the only thing I know is that filter operation has caching mechanism, but I am not sure in case of NL semi)
    What are the pros and cons of each of them?
    Thanks in advance.
    Best Regards.

    >
    The oracle is 10gR2 and 11gR2.
    >
    Those aren't 'version's. What are the 4 digit versions?
    >
    There are differences between filter operation and HASH/MERGE semi join in processing subqueries.
    >
    What are they? When you make a statement like that post the information (and links to it) that backs up your statement.
    >
    But I could not see the difference between filter operation and NL semi join?
    (the only thing I know is that filter operation has caching mechanism, but I am not sure in case of NL semi)
    >
    We can't 'see the difference' either; you didn't post anything for us to look at.
    >
    What are the pros and cons of each of them?
    >
    Each of what? Again - you need to be as specific as possible if you want specific feedback.
    Also, since you generally should not use hints in production code anyway what difference does it make what the differences are? Oracle will make the choice.
    Without anything specific to comment on about all we can do is provide several links that talk about joins and how to produce and examine them. These are all from Jonathan Lewis's Scratchpad:
    http://jonathanlewis.wordpress.com/?s=semi-join
    http://jonathanlewis.wordpress.com/2010/12/20/index-join-4/
    http://jonathanlewis.wordpress.com/2010/08/15/joins-mj/ -- merge joins
    http://jonathanlewis.wordpress.com/2010/08/10/joins-hj/ -- hash joins
    http://jonathanlewis.wordpress.com/2010/08/09/joins-nlj/ -- nested loop joings
    http://jonathanlewis.wordpress.com/2011/06/08/how-to-hint-1/ -- how to hint for joins
    Check out those articles. Pay attention to how, in each one, he doesn't just provide a text description but also provides code and explains the code.
    In other words he provides all of the specific information needed to illustrate what he is talking about. That is what you need to do if you need help with a specific topic: provide the query, plans and output that you yourself are using as the basis of your question. That lets us see EXACTLY what you are talking about.

  • Relation between Maintenance Order No. and Operation Number

    Hi all,
    I have to make a module pool in which i want to display the following field
    Order No.                                               
    Operation no. | Operation Description |
    Now my problem is that i m not getting the tables from which i have to select data basically i want to extract the data on the basis of Maintenance Order No. and Operation Number.
    I have checked the following tables
    AFKO , AFVu , AFVC, CAUFV.
    But i m not able to find any relation between Maintenance Order No. and Operation Number.
    Please help!!!
    Thanks and regards,
    Rachit khanna

    Hello Rachit,
    The relation is as follows
    AFKO-AUFPL (Routing number is Order header)
    Use this routing number to get operations from AFVC
    AFVC-VORNR gives operation number
    AFVC-LTXA1 gives operation description
    For sub-operations, VORNR will be sub-operation number, and AFVC-SUMNR for this sub-operation corresponds to the respective superior operation(refers to AFVC-APLZL).
    AFVC-APLZL is a unique number for each operation.
    Hope this helps. You can check with some existing/new orders as well.
    let me know if you need anything about split operations as well.
    Best Regards,
    Subhakanth

  • Re: DIfference between Schemas, PCRS' FUnctions and Operations

    Dear SAPExperts,
    Can anybody pls tell me what is difference between Schemas, PCRS' Functions and Operations.
    Thanx in advance
    Regards
    Aniruddha

    Hi Aniruddha
    When the payroll driver is executed (for ex: PC00_M40_CALC for INDIA is executed) the schema IN00 (standard schema) is executed and it calls certain functions (functions may use Rules. Rules contain Operation) and also subschemas.
    Functions could be of four types
    1. Performing some payroll computations (E.g. INEPF function calculates the PF amount of an employee during payroll run)
    2. Calling rules (E.g. P0045 function calls a rule INLN to compute the loan details of a personnel number).
    3. Getting data from Infotypes (E.g. P0581 will get the data from Infotype-581 for payroll processing).
    4. For some decisions. (E.g. IF & ENDIF function is used to execute as per the true and false decisions) etc.
    When the PY is executed SAP uses lot of Internal Tables to store data and also provides data to other internal tables.
    The read and change access to Internal Tables is enabled using functions that are executed in a personnel calculation schema and using operations that are executed in personnel calculation rules.
    The following is just an attempt to provide some info on how Functions are processed during the PY Run. For ex: (functionality of subschema XIN0 and INBD)
    1. INITIALIZATION OF PAYROLL: When the Payroll is executed first the subschema XIN0 is called,   This subschema comprises the following main steps:
    I.     Specify program type (payroll or evaluation)
    II.     Set switch for database updates (YES/NO) all database updates are controlled via this switch (otherwise simulation)
    III.     Only infotypes from the HR master record which apply to the selected personnel number are read.
    IV.     All Time Management infotypes are imported.
    V.     Specify check against control record PA03 (test or live).
    2. READ BASIC DATA: Once the Initialization of Payroll is successful, the subschema INBD is called. This subschema reads the Basic data of an employee who is there in the Payroll execution. Basic Data includes, determining Employee Name, Reading Work Center/Basic Pay Data, Setting Financial Year Dates and Allowance Grouping Tables, Reading Previous Employment Tax Details, Reading Housing (HRA/CLA/COA), Reading Exemptions, Reading Income from Other Sources, Reading Section 80 Deductions, Reading Investment Details (Sec 88), Reading Provident Fund Contributions, Reading Other Statutory Deductions, Reading Car and Conveyance, Reading Long Term Reimbursements, Read ID Details. Function GON checks whether all the master data has been imported, no further processing of schema will occur unless certain data is present.
    The Subschema INBD calls the following functions in order to read the Basic Data:
    ENAME :
    Function ENAME reads the last valid name of the employee in the payroll period. The formatting used for the country in question is used when displaying this name.
    WPBP
    If an employee receives a pay increase within a payroll period, the Basic Pay infotype (0008) is changed and delimited as of a specific date. Two data records exist for one payroll period.
    During payroll, the system writes the Basic Pay wage type to the results table with two different indicators. These split indicators are a link to the WPBP table that contains the relevant values. The system takes into consideration both data records for the corresponding partial periods when calculating remuneration.
    ININI
    P0580
    P0581
    P0582
    P0584
    P0585
    P0586
    P0587
    P0588
    P0583
    P0590
    P185I
    GON :
                    Function GON checks whether all the master data has been imported. No further processing of the schema will occur unless certain data is present. Checking procedures vary from country to country. There must always, however, be a work center (P007).
    [Def. of Functions, Rules and Operations (copied from Raju's answer)
    Schema is a collection of functions
    A Rule is a collection of operations.
    An operation is a very basic piece of logic that is used, mostly, to manipulate wage types
    Best Regards
    Reddy

  • Difference between "base quantity" and "operation quantity" in an operation

    Hello
    what is the difference between "base quantity" and "operation quantity" in a production order ?
    thank you for your answers

    Base Quantity - Quantity of the material to be produced to which the standard values of the operation refer.
    Operation Quantity - Quantity planned for this operation.
    Base quantity and operation quantity may not always be the same, if we have partial lots delivered during the sequence of operations, the operation quantity will be equal to the lot delivered during the operation.
    Base quantity is dependent on the BOM, where it signifies the total quantity of output after using the components of certain quantity.
    Hope this may help you.

  • WCS difference between "admin status" and "oper status"

    Can anyone explain what the difference is between admin status and oper status within the WCS GUI. It appears that disbaling either on effectively disables the radio...is that correct?

    I think I got it figured out...thanks for lookin....

  • Difference between Order Header BSD and operation schedule SSD

    Hi,
    One of your Client is operating on SAP 4.7
    There are some cases where Order Header Basic Start Date and operation Schedule Date are no same.
    example:
    Present Order Basic Start Date 24.06.2011
    Present Order Basic Finish Date 01.07.2011
    Forward Schedled order.
    Operation 1
    Operation 2
    Work Center has sufficient capacity and is available to perform work 24hrs.
    Using planning board CM10 user dispatches operation 1 to 30.06.2011 and operation 2 to 01.07.2011.
    The problem is order basic start date is remaining same i.e. 24.06.2011 and not chaning to 30.06.2011.
    Can any one please help in this issue.

    yes for all order types and also i have observed that most of work order has basic start date as 24.06.2011 when all the operations of orders are scheduled in future dates (date other than 24.06.2011).
    The first time scheduling of work order operation is done on 24.06.2011 (CM10) and then after re-scheduling (through IW38) of operation changed the schedule start date but work ordre basic start date remained same i.e 24.06.2011.
    Dispite of first time scheduling and then re-scheduling basic start date remained 24.06.2011.
    Note: Same profile was selected in both CM10 and IW38 while accessing planning board.

  • What is a Legal Entity and Operating Unit??

    Hi,
    Could someone let me know what exactly is a Legal Entity and Operating Unit. The definition or explanation in the documentation is not satisfactory or clear. What are the differences between the above.
    And where in the per_all_assignments_f table is the Legal entity stored. I know that the Legal entity is stored in the Statutory information in the assignments screen. Also can someone let me how based on the company code in the organization the legal entity is linked. Where in the tables is this link maintained?
    Could someone let me know the above.
    Thanks
    Shekar.

    Dear Shekar
    what exactly is a Legal Entity and Operating Unit?
    ANS: According the Book or user guide definitions says:
    GRE/Legal Entity: Use this classification to represent the following organizations:
    Ultimate Legal Entity: this represents the enterprise, and typically, the enterprise is the highest (global) level of a business organization.
    Legal Entity: this represents the designated legal employer for all employment-related activities. The legal authorities in a country recognize this organization as a separate employer. In an organization hierarchy, a legal entity may report to an operating company or to the ultimate legal entity.
    Consolidated Legal Entity: this organization acts on behalf of multiple operating companies that are not legally registered, or simply on behalf of the enterprise in a country.
    See Shekar the Legal Entity is taken under Classification is we know that the organization is going to show the Taxation to the Government. where as if u take typical UAE countruies here every store is an LLC and they submit the taxing for every store or shop.
    Where as Operating Unit is generally used for the different lines of business which are under that Business GRoup
    Say for an Example:
    ABC is the Company name and that has its root in UAE, Qatar and Oman
    then it is like ABC Business Group > UAE Legal Entity > REtail/Property/Furniture etc are the Operating Units.
    Hope this information is helpful and clear to you or else let me know if you have any concerns.
    Coming to the Company Code we use the code for the Inventory Organizations so that the clients will not get confused with the existing code and the system code so generally we use the same codes for it.

  • Using "AND" operator in expression.

    Hi All,
    I am new to crystal reports. In formula editor my report i am using one expression to evaluate some calcualtions. please find the sample expression like which i am using.
    numberVar iSubCause := 65 AND 15;
    hexadecimal of 65 AND with hexadecimal of 15 results 1.
    iSubCause in the above case should be 1.
    Let me know How to have such kind of expressions in CR's.
    Regards,
    Pradeep.

    Hi Sastry,
    thats fine. if we do AND operation between them(65 and 15) we will get 1. That i want to have it in that variable. Is there any other way to do same operation which results as 1 in crystal reports.
    How to check least significant bits of any number??
    - Pradeep.

  • Cross company transaction between different operating concerns

    Dear Gurus
    we have scenario for new implementation that we have to enable Cross company code transaction between different operating concerns. Stock movements and other inter company purchases etc
    Please advise is this possible or not.

    Dear Mohsin,
    is it only for stock transactions??
    Regards,
    Raman

  • Client copy between different operating systems.

    Hi Experts,
    Our production system is running on HP-UX OS. We are installing a standby quality system and planning to do a client copy to this system from production by taking this into transport domain. But this new system is in windows. So, is it possible to perform a client copy where the source system is HP -UX and target system is windows??
    Regards,
    Amit.

    Hi Amit,
    Follow SAP Note 552711 for client copy. Refer to qns no 4 & 5, which is relevant for your question.
    Can I create client copies in a heterogeneous system landscape?
    Remote copies or client transports can also be carried out between different database and operating systems.
    Regards,
    Debasis.

  • How many partitions and operating systems can you line up in BootCamp?

    A quick question, hopefully with a quick answer.
    How many partitions and operating systems can you line up in BootCamp?
    Are we limited to just 2, or can we have more?
    Say, for example, Mac, Win XP, Win Vista and Linux maybe?
    Thanks in advance.

    VPC does not run on Intel Macs. If you wish to use virtualization on an Intel Mac see this:
    Windows on Intel Macs
    There are presently several alternatives for running Windows on Intel Macs.
    1. Install the Apple Boot Camp software. Purchase Windows XP w/Service Pak 2 or Vista. Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows. Boot Camp enables you to boot the computer into OS X or Windows.
    2. Parallels Desktop for Mac and Windows XP, Vista Business, or Vista Ultimate. Parallels is software virtualization that enables running Windows concurrently with OS X.
    3. VM Fusionand Windows XP, Vista Business, or Vista Ultimate. VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    4. CrossOver which enables running many Windows applications without having to install Windows. The Windows applications can run concurrently with OS X.
    5. VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris. It is not yet fully developed for the Mac - some features are not yet implemented - but it does work otherwise.
    6. Last is Q. Q is a freeware emulator that is compatible with Intel Macs. It is much slower than the virtualization software, Parallels and VM Fusion.
    Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc. There are performance differences between dual-boot systems and virtualization. The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system.
    See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion.
    Boot Camp is only available with Leopard. The Boot Camp Beta that was used with Tiger has expired and is no longer available for use. So contrary to the other poster's comment, Boot Camp isn't truly "free." You must purchase Leopard to get it.
    You can upgrade XP to Vista without having to make any changes to the Boot Camp partition. Vista can either perform an upgrade install or erase the Windows volume before installing Vista. You don't need to do anything to change the partition via Boot Camp. However, if you need to enlarge the partition, then the only way that can be done is to first use Boot Camp to remove the partition. Then use Boot Camp to make a new, larger partition. All data from the Windows partition will be lost.

  • Difference between and != operators

    Hi All,
    My question may be very basic to you all
    Please let me know the difference between <> and != operators
    Thanks in advance

    user609996 wrote:
    Sorry to all,
    the operator "<>" is not printed
    I want the difference between "<>" and "!=" operators.And as you've already been told there is no difference between the &lt;&gt; and != operators. They mean the same thing, but are just different representations of it.
    The only difference is that the Oracle forum can't display &lt;&gt; if it is just typed in normally. To show it we have to type &lt and &gt with a ";" after each.

Maybe you are looking for