How can I get only the last 2 rows?

How can I narrow down a query to get only the last two rows in a table ?
Thanks,
Mohan

Thanks a lot Ram for your suggestion but already I have a query which returns a set of rows, of which I would like to further filter and get the last two rows
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Ramanuj Bangad ([email protected]):
try out something like this if it helps.
Example:
select * from users
where rownum <= (select count(*) from users)
minus
select * from users
where rownum <= (select count(*) -2 from users )
<HR></BLOCKQUOTE>
null

Similar Messages

  • How can I get only the music I want onto my iPhone using iTunes Match

    how can I get only the music I want onto my iPhone using iTunes Match?  At present it is putting a random selection on; it has none of the same control as iTunes on my Mac.  And although I uploaded all my album artwork to iCloud, it is not transferring it back to my iPhone

    Iphone are meant to be sync to one itunes library only.
    You can copy those songs to a cd and then put a copy to your itunes media library.

  • 16Gb of music...i have 2 GB space...when I sync...how can I get only the music I want...aka playlists I want...

    16Gb of music...i have 2 GB space...when I sync...how can I get only the music I want...aka playlists I want...

    You must configure to sync only the specific items you want on your iPod by enabling the necessary settings from under the iPod's Summary and Music tabs.  Perhaps this article can provide more information and assistance.
    iTunes: Syncing media content to iOS devices and iPod
    B-rock

  • How can I get only the dual rows?

    Dear gurus,
    I want to retrieve the rows that are dual in my SQL.
    select grb.num_matricula
    from gb_ficha_financ_assistido gff,
    gb_rubricas_previdencial grp,
    gb_recebedor_beneficio grb
    where gff.cd_rubrica = grp.cd_rubrica
    and (gff.cd_fundacao = grb.cd_fundacao
    and gff.seq_recebedor = grb.seq_recebedor)
    and grp.id_rub_suplementacao = 'S'
    and gff.dt_referencia = '01/12/2004'
    group by grb.num_matricula
    The query above return 1414 rows...
    But when I execute the query below I recived 1430 rows. The only modification is the column cod_entid that was add.
    select grb.num_matricula matricula ,grb.cod_entid
    from gb_ficha_financ_assistido gff, gb_rubricas_previdencial grp,
    gb_recebedor_beneficio grb
    where gff.cd_rubrica = grp.cd_rubrica
    and (gff.cd_fundacao = grb.cd_fundacao
    and gff.seq_recebedor = grb.seq_recebedor)
    and grp.id_rub_suplementacao = 'S'
    and gff.dt_referencia = '01/12/2004'
    group by grb.num_matricula, grb.cd_empresa
    The results let me think that exists in some cases diferents cod_entid with the same num_matricula and this is wrong.
    I wanna do a SQL to recoup only the rows that has duplications.
    Is this possible?
    Regards

    You can use the following to find the duplicates:
    select num_matricula matricula, cod_entid, count(*)
    from gb_recebedor_beneficio
    group by num_matricula matricula, cod_entid
    having count(*) > 1
    However, you seem to have a mismatch in your select and group by clauses in your second query. You have grb.cod_entid in your select clause and grb.cd_empresa in your group by clause. That combination will not even run without error, so what you posted must not be what you ran to get the 1430 rows, so you might want to re-check your code carefully.

  • How can i get only the headings and their subheadings from word file in C#

    I want to get all the headings along their sub-headings separately from a word file programmatically Using c# for example i have following content :
    HEADING 1 XYZ
    heading 2
    heading 3
    HEADING 1 ABC
    HEADING 1 DEF
    heading 2 lorem ispum
    so my code should return me:
    Heading 1 XYZ
    heading 2
    heading 3
    seperately and similarly remaining headings and subheadings also.
    Bilal Amjad Microsoft Certified Professional

    Did you try to use OpenXml SDK to access word *.docx file in .Net?
    Use OpenXml SDK you could easily to get anything in Word (Office) documents.
    Bob Bao
    Do you still use the same Windows 8 LockScreen always? Download Chameleon Win8 App quickly, that changes your LockScreen constantly.
    你是否还在看着一成不变的Windows 8锁屏而烦恼,赶紧下载这个
    百变锁屏
    应用,让你的锁屏不断地变化起来。
     i am using the following code to get the output but it returns me all he headings and subheading together not separately 
     foreach (Microsoft.Office.Interop.Word.Paragraph paragraph in oMyDoc.Paragraphs )
                        Microsoft.Office.Interop.Word.Style style = paragraph.get_Style() as Microsoft.Office.Interop.Word.Style;
                        string styleName = style.NameLocal;
                        string text = paragraph.Range.Text;
                        if (styleName == "Title")
                            title = text.ToString();
                        else if (styleName == "Subtitle")
                            st = text.ToString() + "\n";
                        else if (styleName=="Heading 1")
                            heading1[h1c] = text.ToString()+"\n";
    Bilal Amjad Microsoft Certified Professional

  • I downloaded 11.1 but now can't access the store, can only view my library. I've reinstalled but still get a blank, white screen when I try to go to the itunes store. How can I get to the store for purchases?

    I downloaded 11.1 but now can't access the store, can only view my library. I've reinstalled but still get a blank, white screen when I try to go to the itunes store. How can I get to the store for purchases?

    In iTunes prefs>Store - is the Store check box unchecked?
    Did you repair pemissions with Disk Utility?
    MJ

  • With the new IOS7 I get every email in my inbox. How can I limit to the last 50 like it was before the upgrade?

    With the new IOS7 I get every email in my inbox. How can I limit to the last 50 like it was before the upgrade?

    You can set the pref <b>browser.urlbar.formatting.enabled</b> to <i>false</i> on the <b>about:config</b> page.
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold(user set).
    *Preferences can be reset to the default or changed via the right-click context menu.

  • How can I get just the text to resize, rather than the entire web page?

    I used to be able to re-size just text on a webpage by typing Ctrl + +. Today, the entire webpage re-sizes, and when I move to another page it reverts. (I see this mostly in Facebook.). Why did this change, and can I go back to having just the text re-size?

    ''How can I get just the text to resize -- zoom text only''
    steps
    #"Alt" if no menu bar, then
    # View > Zoom > Zoom Text Only
    Zoom text of web pages - MozillaZine Knowledge Base
    :http://kb.mozillazine.org/Zoom_text_of_web_pages
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small>

  • How can I print ONLY the active document?

    Whenever I go to File/Print the darn PSE 9 program sends all of the working files in the bin to the printer. I've searched online for 2 hours now looking for an answer.
    I like to work with having several to many files in the 'bin' and prefer to only print the active file I'm currently working on without having to close the 'working files' before I can print. How can I print ONLY the active document or file in the project bin? Please help, I've upgraded from PSE 3 to PSE 9 and really like the updated features, but this one pain in the neck default is getting the best of me.

    Thanks for your help, that works nicely. It is good to have control of the printer again.

  • I downloaded pictures onto my iPhone from computer twice by mistake now when i uncheck/sync then check and sync again  i keep getting two lots of pics..how can i get just the one set again? thnx

    I downloaded pictures onto my iPhone from computer twice by mistake now when i uncheck/sync then check and sync again  i keep getting two lots of pics..how can i get just the one set again? thnx

    You're welcome.
    All photos transferred from your computer are stored in the iPhone's Photo Library regardless if you select a single album or folder of photos to be transferred or multiple albums or folders. The photos on the albums or folders of photos include a pointer to the original photos stored in the Photo Library. The photos are not duplicated taking up double the storage space. This way you can view the photos in an album or folder of photos only by selecting the album or folder, or all photos in all albums or folders by selecting Photo Library.
    Makes more sense when transferring multiple albums or folders of photos which cannot be changed when transferring only a single album or folder of photos.
    The same applies with iTunes and music playlists. A song can't be in a playlist unless it is in the main iTunes library. Placing a song in a playlist does not duplicate the song.

  • My hard drive crashed and I have lost my Itunes library. How can I get my the music that I loaded from my own CDs back on my PC from my iPod?

    My hard drived crashed in my HP Pavilion desktop and I have installed a new one. I have Windows 2007. My Itunes library is gone. How can I get all the music that I loaded onto my iPod from my own CD's back into an Itunes library?

    The loading of audio files to iPod is designed to go one way only: computer to iPod. There are some third-party applications available which will rescue an audio library and write the files back to a PC HDD. The playlists might not copy, nor the album art work, nor videos but you might be able to recover all audio files. Some apps are open source and available for free download, for example: Senuti, Onyx. There are others which are  Windows-based; do a Google search to find out. 

  • HT5527 I did not move my Mobileme account to iCloud. How can I get off the iCloud mailing list?

    I did not move my Mobileme account to iCloud. How can I get off the iCloud mailing list?

    If you migrated your MobileMe account before 1 August you should have signed into System Preferences>iCloud with it, and you would be able to see your calendars, bookmarks and emails on the iCloud website. Is this the case? Did you sign into iCloud with your @me.com address?
    If you did not migrate your MobileMe account you can no longer do so.
    If you did migrate, did you do so from a full MobileMe account or from a Family Pack sub-account? the latter did not get the complimentary storage (because their iDisks were only 5GB anyway).
    If you had a full MobileMe account, check on your Mac - System Preferences>iCloud - and see whether that shows the upgrade. If it doesn't, you probably need to contact Support: if you currently happen to have AppleCare, either because you recently bought Apple hardware or have paid to extend the inititial period, you can contact them here:
    http://www.apple.com/support/icloud/contact/
    You will need the serial number of the covered hardware.
    If you are not covered by AppleCare, then - in common with other free email services - there is no free support (MobileMe Support is no longer available) and you may be asked to pay a fee: in this case you should ask them to deal with it without cost (and hope they agree).
    Note that you haven't paid anything for your MobileMe storage since your first renewal date after 6 June 2011, and iCloud costs nothing unless you specifically choose to upgrade the storage. Note also the iCloud storage is not general file storage in the manner of the iDisk but is restricted to iOS device Backup, Mail, Photo Journal and Documents.

  • I downloaded acdsee camera flash (us$0.99) in Hong Kong's app store, but i cannot find it in the app store after i changed to another iphone. it seems that the app is no longer available in HK, how can I get back the app?

    i downloaded acdsee camera flash (us$0.99) in Hong Kong's app store, but i cannot find it in the app store after i changed to another iphone. it seems that the app is no longer available in HK, how can I get back the app?

    First make sure you are searching the name correctly.
    If the app is no longer in the App Store it is no longer available for download. This happens when Apple has found the app violates the agreement with the developer or when the developer no longer wants the app listed in the App Store.
    If the app is truly no longer in the App Store your only option is to copy it from iTunes on the computer you normall sync with.

  • I've received a message that says my message can't be sent.  Unfortunately, the list of recipients is so long I can't see the bottom to click "try another server".  The message won't scroll.  How can I get to the options at the bottom?

    I've received an error messagae that says my message can't be sent.  Unfortunately, the recipient list is so long I can't see the bottom of the error message to click "Try again" or another option.  The message won't scroll.  How can I get to the bottom of the message?

    Many Thanks, Kurt.
    I knew I'd seen the solution you've provided somewhere - either in MacWorld or MacFormat - but couldn't remember the Gatekeeper bit!
    I shall save it somewhere VERY safe now in case this happens again …
    You have made an old man very happy and saved me from worrying that senile decay had suddenly set in. (I was 70 last week so you might understand the situation from that.)
    Best wishes
    OllyanDinah

  • How can i get back the adobe creative cloud shared folder after I deleting it?

    How can i get back the adobe creative cloud shared folder after I deleting it?

    I think Adobe pulled the Creative Connect Desktop app until the new CC release next month. I just built a new PC and noticed it wasn't available in the app manager any more. On my other machines it isn't working anyway. In another post Adobe devs said they new it was down because thay were working out some server issues. It looks like they couldn't resolve them.
    I bought into the CC right from the beginning since I never buy my software outright but rather use a credit card. I thought that getting the whole master suite for $30 a month interest free was a great deal. Having all the software has been great, but it was over a year before we even saw a desktop syncing folder and noe it seens as though we are going to have server problems every time they upgrade the cloud leaving us to have to use the cluncky web interface during these sync blackouts.
    I can tell you Adobe better get it together cause ther starting to p*ss off a lot of loyal customers. It feels like were dealing with a cellphone company who only gives deals to the new customers and once you've signed the contract your screwed.
    Here is the link to whats going on
    Announcement: Creative Cloud file sync service offline (Updated)
    Hide Details
    The Creative Cloud Connection preview is currently offline as we upgrade the service. Please see this blog post for additional details :http://blogs.adobe.com/creativecloud/update-on-creative-cloud-connecti on-and-file-sync-preview/
    All files stored in Creative Cloud can still be accessed and downloaded from the Creative Cloud web page at: https://creative.adobe.com/files
    We sincerely apologize for the inconvenience during this transition.
      by Vikrant Rai (May 17, 2013)

Maybe you are looking for

  • How can i print an email without printing the attachment?

    I just got my new macbook pro retina display.  I am using Mac mail and want to know how I can print an email without printing the attachement.  Any suggestions and solutions would be appreciated.

  • No monitor means I can't work.

    Posted to your (Best Buy's) Facebook page. Didn't get a response (maybe the employee was on break) so I'm posting it here as well. “Thanks for screwing me over Best Buy. You guys have really mastered the art. I bought a 4 year protection plan that co

  • How to search in several pdf files at once

    how is it possible to make one pdf file starting from 20 pdf's in order to search for an item in one operation. I do not need to change the contenance (pro edition off adobat?)

  • Setting Visible False to Canvas

    Hi, In WHEN-NEW-ITEM-INSTANCE-TRIGGER i am writing a code and in a particular event another canvas gets opened. How to i restrict in moving to the canvas Is there any way out??? Regards Saugata

  • LIttle flickering 'x' in tabs doesn't always appear -

    That little 'x' in the left corner of the tabs is quite unreliable. When it does appear, it's often tardy - but sometimes it doesn't bother to show up at all, making closure of tabs impossible. Was this Houdini-x so flakey in the beta? Or is this a n