How to select id when same id has several lines, but I'm looking for ideas lacking a particular value
I have this my_table_c in the table with the values below
SELECT * FROM my_table_c
ID | GROUP_ID | GROUP_VALUE |
---|---|---|
1 | 2 | 1 |
3 | 3 | 2 |
3 | 4 | 1 |
5 | 4 | 1 |
5 | 2 | 1 |
2 | 2 | 2 |
2 | 3 | 2 |
2 | 4 | 1 |
I'm looking for this output where to get only the ID that did not have group_id 2. Besides, I don't want to get the ID where group_id 2 is missing, but the other group IDS are present.
Group_id if 2 is absent, it is my target id.
So with the values indicated in the table above, I expect just ID = 3 or returned as other lines ID 1, 2 and 5 have each where group_id = 2.
Can someone please help with a query to retrieve this result.
Select *.
Of
(
SELECT id, group_id, group_value, count (case when group_id = END 2 then 1) over (partition by id) as cnt
of my_table_c
) where cnt = 0
Tags: Database
Similar Questions
-
which method is called when the screen has lost focus but stays on blackberry?
Hello
I want to know in which method is called when the screen has lost focus, but always visible BlackBerry?
For example, a screen is in the foreground and we disply dialog box so that the screen is visible but not to focus, therefore, at this time that methos called when we close this dialog box?
Please, help me please please
Override the following methods in your class to screen according to your needs
1. when the screen button to the stack
Call
onDisplay() or
onUiEngineAttached(boolean attached) - so attached is true then your screen is at the top of the screen
2. When you are in a backlight and the lcd screen turns off to your state of rest and turns on again when you actively use this form
call
onVisibilityChange(boolean visible) - if visible is set to true, then you get the focus when the lcd display turns
3. when your application moves to the background by clicking the red end button (i.e. without quiting the app, yet yours is active in the background)
call
onExposed() - when your application comes to the foreground of the background or during any type of screen that is in the top get popped
& call
onObscured() - when your application moves to the background, or when a screen pushed above your current screen more
-
Skype has stopped working and windows is looking for a solution.
original title: problem with Skype
I have been using Skype on my laptop for 12 months with no problems, all of a sudden, I get a message that Skype has stopped working and windows is looking for a solution. I checked my firewall, windows updates and downloaded Direct X, as suggested by Skype. I've uninstalled Skype and downloaded again to make sure that the version lasted. IHAVE had also my whole system recharged but it did not work. I am at a loss to know what to do next. Someone at - it ideas
Hello
It is a possibility that a third-party application is causing the conflict with Skype. We can perform the clean boot troubleshooting and check which program is causing the conflict.See the article below for instructions on how to start your computer in a clean boot state.
How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
http://support.Microsoft.com/kb/929135
Note: When the diagnosis is complete do not forget to reset the computer to a normal startup. Follow step 7 in the above article.
I hope this helps.Thank you, and in what concerns:
Shekhar S - Microsoft technical support.Visit our Microsoft answers feedback Forum and let us know what you think.
If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly. -
Help to extract data Clob to a column in a table that has several lines in a table
Help to extract data Clob to a column in a table that has several lines in a table
It works for only the first line
CREATE or REPLACE DIRECTORY XMLDIR AS ' / orabackups';
Grant read, write on DIRECTORY XMLDIR to the public;
() dbms_xslprocessor.clob2file
beef in CLOB,
XMLDIR IN VARCHAR2,
"testfile2.txt" IN VARCHAR2);
DECLARE
buf CLOB.
BEGIN
SELECT H15_DOC
IN buf
OF H15TEST. H15_STAGE
where rownum = 1;
dbms_xslprocessor.clob2file (buf, 'XMLDIR', 'testfile2.txt');
END;
/
-This error code
CREATE or REPLACE DIRECTORY XMLDIR AS ' / orabackups';
Grant read, write on DIRECTORY XMLDIR to the public;
() dbms_xslprocessor.clob2file
XData in CLOB,
XMLDIR IN VARCHAR2,
"testfile2.txt" IN VARCHAR2,
CSID in NUMBER: = 0);
DECLARE
CURSOR xmlmycur IS SELECT H15_DOC
OF H15TEST. H15_STAGE
where rownum = 102140;
l_clob CLOB.
XData CLOB.
BEGIN
DBMS_LOB.CREATETEMPORARY (l_clob, true);
DBMS_LOB.CREATETEMPORARY (xdata, true);
OPEN xmlmycur.
LOOP
SEEK xmlmycur INTO xdata;
dbms_xslprocessor.clob2file (xdata, 'XMLDIR', 'testfile2.txt');
EXIT WHEN xmlmycur % notfound;
END LOOP;
CLOSE Xmlmycur;
END;
/
ORA-21560: 3 argument is null, invalid or out of range
ORA-06512: at "SYS." DBMS_LOB", line 991
ORA-06512: at "XDB". DBMS_XSLPROCESSOR', line 324
ORA-06512: at line 15 level
FYI, it seems that the file being created will exceed 5 gig
Yes, it is a known issue with DBMS_XSLPROCESSOR.clob2file with big files.
Here is a slightly modified version of the code that I posted earlier, fixing WRITE_ERROR except:
DECLARE
v_file utl_file.file_type;
-write a unique to clob
procedure write_clob (p_content in clob) is
v_buffer varchar2 (32767).
V_POSITION pls_integer: = 1;
v_amount pls_integer: = 32767;
Start
loop
Start
DBMS_LOB. Read (p_content, v_amount, v_position, v_buffer);
exception
When no_data_found then exit;
end;
UTL_FILE.put_raw (v_file, utl_raw.cast_to_raw (v_buffer), true);
V_POSITION: = v_position + v_amount;
end loop;
end;
BEGIN
-Open the file
v_file: = utl_file.fopen ('TEST_DIR', 'testfile2.txt', 'wb', 32767);
-loops through the lines
for r in)
Select h15_doc
of h15test.h15_stage
)
loop
write_clob (r.h15_doc);
end loop;
UTL_FILE.fclose (v_file);
END;
/
-
Original title: games
When I start my X Microsoft Flight Simulator (Deluxe Edition), it is running propely for some time (15 to 20 minutes) that it no longer works and gives me a message "Microsoft Flight Simulator has stopped working. Windows is looking for a solution to the problem"and he have me to close the program. (I have Windows 7)
Help, please. :)I just "uninstalled" pack of the accelerator, and it worked fine.
-
Hello
I installed Windows 7 this weekend with the offer of the student. Whenever I tried to run the Windows Media Center it says that it has stopped working and he's looking for solutions. Is it possible that I can download a fix or download the WMC for Windows 7?
My computer (laptop) is a gateway T-6836 64-bit.
original title: WIndows 7 media center has stopped workingI upgraded to Win7 upgrade thestudent and my WMC keeps stopping whenever I try to open it. Is there a way to fix this or if I do a clean install of the operating system?
This is the error I get:
Description
Stopped working
Path of the Application of vulnerabilities: C:\Windows\ehome\ehshell.exeSignature of the problem
Problem event name: CLR20r3
Signature of the problem 01: ehshell.exe
Signature of the problem 02: 6.1.7600.16385
Signature of the problem 03: 4a5bd053
Signature of the problem 04: mcstore
Signature of the problem 05: 6.1.0.0
Signature of the 06 problem: 4a5bda1e
Signature problem 07: 1 a 1
Signature of the 08:146 problem
Signature of the problem 09: System.InvalidOperationException
OS version: 6.1.7600.2.0.0.768.3
Locale ID: 1033Additional information about the problem
Bucket ID: 655435415When you see failing requests like this, even if you get it to work, you never know what's going to arise later. I suggest to use the feature of easy to backup transfer all your data and do a clean install.
-
How to make the lines selectable listfield, when the list has been added to a dialog box
Hello
I added a listfield to a dialog box. Now I want that when I click on a line any of this list field, I should get a menu (i.e. something should be available for me so that I can perform an action on the selected line). But when I click on the line, nothing happens.
Help, please
Create your own screen, its less than the actual display dimensions to make it look like a pop-up screen. When a line is selected/clicked, call makeMenu.
-
How to select from multiple cuts manual header and line in SO?
Hello!
I have several manual discounts header and lines in Advanced Pricing. How to select in orders? I read somewhere that to apply a discount, just go to the line and press the "Discount", but I couldn't find this button anywhere. I remember before I am just pressing the lov (...) in the unit selling price and I can choose manual reduction (if I'm not mistaken), but now, when I pressed it, it only apply the first discount manual I have (I have defined it 2 manual sheds). Can someone help me with this? Is the mentioned "Discount" button was the lov (...) in the unit selling price?
Thank you.
Use the button Actions to "The sight adjustments." That should allow you to see and apply modifiers are qualified to order.
-
I have a 64-bit Windows 8.1 PC and use Internet Explorer 11 or Windows Chrome. Can someone talk to me through selection, copy and paste a PDF document in general? As well as my occasional to translate Spanish Pdf document need, I also like to know how to select, copy and paste into Notepad or WordPad, an e-mail or a document. I tried everything I can think but cannot make it work.
Just FYI: If you have PDF documents online (which contain 'real text' of course), you can also use Google Translate to translate the entire document. Click 'translate a document' under the entry field.
-
How can I activate the location in the browser so that I can look for things nearby?
I want to look for things of my position, but it keeps telling me that the browser will not allow it and I cannot find the place where to him allow.
- Open the page that you have difficulties with
- Open the Firefox menu
- Select the page
- Select change site settings
- change the preference "Share location" to match your needs.
-
How to select it when execute_query do not work
Hello.In Oracle 11g form, is there a way I could debug or check my block request?
I have a stacked canvas, (in a table of contents), when I click on a button, I'm doing a show_view ('my_stacked_canvas'). Stacked canvas is correctly shown, but that I had coded in the (a time-new_block_instance), a "EXECUTE_QUERY", (and made a go_block, go_item before), I get this error: FRM-40505 UNABLE to EXECUTE QUERY.
I don't know if I have because my Eastern bloc (database type) and I am viewing only 4 columns (from my 6 in my table). The table has records when I run in PL - SQL Developer (SELECT * FROM my_table)...
Y at - it some thing like (display_error) when you perform an insert, I mean, I would select Forms internal runs, I'm a little lost.
Thank you
After getting the error FRM - 40505 UNABLE to RUN QUERY.
Press Ctrl + Shift + E keyboard and post what you get?
Hamid
-
Hello
My screen I have the list of data and at the end I buttons when I click the button, the data should remain and should be deleted. My screen I have a VerticalFieldManager and given I have place in HorizontalFieldManager and I added the button horizontalFieldmanager.even I place in HorizontalFieldmanager... to be more detailed, I see: -.class Page extends Screen { LabelField name,namevalue,Phone,phoneNumber; ButtonField btn; Page() { super(new VerticalFieldManager(),NO_VERTICAL_SCROLL); VerticalFieldManager vfm_Data = new VerticalFieldManager(Field.USE_ALL_WIDTH | VerticalFieldManager.VERTICAL_SCROLL | VerticalFieldManager.VERTICAL_SCROLLBAR); HorizontalFieldManager hfm_name = new HorizontalFieldManager(); name = new LabelField("Name : "); hfm_name.add(name); namevalue = new LabelField("Jackey"); hfm_name(namevalue); vfm_Data.add(hfm_name); HorizontalFieldManager hfm_phone = new HorizontalFieldManager(); Phone = new LabelField("Contact Number : "); hfm_phone.add(name); phoneNumbere = new LabelField("123456"); hfm_phone(phoneNumber); vfm_Data.add(hfm_phone); //Like above HorizontalFieldManager i have 10 more say HorizontalFieldManager with Data and value and i have added all the HorizontalField Manager to VericalFieldManager vfm_Data....and i have a button in the end : HorizontalFieldManager hfm_button= new HorizontalFieldManager(); btn = new ButtonField("Accepted"); hfm_button.add(btn); vfm_Data.add(hfm_button); //and at i add the verticalField manager. add(vfm_data);
My requirement is now when I click on the button accept I want to delete field button that I do a delete (hfm_button); , But it says an error "Attempt to delete a field that does not belong to the Manager."
Can you please tell me how to delete the field button when I click on the button accept...
First your VFM is named vfm_Data, and at the end your constructor you add a (nonexistent) value to the screen named vfm_data.
Have you tried vfm_Data.delete (hfm_button)?
-
How will I know when S1 yoga has been full battery when it is off?
Is there a way to discover this WITHOUT turning on the computer?
There is no LED indicator, so you can't really tell.
-
(Int Exp 8) file is automatically downloaded, but I don't want to install it. How can I remove the download?
Hello Fokker99,
Welcome to the Microsoft Answers Forum!
I understand that Internet Explorer 8 is automatically downloaded to your computer from Windows update and that you want to remove and want to return to Internet Explorer 7.
Internet Explorer 8 is an updated version of the browser that comes with many additional features. Here is a link that will give you information about the features available in Internet Explorer 8:
http://www.Microsoft.com/Windows/Internet-Explorer/features/faster.aspxIt is recommended that you install for your browser up to date.
However, if you still don't want to install this, there 2 ways you can try to delete the downloaded update.
All updated the download file would be saved in the folder "software Distrubution. Here are the steps to delete the downloaded update file:
1. stop the automatic updates service:
Start > Search > services.msc (enter) > [OK]
Double-click Automatic Updates > click Stop
(Stopping the service will take a moment)2 remove the contents of the download folder:
Start > Search > (enter) %windir%\SoftwareDistribution > [OK]
Open the download folder and delete its contents
Close the window.3. go to the Windows Update Web site > select CUSTOM and allow complete analysis > uncheck / deselect, update the driver, and then 'hide' ("don't show me this update").
4. start the automatic updates service:
Start > run > services.msc (enter) > [OK]
Double-click Automatic Updates > click Start
(Starting the service will take a moment)The second method would be to hide updates.
Open Control Panel
Open Security Center
Click Automatic updates
On the screen that shows set to the point in downloading, but let me choose when it is installed.
Press on apply or OK and exitI hope this information helps.
Thank you.
Irfan H, Engineer Support Microsoft Answers. Visit our Microsoft answers feedback Forum and let us know what you think.
-
How to select rows randomly by the percentage of lines by specific column
I need to select exactly 20% of lines by Department randomly. Ex, table composed of 50 records for the Sales Department, 60 discs for the Department of human resources. I need to get 10 records of the Department sales and 12 records of Department of human resources. but records should be chosen at random. How to get out of it? Thanks in advance.
Select
DEPTNO
count (*) NTC
WCP
Deptno group
DEPTNO CNT
30 6
20 5
3 of 10
Choose 50% in every department at random
expected (round up to the next integer)
DEPTNO CNT
30 3
20 3
2 of 10
Select * from)
Select
EmpNo
deptno
, count (*) during the (partition deptno) cnt
row_number() over (partition by deptno arrested by dbms_random.random) rn
WCP
)
where rn<=>=>
order by deptno
EMPNO DEPTNO CNT RN
7782 10 3 1
7934 10 3 2
7566 20 5 1
7876 20 5 2
7902 20 5 3
7900 30 6 1
7521 30 6 2
7654 30 6 3
Maybe you are looking for
-
Why disable common features and hide completely to use a new version of firefox
When a new version of Firefox comes out the end, all to often when there new features or a programmer has a different idea of what they like from the previous version, the features are enabled by default and things are rearranged without any choice b
-
Demo of Grove Carolina shows FCP
Editing as fast as you can think https://Vimeo.com/158641571
-
HelloWill have a menu of bios to access the problem. The laptop requires password administration. After entering the password three times, a dialog box appears "system disabled" [51021607]
-
How to: same excel file, same computer, different user accounts.
I'm trying to access a single Excel file from the accounts of different users on the same computer. I tried to share the Excel file, no luck. I studied with a group residential, but which seems to be for different computers on a network home. It c
-
Hello! I recently bought this laptop with the intention to replace the hard drive (1 TB HDD 120 GB SSD), as well as upgrading the ram from 8 GB to 16 GB. The problem is that I have improved these things before you start for the first time. And now it