Issue using not equal to operator
Oracle: 10.2g
Sample table data:
-- Table psn
type_number name category
1 carl 5
1 carl 5
1 carl 5
2 mike 5
2 mike 5
3 bob 5
3 bob 5
3 bob 5
4 greg 5
5 chris 5
6 charles 5
6 charles 5
--Table series
type_number year cat_id
1 1999 2
1 2000 2
1 2001 2
2 2001 2
2 2002 2
4 1995 2
5 2008 1
6 2007 2
6 2008 1
Query
select s.type_number, s.name
from inv.psn s
select distinct temp.type_number, temp.name
from inv.series f,
inv.psn s,
where s.type_id = f.type_id
and s.category = 5
and f.cat_id = 2
) temp
where s.category = 5
and temp.type_numebr != s.type_number
Desired result set
type_number name
3 bob
Bob and Chris:
SQL> with psn as (
2 select 1 type_number, 'carl' name, 5 category from dual union all
3 select 1, 'carl', 5 from dual union all
4 select 1, 'carl', 5 from dual union all
5 select 1, 'carl', 5 from dual union all
6 select 2, 'mike', 5 from dual union all
7 select 2, 'mike', 5 from dual union all
8 select 3, 'bob', 5 from dual union all
9 select 3, 'bob', 5 from dual union all
10 select 3, 'bob', 5 from dual union all
11 select 4, 'greg', 5 from dual union all
12 select 5, 'chris', 5 from dual union all
13 select 6, 'charles', 5 from dual union all
14 select 6, 'charles', 5 from dual),
15 series as (
16 select 1 type_number, 1999 year, 2 cat_id from dual union
17 select 1, 1999, 2 from dual union all
18 select 1, 2000, 2 from dual union all
19 select 1, 2001, 2 from dual union all
20 select 2, 2001, 2 from dual union all
21 select 2, 2002, 2 from dual union all
22 select 4,1995, 2 from dual union all
23 select 5,2008, 1 from dual union all
24 select 6,2007, 2 from dual union all
25 select 6,2008, 1 from dual
26 )
27 select distinct s.type_number, s.name
28 from psn s
29 where (s.type_number, s.name) not in
30 (select s.type_number, s.name
31 from psn s, series f
32 where s.type_number = f.type_number
33 and s.category = 5
34 and f.cat_id = 2
35 );
TYPE_NUMBER NAME
3 bob
5 chrisMax
http://oracleitalia.wordpress.com
Similar Messages
-
Report Builder very slow when using NOt Equal
When creating dataset I have to exclude some customers and use Not Equal option out of filters option. Everuthing is getting extremely slow.
How to find the way to solve the problem - exclude the player and have decent performance. The reports for end-users and they are limited to drag and drop and not going to learn MDX.
ThanksHi srussky,
According to your description, you used not equal in query of dataset and the report runs slow, right?
When we use =, it reduces the join operation to one single matching row from each table. When we use not equal to, it massively increased the number of pairings if 99.99 % of the rows are matched.
To troubleshoot the problem, please refer to the following steps:
Consider replacing the not equal operator with equals (=) or inequaluity operators (>,>=,<,<=) if possible.
Using Stored Procedures in dataset, then the query will be executed in database engine.
Reduce the number of member siblings in the level that is being referenced in the MDX query.
Reduce the number of member properties of the referenced member and its member siblings.
Use Drillthrough filters in the MDX query to limit the number of rows that are returned by the MDX query.
Use the XML/A Provider after warming the client cache of the provider.
Use virtual dimensions.
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
If you have any feedback on our support, please click
here.
Wendy Fu
TechNet Community Support -
Issue "Could not complete requested operation"
Hi,
what can I do when I get the issue "Could not complete requested operation".
OS is Mac OS X
Application: Illustrator CS2
I has already removed and new installed the application. I has start the application on another user account from Mac OS X and I has re-created the preference files.
What Can I do?
Kind regardsDid it work on the other user account? I'd recommend the standard troubleshooting techniques:
1. Try another as another user. (This you did).
2. Fixing permissions.
3. Re-install.
4. Try removing the user and system cache's with Applejack or Onyx.
...Mike -
Is not equal to operator not working properly in obiee 11g
Hi ,
I have 5 members in a dimesion ENTITY.gen5 (A,B,C,D,E) .
nOW , I am using a *"is equal to "* operator in that ,
ENTITY.gen5 = A;B .
Which results in a strange error while running the report :
Socket communication error : was attempted on somthing which is not socket .
or sometimes ,
Socket communication error : Oracle BI server is not currently running .
So , I tried with giving "is not equal to" i.e . ENTITY.gen5 != C;D;E .
Then , I am getting A,B,C . C is not desired here .
FYI , I have renamed ENTITY.gen5 member names in essbase once and after refreshing I tried the above .
OBIEE version : 11.1.1.6
essbase version : 11.1.2.1
Thanks in advanceIn EM, go to Weblogic Domain, right click on bifoundation_domain and on the Security menu choose Application Policies.
Set Application Stripe to obi and click the blue arrow search button.
Highlight BIConsumer and click Edit.
Under Permissions locate Resource Name oracle.bi.publisher.scheduleReport. Highlight this and click Delete...
Click OK (top right corner).
Now log your user out of OBIEE and back in again, and the option should have disappeared from their New menu. -
In KQL my query is like this,
refinablestring05<>9c460541-5979-44ec-b0ab-63d1823f922f
but looks like operator <> not working. It is not throwing error at all and always shows result.
Any one can help me out for this?use NOT operator so it would be "NOT refinablestring:something"
kashif -
SQL query using not equal to or not exists
Hi All;
From the below table , i need to display the client name
where output is not equal to Pre Start, BA
but display client with output only with SOSP
so only in the below example DEF client name will be displayed
below is my query
select C.new_applicationformid,
C.clientname ,
C.new_noofappointments
From (
Select A.new_applicationformid ,A.new_programmecontractidname,Count(1) As Cnt
from FilteredNew_applicationform as a
full outer join filteredNew_Evidence as aa on (a.new_applicationformid = aa.new_relatedapplicationid)
Group By A.new_applicationformid ,A.new_programmecontractidname
Having Count(1) >= 1) A
Inner Join filteredNew_Evidence AA on a.new_applicationformid = aa.new_relatedapplicationid
Inner Join FilteredNew_applicationform C on C.new_applicationformid = aa.new_relatedapplicationid
Where ((aa.output in ('SOSP'))
and (aa.output not in ('Pre Start','BA') )
Any help much appreciated
Thanks
Pradnya07See examples written by Joe Celko to help you out
CREATE TABLE PilotSkills
(pilot CHAR(15) NOT NULL,
plane CHAR(15) NOT NULL,
PRIMARY KEY (pilot, plane));
PilotSkills
pilot plane
=========================
'Celko' 'Piper Cub'
'Higgins' 'B-52 Bomber'
'Higgins' 'F-14 Fighter'
'Higgins' 'Piper Cub'
'Jones' 'B-52 Bomber'
'Jones' 'F-14 Fighter'
'Smith' 'B-1 Bomber'
'Smith' 'B-52 Bomber'
'Smith' 'F-14 Fighter'
'Wilson' 'B-1 Bomber'
'Wilson' 'B-52 Bomber'
'Wilson' 'F-14 Fighter'
'Wilson' 'F-17 Fighter'
CREATE TABLE Hangar
(plane CHAR(15) NOT NULL PRIMARY KEY);
Hangar
plane
=============
'B-1 Bomber'
'B-52 Bomber'
'F-14 Fighter'
PilotSkills DIVIDED BY Hangar
pilot
=============================
'Smith'
'Wilson'
SELECT DISTINCT pilot
FROM PilotSkills AS PS1
WHERE NOT EXISTS
(SELECT *
FROM Hangar
WHERE NOT EXISTS
(SELECT *
FROM PilotSkills AS PS2
WHERE (PS1.pilot = PS2.pilot)
AND (PS2.plane = Hangar.plane)));
SELECT PS1.pilot
FROM PilotSkills AS PS1, Hangar AS H1
WHERE PS1.plane = H1.plane
GROUP BY PS1.pilot
HAVING COUNT(PS1.plane) = (SELECT COUNT(plane) FROM Hangar);
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Combining tables with multi-column keys using NOT EQUALS
Hi, I am trying to perform a query in SQL to find a particular person who has a value for an attribute that nobody else has, so far my query looks like this:
SELECT CS1.*
FROM COMPANYSTAFF CS1
WHERE NOT EXISTS
(SELECT * FROM COMPANYSTAFF CS2 WHERE CS1.COMPSTAFFID != CS2.COMPSTAFFID AND CS1.MAININTEREST = CS2.MAININTEREST)
GO
The problem is that the table represents a weak entity, so the primary key is the name of the company the person works for combined with his ID. I want to change the not equals part of the above query so that I can say CS1-CompanyName and ID is not Equal to CS2-Company Name and ID rather than just both seperately.
In order to clarify what probably sounds really stupid I would really like the ability to say something like:
(CS1.COMPNAME, CS1.COMPSTAFFID) != (CS2.COMPNAME, CS2.COMPSTAFFID)
Does anyone know if this is possible or if there is another way around it?
Thanks
DaveSo ?
SELECT CS1.*
FROM COMPANYSTAFF CS1
WHERE NOT EXISTS
(SELECT * FROM COMPANYSTAFF CS2 WHERE (CS1.COMPSTAFFID != CS2.COMPSTAFFID OR CS1.COMPNAME != CS2.COMPNAME)
AND CS1.MAININTEREST = CS2.MAININTEREST)GO ?
Is is MS SQL ? :-)
Regards
Dmytro -
How to use not equal to in read
Hi experts ,
I have a read statement in which i am reading status internal table.
read table it_jest into wa_jest where inact ne 'X'
this inact ne 'X' is giving me an syntax error
i tried
inact eq ''
inact eq ' '
inact eq space'
but nthng worked
please guide me how i can write this code.Hi Abhinav Shahi,
I think You can use only = in READ statement.. can't use NE with READ
read table it_jest into wa_jest with key inact = ' '.
Change Where to with key..
also try with condition below
inact is initial
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya -
Add search operator 'NE' (not equal to)
Is it possible to add 'NE' (not equal to) operator to the activity search page. If yes, please let me know how.Right now it has only 'is' operator.
Hi,
I had the time to try it myself today.
Open TX: SM34
There use view cluster CRMVC_DQ
Selecte the entry: KompName = BT ; DQuery Objectname = BTQAct
Click on the lower level on the left, should be named like "Exceptions per attribute"
Select the entry: KompName = BT ; DQuery Objectname = BTQAct ; Attribute Name = STATUS_COMMON
Mark search operator "NE" and save.
Now you are able to do not equal searches for the attribute.
I have tried this in the WebClient and in the BOL Browser. It works.
cheers Carsten -
Hello Experts -
I need to put this condition in transformation in BODS table1.col 1 Not Equal to table2.col2 .
I am not able to find NOT EQUAL TO clause in BODS. I have used != , But not working.
However equal to (=) is working fine.
Any suggestion how I can use not equal to ? (I want it in Where Tab)
Thanks
RRohan, please pull/drag your columns into where clause. do not simply write them. and for your condition chk it with " <> " .
hth
thx
deep -
Could not complete requested operation
Hi, what can I do when I get the issue "Could not complete requested operation". I can't open or work with files anymore.
OS is Mac OS X Application: Illustrator CS2
I has already removed and new installed the application.
Please Help(((greenyy,
Did you run the Cleaner Tool betwen un and re?
http://www.adobe.com/support/contact/cscleanertool.html -
Rounding off Issue (Net Value not equal to Net Price * quantity)
Dear Gurus,
Here is an interesting issue.The default calculation done in the pricing procedure is two decimal places.Now we consider a real scneario,consider the net value of 324 quantities of an item calculated is 36,049.86 .When it is divided by quantity the resulting value of net price is 111.265 but the system shows 111.27 by rounding it off.
Now here comes the problem,my client needs the rate to be shown on the order script to be two decimal places and the net value should be equal quantity * net price.So if we apply this,
324 * 111.27 = 36051.48
But the net value calculated by the system is 36,049.86.So it can be consluded that:
"Quantity * Net Price Shown is not Equal to Net Value calculated by the System"
Need an urgent resolution,project is stuck on this
Regards,
Sam Ahmed
Edited by: Lakshmipathi on Nov 3, 2011 12:14 PM
Please dont add URGENT in subject or in your postHere is the pricing procedure,
We start with the amount condition types
Unit Price Units Condition Value
ZMRP MRP 1,700.00 10 PAC 55,080.00
ZTRP Trade Price 1,445.00 10 PAC 46,818.00
ZDPR Dist. Price 1,445.00 10 PAC 46,818.00 (GL)
Using Trade Price we apply the product discount of 23%
ZPRD Product Discount 23.000- % 10,768.14-
Then we send discount amount to the gl by using condition type ZDIS
ZDIS Discount Value 100.000- % 10,768.14- (GL)
tHE RESULTING NET VALUE IS 36,049.86 as 46818.00 - 10,768.14
Order Item value 111.27 1 PAC 36,049.86
And the Net Price is 111.27 -
Hi,
I am using your software: CS6 InDesign Suiteon a PC using a Windows 7 operating system.
Due to eyesight issues, I need to have the menu bars of programs in easy-to-read font and picture size. Specifically, the menu bar across the top (File, Edit, View, etc.), and the menu bar on the left side with the graphic depiction of options.
In earlier versions of Windows (e.g. XP), whenever I changed the screen resolution on my computer to a lesser resolution in order to show the link icons on my desktop in a larger, more readable size, all the software programs, including yours, appeared on my screen with the menu bars in the larger font size that I needed.
However, in Windows 7, this is not the case. Even though I have selected the lowest resolution, making the icons on my desktop extremely large, I cannot read the options across the top menu bar of your program, nor the pull-down menu items that they contain. I cannot see the graphic depictions of options on the left side of the screen. They are all too small. How can I make your program increase the size?CS6 is not high-DPI compatible/ enabled and that can't be changed. If you cannot6 make it work with your operating system means, then short of joining Creative Cloud and using newer versions there is nothing you can do.
Mylenium -
I am using CS6 InDesign on a PC using a Windows 7 operating system.
Due to eyesight issues, I need to have the menu bars of programs in easy-to-read font and picture size. Specifically, the menu bar across the top (File, Edit, View, etc.), and the menu bar on the left side with the graphic depiction of options.
In earlier versions of Windows (e.g. XP), whenever I changed the screen resolution on my computer to a lesser resolution in order to show the link icons on my desktop in a larger, more readable size, all the software programs, including yours, appeared on my screen with the menu bars in the larger font size that I needed.
However, in Windows 7, this is not the case. Even though I have selected the lowest resolution, making the icons on my desktop extremely large, I cannot read the options across the top menu bar of your program, nor the pull-down menu items that they contain. I cannot see the graphic depictions of options on the left side of the screen. They are all too small. How can I make your program increase the size?NO way.
Mylenium -
Multiple selection in Query Panel. Operator Does not equal generates error.
Hi,
I'm using Jdeveloper 11.1.1.4 and creating Oracle Fusion Web Application with ADF Business Components.
I want to use multiple selection on LOV in ADF Query Panel with Table, but I get the following error
when I use operator "Does not equal":
Error: Unsupported model type.
SelectMany does not support a model of type class java.lang.Integer.
A simple example:
Schema: HR
Generate default Business Components for tables Departments and Employees.
Model:
Create List of Values for EmployeesView(DepartmentId)
List Data Source: DepartmentsView1
List Attribute: DepartmentId
Display Attributes: DepartmentName (UI Hints)
Create View Criteria EmployeesByDepartmentVC for EmployeesView
Criteria Item:
Attribute: DepartmentId
Operator: Equals
Operand: Literal
Select "Support Multiple Value Selection" (UI Hints)
ViewController:
Create blank JSF Page: showEmployees.jspx
Drag EmployeesByDepartmentVC from Data Controls to showEmployees.jspx
Create Query=>ADF Query Panel with Table
Run application.
Press Advanced button.
Select operator "Does not equal" and department names "Administration;Marketing"
Press Search
Error: Unsupported model type.
SelectMany does not support a model of type class java.lang.Integer.
Note: it works fine with operator "Equals"
Best,
Kees.Hi,
I was reading:
http://www.oracle.com/technetwork/developer-tools/jdev/jdev-11gr2-nf-404365.html#bugs_fixed_in_11.1.2.2.0
Bugs Fixed in 11.1.2.2.0
Bug.No. 13508184
unsupported model type error thrown for multi select view criteria
I have tested the use case described in this thread with JDeveloper 11.1.2.2.0 but I still get the same error.
when I use operator "Does not equal":
Error: Unsupported model type.
SelectMany does not support a model of type class java.lang.Integer.
Is there anybody who can tell me more about this bug fix?
Thanks,
Kees.
Maybe you are looking for
-
My iPod Shuffle (2nd Gen) needs a reset. iTunes won't recognize it and gives me: "iTunes cannot recognize this iPod at this time. You must restore the iPod with iPod reset utility before it can be used with iTunes." So I downloaded the installer for
-
Not able to use keyboard in OK prompt
Hi Experts, how are you doing. i am facing one problem with my machine. i am not able to use keyboard at OK prompt. when i login into the machine with username and passwd i am able to use my keyboard. now i just want to install solaris 10 on my machi
-
How to define an new New transaction type in SRM Environment?
Hi All, There is a situation where in I have to add anew transaction type and link it to the existing process. If I am going to SPRO->SRM->SRM Server -> Cross appl.Basic Setting -> Define transaction type It gives me an un editable screen. My questio
-
I followed the instructions from the CoolSolutions article http://www.novell.com/coolsolutions/tip/8019.html and had Radius working fine. I am implementing a new server and using ConsoleOne I am trying to edit the DAS object to allow a new client con
-
Virt-install: error: no such option: --hvm
I have not been able to create a Virtual machine using Oracle VM manager. It fails with the following error. Get VNC Port: attaindevv11 failed:<Exception: failed:<Exception: xm list 17_attaindevv11=>Error: Domain '17_attaindevv11' does not exist. >>