How to add asterics to line when an item in the line splits into two and only one line display.



Here, the title is a bit confusing, I completely realize that but here's what I'm trying to accomplish. I have a table with a column that repeats.

the table looks like this.

create table testCheck (check_num varchar2(20), amount number(17,2), invh_Code varchar2(20))

and it contains data as follows

INSERT INTO "TESTCHECK" (CHECK_NUM, AMOUNT, INVH_CODE) VALUES ('001', '50', '1123')
INSERT INTO "TESTCHECK" (CHECK_NUM, AMOUNT, INVH_CODE) VALUES ('001', '50', '1123')
INSERT INTO "TESTCHECK" (CHECK_NUM, AMOUNT, INVH_CODE) VALUES ('002', '100', '1234'

I would like to write a query that would give me of the separate check_num, but put an asterisk on the elements that are in fact double.

so in other words expected result in this case is as follows.

"CHECK_NUM" "AMOUNT" "INVH_CODE"
"001*" 50 "1123"
"002" 100 "1234"

I could go as far as getting unique values, but what I can't do, it is understand for the life of me how to put the asterisk in there.

Here's my query.

with Checkquery as (         
SELECT  count(*) over (partition by CHECK_NUM order by CHECK_NUM ROWS UNBOUNDED PRECEDING ) thiscount, CHECK_NUM,  AMOUNT,  INVH_CODE
FROM  TESTCHECK
group by
check_num,
AMOUNT,
INVH_CODE)
select check_num, amount,invh_Code from Checkquery where thiscount ='1';

can someone tell me please in the right direction. I just want to identify the dups put an asterisk on the record and then only select records.

According to your last post, you keep what is displayed for the other columns, so why display them at all, so this will do the job.

SELECT check_num.

Decode (to_char (Count (*)), '1', NULL,'* ') dup_checks

TO define by test

GROUP BY check_num;

If you want to view the other columns, you have two choices. You must either put some sort of aggregate function in the list of selection, such as min, max, or sum, or they need to be part of the group.

Concerning

André

Tags: Database

Similar Questions

  • How can I restore my computer when I accidentally deleted the dates of restoration? and try to 'restore' B4 that did not work

    AND there's a window opens constantly present named recovery of Windows XP I can't close and even when I go to Windows Security (by pressing "Control Alt Delete") the Task Manager tab is not active (prevents the closure of this operation!). Windows XP Recovery window runs a 'scan', saying: I have several errors on my hard drive and wants to remedy by making me pay $69.95 for the service.  Sounds like a scam, or worse!  Do you think I have a few bad Adware? !! or what?

    In addition, my office is now empty and my documents have disappeared and my Start button says that I have not installed programs!  All this happened after being on Internet Explorer on a diet (HCG diet site).

    AND there's a window opens constantly present named recovery of Windows XP I can't close and even when I go to Windows Security (by pressing "Control Alt Delete") the Task Manager tab is not active (prevents the closure of this operation!). Windows XP Recovery window runs a 'scan', saying: I have several errors on my hard drive and wants to remedy by making me pay $69.95 for the service.  Sounds like a scam, or worse!  Do you think I have a few bad Adware? !! or what?

    In addition, my office is now empty and my documents have disappeared and my Start button says that I have not installed programs!  All this happened after being on Internet Explorer on a diet (HCG diet site).

    Your computer is infected with malware. Windows XP Recovery also is a rogue malware. He is also known to be bundled with TDSS Rootkit. Follow the instructions below carefully.

    1. Click HERE to download iexplorer.exe. Save the file to your desktop.
    2. Click Start > run > paste the following command > %userprofile%\desktop\iexplore.exe > Press Enter
    3. A dialogue window will appear similar to the command prompt. Leave the course ends. When the window disappears, the process is complete. You will be informed of any malware process which took end. Note: If you get a message that RKill is an infection, don't be concerned. This message is just a fake warning given by Windows XP Recovery when it terminates programs that can potentially remove.
    4. Click HERE to download Malwarebytes. During installation, make sure there is a check mark in the boxes) 1 launch Malwarebytes and 2) update Malwarebytes. Update and launch may take a few minutes so be patient. Once launched the scanner performs a quick search. If you need help to use Malwarebytes click HERE. Once the analysis is completed, follow the prompts to remove the detected items.
    5. Click HERE to download TDSS Killer. It of a short sweep and will detect and remove TDSS Rootkit if it is present on the computer. Just follow the guests.
    6. After TDSS Killer finished click HERE to download Unhide.exe. Save the file to your desktop. Double-click on the file and choose run if you are prompted. Leave the course ends. Note that the process can take a long time. Once the process is complete your files is no longer must be hidden.

    NOTE: It is sometimes necessary to perform steps 5 and 6 in reverse. Also, if TDSS Killer or Unhide.exe are not visible on your desktop after downloading, click Start > run > type tdsskiller.exe or unhide.exe > Ok to automatically launch the software respectively.

  • I seem to have lost the bar tools/explore bar when I opened to the top of mozilla firefox have only one tab? tried looking everywhere and can't get it back

    My son put my Internet with Mozilla Firefox and it goes through the site Web of Nectar - I seem to have lost all the toolbars when I go.  I've tried right-clicking on the top, but this refers only to the tabs 'open in a new tab' etc.  The taskbar at the bottom do not straighten and I tried looking for the control panel and on the help functions.

    Does anyone else have this problem?

    Hello

    I recommend you go through the following article on the Firefox support.
    http://support.Mozilla.com/en-us/KB/how-do-i-customize-toolbars

    I hope this helps.

  • Why my cadratins split into two quadratins only in digital format (ebook)?  How to stop this?

    I work for a Publisher and we use InDesign to implement our print files can be downloaded (usually in PDF format).

    Then, I create a new file for ebooks, remove pages additional, marking the table of entries contained as hyperlinks, etc. internal.

    Given that the Kindle plugin is still in beta and cannot, for some reason, recognize a table of contents created using hypertext links (even if that's what specify instructions), I convert it to an ePub, check, make all necessary revisions, except that as the upload of ePub.

    Can I convert the ePub in mobi using Calibre.

    In both cases, my cadratins are divided into two quadratins in digital versions.  I use the low InDesign Type menu to select the em dash and it appears as a single symbol or glyph.  Print file seems perfect.  It is only when it is converted to a digital format that the em dash is divided into aligned format.

    I need to find a glyph special to use does not appear in my font (Times New Roman)?  I really need to fix this!  Any help is appreciated.

    Hello

    Thanks for sharing files. In the "OutpassageEbookTextcontent.indd" document, instead of an em dash, two quadratins are used and it is probably the reason why you see in the EPUB. You can use the find/change dialog box to understand when these are used. I sent an email stating in many places where they are used as your files may be confidential and I abstained from publishing excerpts of text on the forum. Please take a look and let me know if I have not understood your problem.

    Kind regards

    POOJA

    InDesign engineering

  • Ive just purchased lightroom 5. In LRM in Photo 4, change in, I've been using NIK software color efex, silver efex, DFine, viveza, etc.. When I go to the menu "edit in", I see only one option for silver efex, not the rest of the NIK software

    How can I access all of my NIK software (fresh color, silver efex, define, viveza) LRM 5 under "change in". The options appear in LRM 4, but sinceIjust started LRM 5 w, I don't see NIK software options in the menu: Photo, change in...? Thank you

    You need to reinstall your Nik Plugins.

  • Another that holding down the power button, then by restarting, how should I manage my end 2009 27 "iMac when he crashes on the first blank white screen and won't start?

    Another holding down the power button, then by restarting, how should I handle turn on my end 2009 27 "iMac when he crashes on the first blank white screen and won't start?

    Combinations of keys start for Mac - Apple Support

  • I can't find instructions on how to add a bookmark. I don't want the toolbar

    I can't find instructions on how to add a bookmark. I don't want the bar tools, but only in the list of bookmarks. I tried everywhere looking for this information, but without success.

    Thank you
    D Lapp
    E-mail:

    I removed the email address. It is not necessary on the forum to send you answers. The forum is public and indexed by search engines. You can restore e-mail address if you wish. You can also choose to display the email address publicly to your use of profile/users/edit ->publish my email: [] ~ J99

    If you want to bookmark the current page, you can use the shortcut key Ctrl + d to add the bookmark.

    If you prefer to type the address, or you need to bookmark a page that is not displayed, click on a bookmark in the bookmarks menu (or in the folder where you want to add the bookmark), and choose new bookmark.

    -What are you looking for?

  • When I plug in the USB on my netbook and you want to open, it tells me that there is no disc in the drive?

    Original title: BAD USB

    I have an Acer netbook. I was able to download my photos from my computer on a USB key until a few days ago. When I plug in the USB on my netbook and you want to open, it tells me that there is no disc in the drive?  Why does it say this?

    I am confused with this... I really hope someone can help me.

    Thank you for your time in doing

    Dido

    Hey Toni-LeeFurlotte,

    ·         Have you tried to connect to a different USB port?

    Method 1: Try to connect the USB key to a different port on the netbook and check the issue. You can also connect the drive to another computer and see if the problem persists.

    Method 2: Update of the netbook with the latest chipset drivers. In addition, install other updates of the device driver. Log in the Web site of the manufacturer to do the same thing.

    Method 3: This problem can also occur if there is a drive letter conflict. A drive letter conflict occurs if the disk that is affected by the error is mapped to a reserved drive letter. I suggest you try to change the drive letter.

    How to change drive letter assignments in Windows XP

  • I'm more able to launch a web page, when I click on the URLs in Email, Skype and other internet applications, etc.

    Original title: URLS not clickable links

    WinXP SP3 all updates
    AMD Athlon2 2.7 GHZ
    2 GB 800 mhz SDRAM
    256MB NVIDIA GeForce video

    I'm more able to launch a web page, when I click on the URLs in Email, Skype and other internet applications, etc.

    I downloaded the patch of MR Fixit of MS site that was supposed to solve the problem, but did not.

    Ran the restore of the system (for example successfully MS) in time before the problem started, but did not remedy problem.

    Scanned with Avast A / V & Advanced System Care 5 to remove all malicious software, viruses, registry fixed etc. Did not help.

    Any suggestion would be appreciated. ;-)

    Have you tried what Bruce suggest you try?

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-networking/unable-to-click-on-a-link-within-Outlook-Express/df6631b6-67c8-497c-9ED5-8559648eb88a

  • How do I get Adobe Reader DC?  I got the free software Adobe Reader and now I seem to have the DC version, which has a cost and I do not remember change?

    How do I get Adobe Reader DC?  I got the free software Adobe Reader and now I seem to have the DC version, which has a cost and I do not remember change?  Why can't I find a phone number to speak directly to Adobe?

    Acrobat Reader is free.

  • Hello. I have a problem with the payment process when trying to buy the plan of creative photography of Cloud (one year). the error is: there was a problem processing your order, please contact our Service team customer care for assistance. AfricaBa North

    Hello. I have a problem with the payment process when trying to buy the plan of creative photography of Cloud (one year).

    the error is: there was a problem processing your order, please contact our Service team customer care for assistance. Middle East & North AfricaBahrain: 80081097Egypt: 08000000447Jordan/Kuwait/Lebanon/Qatar/Yemen: English + 44 207 365 0735Jordan/Kuwait/Lebanon/Qatar/Yemen: Arabic/French + 44 203 564 4145Oman: 80077173Saudi Arabia: 8008446638Tunisia, the Morocco and the Algeria: + 33 United Arab Emirates 157324642United: 80004443085Commonthwealth of independent States (CIS): + 44 207 365 0735

    Help me please to solve this problem. I need my lightroom immediately)

    Hi mohamed,.

    Please see the link below to buy the plan of photography:

    Pricing plans and creative Cloud membership | Adobe Creative Cloud

    In case you still have question, please contact sales at Adobe team.

    Adobe Middle East and North Africa

    Kind regards

    Sheena

  • I'm filling out a form that is available on a site. When I click on the option to fill out and submit the form 'online' a pdf document is displayed in chrome with the following text "to display all of the content of this document, you need a later version

    I'm filling out a form that is available on a site. When I click on the option to fill out and submit the form 'online' a pdf document is displayed in chrome with the following text

    «To display all of the content of this document, you need a later version the viewer PDF.» You can upgrade to the latest version of Adobe Reader from www.adobe.com/products/acrobat/readstep2.html for further support, go to www.adobe.com/support/products/acrreader.html"

    Needless to day, I installed the latest version. I even reinstalled using the link in the message, but nothing helped. Whenever I click on the link to go forward, I get the same message. Question: (i) is it my PC/software (Vista), (ii) is the site where I'm trying to submit the form, or (iii) is it the software acrobat reader. Note that I used successfully the last version to fill out and sign forms.

    It is none of them. It's Chrome, which is ignoring Adobe Reader and showing the message.

    Solution: just save the document (with the message) to your desktop. Then open it in Adobe Reader. The 'real' should then display.

  • We have virtual machines on one of our groups that show alarms, but when you click on the tabs, alarms, or tasks and events there is no corresponding alert.

    We have virtual machines on one of our groups that show alarms, but when you click on the tabs, alarms, or tasks and events there is no corresponding alert.

    Can you try to make a vmotion host and see if it gets resolved? If not, can you close the virtual machine and start again? I have seen this problem before and a stop and start resolved.

  • IM new to Actionscript 3... When I click on the green circle turns red and I want to stay like that?

    IM new to Actionscript 3... When I click on the green circle turns red and I want to keep it like that, but it wont save. I don't know, but the saved color custom help someone?... but her hot flashes.

    the name of the instance to the video clip is green


    Here is the source code

    var myS:SharedObject = SharedObject.getLocal ("sdsds");

    var my_color:ColorTransform = new ColorTransform();

    my_color. Color = 0xFF0000;

    Green.Object = myS.data.me;

    green.addEventListener(MouseEvent.CLICK... myClick);

    function myClick (e:MouseEvent): void {}

    trace ("I've been clicked!");

    green.transform.colorTransform = color;

    trace (MYS. Flush());

    }

    trace (myS.data.me);

    use:

    var myS:SharedObject = SharedObject.getLocal("sdsds",'/');

    var my_color:ColorTransform = new ColorTransform();

    my_color. Color = 0xFF0000;

    If {(myS.data.my_color)}

    green.transform.colorTransform = my_color;

    }

    green.addEventListener (MouseEvent.CLICK, myClick);

    function myClick (e:MouseEvent): void {}

    green.transform.colorTransform = color;

    myS.data.my_color = true;

    }

  • How to add a new recipient when you reply to a message?

    I received an email from a person. When you reply to the sender, I need to add a new recipient of my answer, but I can't do that.
    How should I do? Thanks in advance for your support!

    but I can't do that.

    What exactly prevents you to add another recipient?

Maybe you are looking for

  • XP update fails with code 8007F0DA

    All other updates worked thereafter, but these three failed several times: KB2719985, 2655992 and 2691442.  I start in safe mode to run xp_cryptofix.vbs who helped two other updates installed.  They had also failed with the same code. Any suggestions

  • KB2656362, KB2676562, KB2679255 and KB2633171 updates keep appearing.

    I tried to launch the MR fixit tool in normal and aggressive mode and tried to manually install these updates in the cleaning mode.  I even tried to install manually in safe mode as he presents in the support pages, but that just led to get the windo

  • Blue screen after reformatting and installing VISTA HomePremium

    Hello I use DELL Inspiron Laptopn and somehow my recovery disk does not work without knowing any reason. So I did an installtion manual disc using my DVD-ROM.  During installation, the Installer application choose what installation disk. I selected '

  • Problems with the published html file

    Hi, I am a beginner using Adobe animate. I managed to do design an interactive infographic to incorporate into a Web site. But I have a problem with the published html file. The html file is generated, but when I click it, only a blank page opens on

  • SSD failure and lose Lightroom

    Dear community,My SSD with Lightroom 4 comes crashing and I had to get a new one. I have the serial number of my purchase of 2012 in my Adobe ID account, but I don't know how because I can't find the installer anywhere. How can I go back to Lightroom