By using the negative operator

I am very new to oracle and works collaboratively with the negative operator to run a query. I could use some help!

Here's the query I'm working on that:

Select the provider name, partname
quote
where partname = "hammer".
less
Select the provider name, partname
quote
where partname = "hammer";

HOW CAN I GET THE QUERY TO DISPLAY ONLY THE ROWS OF SUPPLIERNAMES THAT PROVIDE ONLY HAMMERS?
I WOULD BE VERY HAPPY FOR CLARIFICATION.

You did not if you use LESS, or you just want to. I guess for now by using LESS that it is a requirement.

Experiment with the SQL you are using. Add predicates in the WHERE clause to get precisely the lines you want for both queries. Remember that the results for LESS than will take the results of the first query and delete the second query results with the values returned by the first query not returned by the second result.

Also remember that comparisons of strings in Oracle are dependent case. Your query used 'Hammer' - tiny - but the information you listed used "HAMMER" - uppercase. These are different values and will not match. I'm not sure that you want to search for 'HAMMER' in the second query if you want to remove the other values - you may need to check the values that are not "HAMMER" instead.

In addition, you used the LIKE operator without a wildcard "%" or "_". AS no Joker becomes =.

Tags: Database

Similar Questions

  • My account is active, but Adobe PDF Export ask me to sign up again. The system worked only once on my PC, using the Vista operating system.

    My account is active, but Adobe PDF Export ask me to sign up again. The system worked only once on my PC, using the Vista operating system.

    You must connect prove you are currently subscribed.

  • problem using the ternary operator in el?

    Hi all
    I m using the ternary operator in el in entering text in the property value as

    value = "#{bindings." FirstName.inputValue eq 'amit '? Amit: links. LastName.inputValue}.

    Can you all please let me of this. Not able to find out where I m making mistake.

    Thanks in advance.

    Hello

    You can try the below el

    value="#{bindings.FirstName.inputValue eq 'amit' ? bindings.FirstName.inputValue : bindings.LastName.inputValue }"
    

    ~ Abhijit

  • Cannot transfer or write emails. Using the linux operating system

    I can't write an email or send an e-mail sent. I use linux for operating system.

    Solved the problem. It was the program of Ghostery.
    Thank you for your help.

  • Using the Pivot operator with percentages

    I use Oracle 12 c DB. I'm trying to use the SQL pivot operator to give me an output of the matrix. I need to display 2 separate outputs, one with the charges and another with percentages. I have the following SQL to get the counties, but I don't know exactly on the SQL for the percentages. Please notify. TX

    with pivot_data as (select 'score', 'Observer_LastName', 'profile_id'

    FROM MyTable

    where substr ("Observer_LastName", 1, 1) s = ')

    SELECT *.

    of pivot_data

    PIVOT (count ("profile_id")

    FOR 'partition' IN ('0', '1', '2',' 3')

    )

    Hello

    Using the table from scott.emp provided by Oracle, which has these counts for deptno and job:

    WORK DEPT_10 DEPT_20 DEPT_30

    --------- ------- ------- -------

    ANALYST 2

    CLERK 1 2 1

    MANAGER 1 1 1

    PRESIDENT 1

    SELLER 4

    You can get out of the percentages, like this:

    WORK DEPT_10 DEPT_20 DEPT_30

    --------- ------- ------- -------

    ANALYST OF 100.00

    THE CLERK 25.00 50.00 25.00

    MANAGER OF 33.33 33.33 33.33

    PRESIDENT 100.00

    SELLER 100.00

    using a query like this:

    WITH pivot_data AS

    (

    SOME jobs, deptno

    100 * RATIO_TO_REPORT (COUNT (*))

    RESUMED (work PARTITION) AS pct

    FROM scott.emp

    Working GROUP, deptno

    )

    SELECT *.

    OF pivot_data

    PIVOT (MIN (pct)

    TO deptno IN (10 AS dept_10

    20 AS dept_20

    30 AS dept_30

    )

    )

    ORDER BY job

    ;

  • How to use the set operator

    Hi all

    Table 1: -.

    NAME NO.

    A 10

    B 20

    Table2: -.

    NO ENAME

    10

    20 DF

    I want to output as a Set operator using

    NO NAME NO ENAME

    A 10 EC

    B 20 DF

    Thank you

    Try this,

    with t1 in (select 'A' name, 10 no double

    Union select name from 'B', 20 no double), t2 as (select 10 no, 'THIS' double ENAME

    Union select 20 no, "DF" double ENAME)

    Select name, t1.no, ename from t1, t2 where t1.no = t2.no;

    Please tell me why you use the operation?

    Thank you

    Gérard

  • How to use the negation in the user defined rules?

    Hello

    Can you please show me an example using negation in the rule set by the user? I created a rule like below (the rule says that if a patient has a fever problem and not having penicillin hypersensitivity, then recommend medication1):

    INSERT INTO mdsys.semr_myMedicineRB VALUES ('rule1',

    ' (? p RDF: type: Patient) (? p: present? c1) (? c1 RDF: type: fever) (? c2 RDF: type: Penicillin_Hypersensitivity)',

    "(NOT_EXISTS (p: present c2))',

    ' (? p: recommendation: medication1)',

    SEM_ALIASES (SEM_ALIAS (",'http://www.example/medicine#')));

    The rule correctly applied in the modules. However, I cannot move to the phase of creation entailment and got errors:

    ORA-29532: Java call terminated by eception Java exception: java.sql.SQLException: parameter IN or OUT to missing index: 1

    ORA-06512: at the 'MDSYS. SDO_SEM_INF_INTERNAL', line 16453

    ORA-06512: at the 'MDSYS. SDO_SEM_INFERENCE', line 302

    ORA-06512: at the 'MDSYS. SDO_SEM_INFERENCE', line 352

    ORA-06512: at the 'MDSYS. RDF_APIS', line 118

    ORA-06512: at line 2

    29532 00000 - "Java call terminated by eception Java exception: %s."

    * Cause: A mistake or a Java exception has been reported and could not be

    solved by Java code.

    * Action: Modify Java code, if this behavior is not expected.

    According to the post primitives(noValue,remove) integrated for user defined rules, it seems that negation is not supported in rules defined by the user. Can you please advice how to implement the negation in the rules defined by the user?  Thank you very much in advance.

    Hong

    Salvation Hong,

    Negation is not supported in rules defined by the user. If you need a work-around, please follow the suggestion in the post you referenced.

    If you use Oracle Database Release 12 c, user-defined inference can certainly manage negation.

    It will be useful,

    Zhe Wu

  • How to use the host operating system

    According to best practices, how he the host operating system should be used. Applications must be installed on the HOS or it must be installed in HOS and GOS be left to access the application in the virtual machine.

    I would like to create two virtualized partitions

    (1) HOS

    (2) GOS 1

    (3) GOS 2

    So I would like to know if any heavy application must be installed in HOS.

    Keep all the stuff on the guest has some advantages

    -You can run it anywhere where you have a VMWare host. This gives you great flexibility.

    -You can create easy backups, no need to set up the entire operating system again and again and install all applications again and again.

    -You can easily freeze the State of operational guest before making any changes (see before).

    -Depending on your environment, you become what some independent business strategies.

    AWo
    VCP / VMware vEXPERT 2009

    = Due to a lack of employees, human beings humans are working here. -Treat it with care, they are rare. =

  • Impossible to use the negative clarity ACR

    After reinstallation of photoshop CS3 and in downloading and installing the ACR 4.3.1 I can no longer use the clarity for negative clarity slider in Camera Raw.  In other words, zero is on the far left, rather than in the Middle, as it used to be.  Also, when I opened previously processed (that is, before reinstalling Photoshop) Raw files I used the settings have not been preserved, ACR indicates that the default values.  Someone knows how to fix this?  I am running Windows 7, camera Olympus E-510. I don't know what version of the cab I was using before.  Thanks for your help,

    If I remember correctly the last ACR for CS3 is 4.6.  Try to upgrade to the latest version of CS3...

  • Problem when using the SDO operations

    Hi all

    I am trying to run spatial SQL queries and I came up with a problem: if I enter the following query, the space operation (in this case SDO_INSIDE) is perfectly executed and the data is returned:
    SELECT SUM(fact.quant) as SUM_quant, instalacao.name as Name
    FROM fact, instalacao, layer_region, emissao
    WHERE fact.instalacao_id = instalacao.instalacao_id AND fact.emissao_id = emissao.emissao_id AND SDO_INSIDE (instalacao.glocal, layer_region.geom)='TRUE' 
    GROUP BY instalacao.instalacao_id, instalacao.name
    ORDER BY instalacao.instalacao_id
    However, if I have introduced another GROUP OF element, like this (where "emissao" has no spatial information and is not used in the space operation):
    SELECT SUM(fact.quant) as SUM_quant, instalacao.name as Name
    FROM fact, instalacao, layer_region, emissao
    WHERE fact.instalacao_id = instalacao.instalacao_id AND fact.emissao_id = emissao.emissao_id AND SDO_INSIDE (instalacao.glocal, layer_region.geom)='TRUE' 
    GROUP BY instalacao.instalacao_id, instalacao.name, emissao.poluente
    ORDER BY instalacao.instalacao_id
    the database apparently 'stuck' in a loop, and when I cancel I get the following error:
    ORA-13268: error obtaining dimension from USER_SDO_GEOM_METADATA
    ORA-06512: at "MDSYS.MD", line 1723
    ORA-06512: at "MDSYS.MDERR", line 8
    ...
    I do not understand what I am doing wrong because the table 'emissao' is not used in any space operation.

    Any ideas please?

    Thanks in advance,
    ~ Ruben

    One of them could probably work, let me know how it goes:

    1)
    SELECT / * + NO_MERGE (v) * / SUM (fact.quant) as SUM_quant, v.name as name
    In fact, emissao,.
    (SELECT / * + (l i) LEADING, USE_NL (l i) INDEX (i instalacao_glocal_idx) * /)
    i.Name, i.instalacao_id
    OF l layer_region, instalacao I
    WHERE (i.glocal, l.geom) SDO_INSIDE = 'TRUE') v
    WHERE fact.instalacao_id = v.instalacao_id
    AND fact.emissao_id = emissao.emissao_id
    GROUP BY v.instalacao_id, v.name, emissao.poluente
    ORDER BY v.instalacao_id

    2)
    SELECT / * + LEADING(e f l) USE_NL (l i) INDEX (i instalacao_glocal_idx) * / SUM (f.quant) as SUM_quant, i.name as name
    In fact e emissao f, layer_region l, instalacao I
    WHERE f.instalacao_id = i.instalacao_id
    AND f.emissao_id = e.emissao_id
    AND SDO_INSIDE (i.glocal, l.geom) = 'TRUE'
    GROUP OF i.instalacao_id, i.name, e.poluente
    ORDER BY i.instalacao_id

    Published by: sravada on July 6, 2009 08:49

  • By using the IN operator with a slider?

    Hi guys, how can I go on the use of the IN operator with a slider?

    For example, I have a slider that is a range to match dates. I want to use these results to compare via an IN operator in a WHERE clause.

    Thanks :)

    You can do this way
    Use EXECUTE IMMEDIATE with into clause.

    InClause := '( your in values ) ';
    
    execute immediate 'select xyz from abc where xyz in '||inClause  into var1 ; 
    

    SS

  • can you make a password reset disk on a computer and use it on another using the same operating system?

    One of my friends has forgotten his password and I was wondering if I could make the password reset disk for him?

    A password reset disk only works on the computer, on which it was made.

    What to do if you forget your Windows password

    If you have forgotten your Windows password and you are on a domain, you must contact your system administrator to reset your password. If you are on a working group (the majority of individuals are on a working group), you can reset your password by using a reset disk of password or by using an administrator account.

    Create a password reset disk:

    http://Windows.Microsoft.com/en-us/Windows7/create-a-password-reset-disk

    Reset your Windows password:
    http://Windows.Microsoft.com/en-us/Windows7/reset-your-Windows-password

    If you forget the administrator password, and you do not have a password reset disk or another administrator account, you will not be able to reset the password. If there is no other user account on the computer, you will not be able to connect to Windows and you will need to re - install Windows.

    What to do if you forget your Windows password:

    http://Windows.Microsoft.com/en-us/Windows7/what-to-do-if-you-forget-your-Windows-password

    Solutions to common problems with logging on Windows:

    http://Windows.Microsoft.com/en-us/Windows7/solutions-to-common-problems-with-logging-on-to-Windows

    Recently changed the password? Use the system restore and restore point from before it was modified:

    http://Windows.Microsoft.com/en-us/Windows7/what-are-the-system-recovery-options-in-Windows-7

    Change your Windows password:

    http://Windows.Microsoft.com/en-us/Windows7/change-your-Windows-password

    Microsoft's strategy concerning lost or forgotten passwords:

    http://support.Microsoft.com/kb/189126

    Keep secure passwords - Microsoft strategy on move the passwords:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-security/keeping-passwords-secure-Microsoft-policy-on/39f56ef0-5d68-41AD-9daa-6e6019c25d37

  • Satellite M100-165 with XP: how to upgrade the BIOS to use the Vista operating system?

    Hello

    I use my laptop with Windows XP and BIOS version 2.80.

    I want to install Windows Vista, but when I download the BIOS of compatible v5.40 Vista it says

    "This Bios is only compatible for portable computers with Windows Vista!

    Do NOT install this Bios if you have Windows XP as operating system running! »

    When you download the version 2.80 compatible XP, I got the same message saying that it was not compatible with Vista.

    Now, should I first install Vista with XP compatible BIOS 2.80 and then install the compatible BIOS 5.40 5.40 or Vista install XP first (no traditional update available, only Windows updates are present) and then install Vista?

    I'm afraid of a bad flash by installing the BIOS compatible Vista in XP.

    Hello

    the best solution would be to do the following:

    1. backup your data and download the drivers for Vista.
    2. make sure that all stored/saved/etc.
    3. install the bios
    4 restart the machine and install Vista
    5. After installing Vista, install drivers and be happy :)

    See you soon

    P.S.: Would appreciate some comments on your success...

  • Using the preloaded operating system of a laptop.

    Can I use a preloaded OS (Windows Vista) to my old laptop (not working-HP Pavilion DV5) to a new laptop. But my other laptop Lenovo thinkpad. Although I m an owner legitimate of the (old) laptop so I should have the right to use on a laptop by closing the old laptop.

    Hello

    No.; You can't use it on another PC.

    Preinstalled OEM licenses are much cheaper to buy than the retail licenses and this is one of the reasons why they may not be transferred

    If the computer/laptop comes with the preinstalled Windows operating system (Dell, HP, Acer, etc.) or is licensed to OEM System Builders, that the product key that came with the computer/laptop is preinstalled OEM license and is not transferable.

    OEM license/product key (systems of operating pre-installed on Dell, HP, etc.) and the license OEM System Builders are related to the first machine it is installed on and dies when machine who dies.

    Only retail Operating System license that you buy and install yourself, are allowed to be transferred to another machine.

    And retail licenses also can be installed on a machine at one time.

    See you soon.

  • How to use a scanjet 2200c with a pc using the Vista operating system?

    Without a positive response, I can't continue to use my scanner because it is not my intention to give up on Vista operating system. At least for the moment. Thank you. Bye bye

    Sorry to say this, but it seems that your product is not supported by Windows Vista. See the document below for more information.

    http://support.HP.com/us-en/document/c01296655

Maybe you are looking for