How to select records in the duplicate and two copies lines no rows
HelloI'm working on Oracle with the following details
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64 bit Production
With partitioning, OLAP and Data Mining options
I need help to choose one of the duplicate records and a few duplicate not based on condition. I wrote the script that only gives me one of the record list duplicate, but I'm confused how select duplicate duplicates.
My condition is to select all records where TARGET TABLE AND TARGET_COLUMN IS NOT NULL. I need to select unique records of this this condition based on these attributes only Anwar. _
_ From the SOURCE
TARGET_TABLE TARGET_COLUMN SRC_COLUMN
-----
--------------------
-----
SRC_EXTERNAL SUBJECT_AREA SUBJECT_AREA
FISCAL_YEAR FISCAL_YEAR SRC_EXTERNAL
PARTY_ID_ORG PARTY_ALT_ID PARTY_ID
PARTY_ID_NEW PARTY_ALT_ID PARTY_ID
ESTABLISHMENT_NBR_ORG W2_EMPLOYER ESTABLISHMENT_NBR
ESTABLISHMENT_NBR_NEW W2_EMPLOYER ESTABLISHMENT_NBR
EMPLOYMENT_CODE_ORG W2_EMPLOYER EMPLOYMENT_CODE
EMPLOYMENT_CODE_NEW W2_EMPLOYER EMPLOYMENT_CODE
SICK_PAY_IND_ORG W2_EMPLOYER SICK_PAY_IND
SICK_PAY_IND_NEW W2_EMPLOYER SICK_PAY_IND
AGENT_IND_CODE
AGENT_FEIN
EMPLOYER_NAME
EMPLOYER_ADDRESS
CLIENT_ADDRESS
CITY
STATE
ZIP
_ REQUIRED TARGET
TARGET_TABLE TARGET_COLUMN SRC_COLUMN
-----
--------------------
-----
SICK_PAY_IND_NEW W2_EMPLOYER SICK_PAY_IND
EMPLOYMENT_CODE_NEW W2_EMPLOYER EMPLOYMENT_CODE
ESTABLISHMENT_NBR_NEW W2_EMPLOYER ESTABLISHMENT_NBR
PARTY_ID_NEW PARTY_ALT_ID PARTY_ID
SRC_EXTERNAL SUBJECT_AREA SUBJECT_AREA
FISCAL_YEAR FISCAL_YEAR SRC_EXTERNAL
MY QUERY_ +.
SELECT NOMFICHIER_SRC, TARGET_TABLE, SRC_COLUMN, TARGET_COLUMN
OF ITS_STAGE. STG_EDW_METADATA X
WHERE TARGET_TABLE IS NOT NULL AND TARGET_COLUMN IS NOT NULL
AND ROWID & gt; (SELECT MIN (ROWID)
OF ITS_STAGE. STG_EDW_METADATA Y
WHERE TARGET_TABLE IS NOT NULL AND TARGET_COLUMN IS NOT NULL
AND Y.TARGET_TABLE = X.TARGET_TABLE
AND Y.TARGET_COLUMN = X.TARGET_COLUMN)
MY RESULTS+ _
TARGET_TABLE TARGET_COLUMN SRC_COLUMN
-----
--------------------
-----
SICK_PAY_IND_NEW W2_EMPLOYER SICK_PAY_IND
EMPLOYMENT_CODE_NEW W2_EMPLOYER EMPLOYMENT_CODE
ESTABLISHMENT_NBR_NEW W2_EMPLOYER ESTABLISHMENT_NBR
PARTY_ID_NEW PARTY_ALT_ID PARTY_ID
Can some Oracle expert please help me solve this problem.
Thanks in advance
Rajesh
Published by: user532468 on 15 Sep, 2008 14:32
With the help of
AND ROWID * > * (SELECT MIN (ROWID)
you select duplicates. Just change of
AND ROWID * = * (SELECT MIN (ROWID)
This will select everyring but duplicates. However, it is not effective. All you need is:
SELECT SRC_FILENAME,SRC_COLUMN,TARGET_TABLE, TARGET_COLUMN
FROM (SELECT DISTINCT * FROM ITS_STAGE.STG_EDW_METADATA X
WHERE TARGET_TABLE IS NOT NULL AND TARGET_COLUMN IS NOT NULL)
SY.
Tags: Database
Similar Questions
-
How to select one of the VMRC and WebMKS of vRealize of automation for the end user
As you know, there are two Protocol to use the remote console to the configured virtual machine of vRealize Automation. I know how to select one of the VMRC and WebMKS on vCenter via Web Client, but I'm not sure whether vRealize Automation can select one of the VMRC and WebMKS. Is there anyone who knows about it?
You can set in the law.
Grant
-
How to delete records of name of datagrid, while I'm by selecting one of the check and delete
Hi friends,
I work in flex 4 mxml with action script web application... i use a data grid and a delete button outside the grid.
I have two records in the same name in the grid, when I click on a record in the grid and click on ways to remove this time, both records will delete this grid
including the record with the same name...
How to do this?
any code suggesssion or helpful code snippets...
Thanks in advance,
B.Venkatesan.
Hello
First, get the length of the data grid.
Assume that your datagrid id db and you want to delete the line that have the same name...
first get the line selected and the name of the line selected.
is the chosen name supoose
var index: int = db.selectedindex;
var selname:string = bd.dataprovide.getItemAt (index) .name; (name id column datafield).
now, you research the name chosen for the same lines in the DataGrid.
var totallen: int = (db.dataprovider) .length;
for (var i: int = 0; i<>
{
var checkduplicate:string is bd.dataprovide.getItemAt (i) .name;.
if(checkduplicate==selname)
{
db.dataProvider.removeItemAt (i);
}
}
This will clear all the line who are with the same name with the name of the selected line.
---------------------------------------------------------------------- ----------------------------
Gallot Hiroji | [email protected] | www.isacglobal.com
---------------------------------------------------------------------- ----------------------------
-
Hi friends,
I do flex mxml 4 web application with as3, I am struck upward in the next concept, shar your suggession thereon.
I use datagrid with 3 columns NUMBER, NAME, AMOUNT. an and a box Add button and a delete button.
I have two records in the same name in the grid, when I click on a record in the grid and click ADD means of button this year, both AMOUNT WILL ADD records that record with the same name and give this value in a text box.
How to do this?
useful suggesssion or sample modal
Thanks in advance,
B.Venkatesan.
Hello
var totalsum:int = 0;
var index: int = db.selectedindex;
var selname:string = bd.dataprovide.getItemAt (index) .name;
var totallen: int = (db.dataprovider) .length;
for (var i: int = 0; i<>
{
var checkduplicate:string is bd.dataprovide.getItemAt (i) .name;.
if(checkduplicate==selname)
{
totalSum += bd.dataprovide.getItemAt (i). AMOUNT;
}
}
textfield_id. Text = totalSum
---------------------------------------------------------------------- ----------------------------
Gallot Hiroji | [email protected] | www.isacglobal.com
---------------------------------------------------------------------- ----------------------------
-
In the grid discovers how to select an image, a jump and select several images following the a l ignored without also selecting the previous image, that you have ignored as well. This is possible in opening
Probably easier to select all the with shift-click and then deselect (ctrl-click), one that you don't want.
-
After you create a new playlist in iTunes, every song has the cover of the album and no box on the left side. How can I remove from the work and recover the box? TIA
You can change the appearance of a selection by clicking on "reading list" in the upper right of the iTunes window. The desired view is probably "tracks"
-
How can I disable all the pings and tones and notes and sounds of the HP Officejetpro 8610?
I can't tolerate the noise. How can I disable all the pings and tones and notes and sounds of the HP Officejetpro 8610? This 'thing' emits a beep and the pings and plays music.
Thank you
Sam
Hi Sam,
On the front panel of the printer, scrool main screen to the right and the clock setting icon.
Then click Printer Setup, and then select sound effects Volume.
Select and confirm, that should disable all these sounds.
Shlomi
-
Once again! When I play scrabble I want to be able to go to the dictionary and two letters of words when I play the game - these are blocked much to my aggravation! How to stop blocking?
Hmm, this site is this game on?
Is the part of the dictionary of the same page, or a separate page/add on in Firefox, or a completely separate program?
-
My iPhone does not to import! How can I appear in the Photos and delete those that are already imported?
My iPad appears fine with an option to import the 'new' photos and then delete them once they are imported. However my iPhone appears not at all on the pictures. Although most is already imported via the cloud, some are not, but more importantly, I would remove at least half of 30 000 photos that are taking place on my phone and a "clear items after button import" would be nice right now! I tried to turn off photo stream on my phone, but it still does not appear in the application.
What can I do?
Thank you!
If you use iCloud photo library you cannot delete pictures after the import (or) - deletions on any device will be on all devices - if storage is a question about a device set to use optimized photos
LN
-
How can I actually email the scan, and how can I check this virus?
SENDING A SCAN
I am currently using Internet Explorer 8 and want to send someone using Internet Explorer 8
How do I actually email the scan AND how can I check this virus
Internet Explorer is a Web browser, not an e-mail program... To send messages, you need an e-mail account and the recipient needs an e-mail account. You need to know your email address and you must know the e-mail address of the recipient.Download and run the free versions of these two programs to check the software malicious & software unwanted spies.Malwarebytes Anti-Malware
http://www.Malwarebytes.org/products/malwarebytes_free -
How to play audio through the headphones and computer speakers, at the same time.
Hey I just need to know how to play sounds through the headphones and speakers. Help
Depends on your audio device.
If its edge, while normally when you plug the headset switch will cut off the speakers.
If you have a USB or Firewire pro device you can listen to your headphones as the signal played through your speakers.
See you soon,.
Jerry -
The bkf files: How can I now open the file and restore my files under windows 7?
I did a backup on my old computer using the backup program that is under system tools in windows xp. How can I now open the file and restore my files under windows 7?
-
I have a HARD disk with two partitions and two copies of Win7 but at the start, I have the black and white screen asking me only one to choose. How can I rename the Windows 7 and Windows 7 Test to start in one I want right here?
I have a HARD disk with two partitions and two copies of Win7 but at the start, I have the black and white screen asking me only one to choose. How can I rename the Windows 7 and Windows 7 Test to start in one I want right here?
Use BCDEDIT to SET the description that you are wanting to "Rename" and also to choose the displayorder, timeout and that you load by default...
Maybe this old conversation will help you:
http://www.SevenForums.com/general-discussion/20191-renaming-earlier-version-Windows-dual-boot.html -
How do I resize BOTH the frame AND the image?
I just started using CC online I usually use the command and shift (to keep the proportions), but NO keys work now!
It's frustrating to have to resize the image and frame separately. The SHIFT key does not keep the proportions more!
The shortcuts have changed?
I'm on Macbook Pro - Yosemite.
Please help me! Thank you!
In the panel control is a check box resize the content with the framework.
-
When you try to activate creative cloud, I get "this code has already been used. How can I proceed with the download and installation?
Thanks for the Email, the problem is solved now. Please do not hesitate to contact in the future.
Concerning
Baudier
Maybe you are looking for
-
Sierra upgrade - NO speaker sound
After upgrading my MacBook Pro [13'3 inches, mid-2012] of El Capitan for Sierra my internal speakers stoped working and helmets as well listening. The only way I can use the sound is through Apple TV... Reinstalled Sierra, ran disk utility, checked h
-
Where is the version for 64-bit Linux?
When I go to the download page for Linux, it has just the 32-bit version. Of course, I'm on Linux 64-bit so I do not want to turn Firefox 32 bit.
-
After installing El Capitan on my iMac (20-inch early 2008), I have selected the wrong library to update and can appear not to understand how to fix this problem. I can get to the old library of photo, but when I then click the iPhoto icon, the wron
-
A369i displaying not a name for incoming calls
I bought an A369i a few months ago. It worked all fine, but now, ILA does not display contact names, number only. I tried to save format + 91 contact no.s and not starting with 0, but don't work. I also deleted all the data of the phone app, but even
-
Windows XP Home SP3 - Windows Installer continues to appear and go then to Manager day. Finally, it gets to the point where the computer wants a drive and finally issues a 1706 error. The file of any computer is looking is isus.msi. Does anyone know