How to sort Nulls Last

Hi:
I would like to sort data desc and Nulls Last. However, in NQSconfig.ini, I already set NULL_VALUES_SORT_FIRST = OFF; and in the Administrator Tool, Features tab of Database properties, I also uncheck NULL_VALUES_SORT_FIRST. Still, nulls were sort at the top. How can I make nulls last? (I am using Oracle 11 + BIEE 10.1.3.4).
Thanks

Hi:
I ready restart the server and purge all cache, I even reboot my computer. But still cannot fix it. Now I have to convert Nulls to something else, however, I dont think it's a good idea. Any other hints?
Thanks
Larry

Similar Messages

  • Sorting NULLS LAST in BI Publisher

    Hi all,
    Is there a way that I can sort column in descending order with NULLS LAST? Need to do that in BIP not in a querry.
    Thanks in advance,
    Stefan

    hi all,
    thx for the reply.
    i can display the data in all column. the point is i can't sort using EventParentName column.
    maybe some of you has experience like this, please share with me.
    thx
    dityo
    Edited by: user13655637 on Apr 12, 2011 7:17 PM

  • Sorting with nulls last on the fact column

    anybody tell me how to do the sorting with nulls last in the template? i can't change anything in data model or anywhere other than template.
    i did try to put the descending order,but null values are coming in between positive and negative values.
    <?sort:FACT_Column_Name;'decending';data-type='number'?>
    could anyone please tell me how can i do that in template?
    Thanks in advance.
    Edited by: user12255470 on Apr 12, 2012 5:29 PM

    Hi to all,
    i've solved, is very simple using decode inside the select:
    SELECT
    ID,
    FK_HTMLDB_ITEM, DECODE(FK_HTMLDB_ITEM,1,HTMLDB_ITEM.DATE_POPUP(3,rownum,VAL,'dd-mon-yyyy'),2,HTMLDB_ITEM.TEXT(3,VAL)) VALORE
    FROM TESTID
    my table is:
    CREATE TABLE "DEV"."TESTID"
    (     "ID" NUMBER NOT NULL ENABLE,
         "FK_HTMLDB_ITEM" NUMBER,
         "VAL" VARCHAR2(4000 BYTE))
    Bye Bye

  • How can I get the address book to sort by "Last" name (using v 31.3.0).

    After a computer crash, I had to load Thunderbird (v31.3.0) back into my machine running Windows 8.1, and I successfully imported my address book back up file into Thunderbird (v31.3.0).
    My problem is that I don't see an option to sort the address book by "Last" name, which was available with the version of Thunderbird I had before the crash.
    How can I get the address book to sort by "Last" name?

    In 'Address Book'
    Select address book
    'View' > 'Show name as' > 'Last/First'
    The you can sort by Name.
    Either click on 'Name' column header to change sort order,
    If reversed, then click on 'Name' column header again to reverse the order.
    Or
    'View' > 'Sort By' > choose 'Name' and 'Ascending'

  • How to make Address Book obey Preferences? I run MacBook Pro 4.1 laptop,  Mac OS X 10.6.8  Address Book 5.0.3 (883) Preferences set at ... General First name following Last name   Sort for Last name Address Format Canada Font size Large Phone format set a

    How to make Address Book obey Preferences?
    I run MacBook Pro 4.1 laptop,  Mac OS X 10.6.8
    Address Book 5.0.3 (883) 
    Preferences set at ...
    General
    First name following Last name 
    Sort for Last name
    Address Format Canada
    Font size Large
    Phone format set at
    +1.123.456.7890
    When application quits - it's all forgotten and it self-resets to
    unwanted configuration.

    Whenever you remove system modifications, they must be removed completely, and the only way to do that is to use the uninstallation tool, if any, provided by the third-party developers, or to follow their instructions. If the software has been incompletely removed, you may have to re-download or even reinstall it in order to finish the job.
    Here are some general guidelines. Suppose you want to remove something called “BrickYourMac.” First, consult the product's Help menu, if there is one, for instructions. Finding none there, look on the developer's website, say www.brickyourmac.com. (That may not be the actual name of the site; if necessary, search the Web for the product name.) If you don’t find anything on the website or in your search, email the developer. While you're waiting for a response, download BrickYourMac.dmg and open it. There may be an application in there such as “Uninstall BrickYourMac.” If not, open “BrickYourMac.pkg” and look for an Uninstall button.
    If you can’t remove software in any other way, you’ll have to erase your boot volume and perform a clean reinstallation of OS X. Never install any third-party software unless you're sure you know how to uninstall it; otherwise you may create problems that are very hard to solve.
    Trying to remove complex system modifications by hunting for files by name often will not work and may make the problem worse. The same goes for "utilities" that purport to remove software.

  • Sort in OBIEE Answers - Desc Nulls Last

    I want to sort Desc on a Answers column, but want NULLS last. Where do I set it?
    For instance I can write SQL
    select * from T1 order by c2 Nulls first;
    NULLS last is default behavior in Oracle SQL
    However, via OBIEE Answers, I see when I use DESC Nulls are on top, I want them on bottom.
    Where should I set it?

    Hi shyamvaran,
    What is the value of your "NULL_VALUES_SORT_FIRST" parameter in your NQSConfig.INI file? By default, this is set to OFF. Which is probably what your seeing i.e. if NULLs are last, and you are sorting in descending order, then you would expect to see NULLs first.
    If you want NULLs to show up last when sorting in descending order, then set the above parameter to ON and bounce your services. That should take care of you.
    Otherwise, you can do a work around. Create a hidden column in your report. Set it's formula to IFNULL(C2,'aaaaaaaaaaa') . This way it'll be alphabetically first i.e. last in descending order. Set this column to sort descending and then set it to hidden. It should sort your report in the desired order and it should be hidden from view.
    Good luck and if you found this post useful, please award points!
    Best regards,
    -Joe

  • Column header sorting: NULLS first/last

    Column header sorting doesnt seem to support the NULLS FIRST /LAST feature of the SQL ORDER BY clause.
    So, if my data has nulls in it, I cant control where they appear when I click on the column header to sort it.
    Is this added to the upcoming 2.0 version?
    Thanks

    Same question over here: in the J2EE app that I'm rebuilding with Apex, we use NULLS last in all pages, wether order is descending or ascending.
    Is 'nulls first/last' supported in any way now?
    Are there workarounds to achieve this?
    Thanks,
    Toon Koppelaars

  • How to sort (to display the last comment) a comment in a web template

    Hi,
    I need your help regarding how to display the last comment of a report in a web template, comments managed via the content module com.sap.ip.bi.rig.DocumentContent.
    Summary of the customer need :
    the customer wants to manage comments for a report. The customer does not want to comment each line of a report but  comments in a report as a whole, we want to display the last comment (among all comments) in the web template.
    What I have done so far :
    I have implemented the paper "Maintaining and Printing Comment for Each Line in the Report" ( http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a046a839-f000-2d10-67af-b53d73894a75), and I have adjusted it to my needs : now I can enter several comments for a report, I can display them via the context menu.
    BW displays only one comment within a web template via Document Content moduleu201D (com.sap.ip.bi.rig.DocumentContent).
    The documents are created under KM, and I can saw them (as administrator) in the KM repository, under the folder /bw_document/InfoProviderData ... OK.
    What I can't get through :
    I want the web template to display the last comment (not the first)  but the web template stills display the first comment. We think it's a sorting issue or a display option (The web template always display the first comment created)
    We tried to maintain portal and KM customizing without success (in the portal System Admin -> System Config -> KM -> CM -> UI -> Settings -> Collection Renderer Setting for example). We think we can get through by java script coding in the web template, but we don't know how to do it. Maybe we have not reach the right option in KM customizing ?
    have you ideas to resolve this issue ?
    Thanks in advance,
    Laurent

    We have found a work around solution, by managing IP functions in the web template... to force BW to sort the items as we want.

  • How to sort files and folders like Windows

    I don't know if this is specific to Arch or every other Linux distro but one thing that really bugs me in Arch is how files and folders are sorted. I use Windows as my main OS (don't start on that please) and I have one folder properly organized exactly as I want it and I like it how Windows sorts this. I access that same folder from my Arch installation, the problem is that the sorting is different and it gets on my nerves lol...
    This is how Windows sorts that specific folder:
    C:\Users\Nazgulled\Documents\University>dir /O
    Volume in drive C is Vista
    Volume Serial Number is F84E-02BE
    Directory of C:\Users\Nazgulled\Documents\University
    05-08-2009 15:34 <DIR> .
    05-08-2009 15:34 <DIR> ..
    05-08-2009 11:10 <DIR> [Archives]
    05-08-2009 14:38 <DIR> [Developers]
    05-08-2009 11:17 <DIR> [X] 1) Cálculo II
    05-08-2009 11:18 <DIR> [X] 2) Análise de Custos
    05-08-2009 11:18 <DIR> [X] 2) Cálculo de Programas
    05-08-2009 11:18 <DIR> [X] 2) Laboratórios de Informática III
    05-08-2009 11:18 <DIR> 2) Algoritmos e Complexidade
    05-08-2009 11:18 <DIR> 2) Arquitectura de Computadores
    05-08-2009 11:18 <DIR> 2) Comunicaçao de Dados
    05-08-2009 11:18 <DIR> 2) Engenharia Económica
    05-08-2009 11:18 <DIR> 2) Estatística Aplicada
    0 File(s) 0 bytes
    13 Dir(s) 24.700.485.632 bytes free
    And this is how Arch does it:
    nazgulled ~/University $ ls -l
    total 7
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:18 2) Algoritmos e Complexidade
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:18 2) Arquitectura de Computadores
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:18 2) Comunicação de Dados
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:18 2) Engenharia Económica
    drwxr-xr-x 1 nazgulled nazgulled 8192 2009-08-05 11:18 2) Estatística Aplicada
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:10 [Archives]
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 14:38 [Developers]
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:17 [X] 1) Cálculo II
    drwxr-xr-x 1 nazgulled nazgulled 12288 2009-08-05 11:18 [X] 2) Análise de Custos
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:18 [X] 2) Cálculo de Programas
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:18 [X] 2) Laboratórios de Informática III
    How can I get Arch/Linux to sort exactly the same as Windows?
    Last edited by Nazgulled (2009-08-05 14:41:47)

    toad wrote:
    Nazgulled wrote:Surely there must be a way to have the same sorting collation in Linux like in Windows
    Ah, no. The way they are doing it is nonsensical and not good practice for a unix style system. Having said that, some solutions have already been offered in this thread.
    While you are free to continue to ask others to help you achieve your aims, it may be more convenient for you to adapt to a structure that is displayed the same way under all systems (just to avoid frustration - not saying you _should_ do it ).
    I really don't care if it's nonsensical, I use Windows 95% of the time or more, it's my main OS, I'm used to it and I like it. Why should I care if it's not a good practice for a unix style system? I just want things to behave the way I like and for a free system like Linux where it doesn't even compare to Windows in terms of freedom in what I can do with it and configure the way I like, it sure is hard to change the way folders/files are sorted...
    It sucks that there isn't a proper solution but I'm not going to adapt anything, that would be nonsensical... But if I have to, I can live with the fact that there isn't a good solution and leave it as it is
    Thanks everyone for their input, "topic closed".

  • My 2009 macbookpro has begun running very slowly, apps freeze and pages hang ... i've run EtreCheck and there are problems but don't know how to sort

    my 2009 macbookpro has begun running very slowly, apps freeze and pages hang ... i've run EtreCheck and there are problems but don't know how to sort ... ran CleanMyMac and freed up about 30GB of space but didn't help ... ran AdwareMedic so that's been sorted but the other issues that came up on the EtreCheck I need help with however i can't figure out how to paste the results on this page

    thanks thomas ... here it comes
    EtreCheck version: 2.1.5 (108)
    Report generated December 29, 2014 at 5:03:07 PM GMT
    Click the [Support] links for help with non-Apple products.
    Click the [Details] links for more information about that line.
    Click the [Adware] links for help removing adware.
    Hardware Information: ℹ️
        MacBook Pro (17-inch, Early 2009) (Verified)
        MacBook Pro - model: MacBookPro5,2
        1 2.66 GHz Intel Core 2 Duo CPU: 2-core
        4 GB RAM Upgradeable
            BANK 0/DIMM0
                2 GB DDR3 1067 MHz ok
            BANK 1/DIMM0
                2 GB DDR3 1067 MHz ok
        Bluetooth: Old - Handoff/Airdrop2 not supported
        Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
        NVIDIA GeForce 9400M - VRAM: 256 MB
            Color LCD 1920 x 1200
        NVIDIA GeForce 9600M GT - VRAM: 512 MB
    System Software: ℹ️
        OS X 10.9.5 (13F34) - Uptime: 0:5:36
    Disk Information: ℹ️
        FUJITSU MHZ2320BH FFS G1 disk0 : (320.07 GB)
            EFI (disk0s1) <not mounted> : 210 MB
            [redacted]'s world too (disk0s2) / : 319.21 GB (30.39 GB free)
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
        MATSHITADVD-R   UJ-868 
    USB Information: ℹ️
        Apple Inc. Built-in iSight
        Apple Inc. iPhone
        Logitech USB Receiver
        Apple Inc. BRCM2046 Hub
            Apple Inc. Bluetooth USB Host Controller
        Apple, Inc. Apple Internal Keyboard / Trackpad
        Apple Computer, Inc. IR Receiver
    Configuration files: ℹ️
        /etc/hosts - Count: 29 - Corrupt!
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Kernel Extensions: ℹ️
            /Library/Application Support/Roxio
        [not loaded]    com.roxio.TDIXController (1.7) [Support]
            /System/Library/Extensions
        [not loaded]    com.kensington.mouseworks.iokit.KensingtonMouseDriver (3.0) [Support]
            /System/Library/Extensions/KensingtonMouseDriver.kext/Contents/PlugIns
        [not loaded]    com.kensington.mouseworks.driver.ADBID32Mouse (3.0) [Support]
        [not loaded]    com.kensington.mouseworks.driver.ADBID32MouseX1 (3.0) [Support]
        [not loaded]    com.kensington.mouseworks.driver.ADBID4Mouse (3.0) [Support]
        [not loaded]    com.kensington.mouseworks.driver.ADBID4MouseX1 (3.0) [Support]
        [not loaded]    com.kensington.mouseworks.driver.KMWBluetoothHIDMouse (3.0) [Support]
        [not loaded]    com.kensington.mouseworks.driver.KMWBluetoothOldHIDMouse (3.0) [Support]
        [not loaded]    com.kensington.mouseworks.driver.KMWUSBHIDMouse (3.0) [Support]
        [not loaded]    com.kensington.mouseworks.driver.USBMouseX1 (3.0) [Support]
        [not loaded]    com.kensington.mouseworks.driver.VirtualMouse (3.0) [Support]
        [not loaded]    com.kensington.mouseworks.driver.VirtualMouseX1 (3.0) [Support]
        [not loaded]    com.kensington.mouseworks.iokit.KensingtonMouseDriverX1 (3.0) [Support]
    Startup Items: ℹ️
        AdobeVersionCueCS2: Path: /Library/StartupItems/AdobeVersionCueCS2
        Firewall: Path: /Library/StartupItems/Firewall
        RetroRun: Path: /Library/StartupItems/RetroRun
        Startup items are obsolete in OS X Yosemite
    Launch Agents: ℹ️
        [not loaded]    com.adobe.AAM.Updater-1.0.plist [Support]
        [loaded]    com.adobe.CS4ServiceManager.plist [Support]
        [loaded]    com.adobe.CS5ServiceManager.plist [Support]
        [invalid?]    com.oracle.java.Java-Updater.plist [Support]
    Launch Daemons: ℹ️
        [loaded]    com.adobe.fpsaud.plist [Support]
        [invalid?]    com.adobe.SwitchBoard.plist [Support]
        [loaded]    com.adobe.versioncueCS3.plist [Support]
        [loaded]    com.adobe.versioncueCS4.plist [Support]
        [running]    com.atomicbird.macaroni.launchd.plist [Support]
        [loaded]    com.macpaw.CleanMyMac2.Agent.plist [Support]
        [invalid?]    com.oracle.java.Helper-Tool.plist [Support]
        [loaded]    com.prosofteng.DriveGenius.locum.plist [Support]
        [loaded]    com.skype.skypeinstaller.plist [Support]
    User Launch Agents: ℹ️
        [loaded]    com.adobe.AAM.Updater-1.0.plist [Support]
        [loaded]    com.adobe.ARM.[...].plist [Support]
        [loaded]    com.adobe.ARM.[...].plist [Support]
        [loaded]    com.google.keystone.agent.plist [Support]
        [loaded]    com.macpaw.CleanMyMac2Helper.diskSpaceWatcher.plist [Support]
        [loaded]    com.macpaw.CleanMyMac2Helper.scheduledScan.plist [Support]
        [loaded]    com.macpaw.CleanMyMac2Helper.trashWatcher.plist [Support]
        [running]    com.prosofteng.DGMonitor.plist [Support]
        [running]    ws.agile.1PasswordAgent.plist [Support]
    User Login Items: ℹ️
        CNQL1210_ButtonManager    ApplicationHidden (/Library/CFMSupport/CNQL1210_ButtonManager.app)
        System Events    ApplicationHidden (/System/Library/CoreServices/System Events.app)
        Mail    Application (/Applications/Mail.app)
        Firefox    Application (/Applications/Firefox.app)
        AdobeResourceSynchronizer    ApplicationHidden (/Applications/Adobe Reader 9/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
        Calendar    Application (/Applications/Calendar.app)
        Skype    Application (/Applications/Skype.app)
        Dropbox    Application (/Applications/Dropbox.app)
        AdobeResourceSynchronizer    ApplicationHidden (/Applications/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
        MouseWorks Background    Application (/Library/Application Support/Kensington/MouseWorks.prefPane/Contents/Resources/Support/MouseWorks Background.app)
    Internet Plug-ins: ℹ️
        AdobePDFViewerNPAPI: Version: 11.0.10 - SDK 10.6 [Support]
        Flash Player: Version: 16.0.0.235 - SDK 10.6 [Support]
        EPPEX Plugin: Version: 3.0.0.0 [Support]
        AdobePDFViewer: Version: 11.0.10 - SDK 10.6 [Support]
        ContentUploaderPlugin: Version: 1.2 [Support]
        iPhotoPhotocast: Version: 7.0
        RealPlayer Plugin: Version: Unknown [Support]
        PDEPrint: Version: 2.0 [Support]
        DirectorShockwave: Version: 11.5.2r602 [Support]
        PDF Browser Plugin: Version: 2.4.2 - SDK 10.2 [Support]
        FlashPlayer-10.6: Version: 16.0.0.235 - SDK 10.6 [Support]
        QuickTime Plugin: Version: 7.7.3
        CANONiMAGEGATEWAYDL: Version: 3.0.0.2 [Support]
        DivXBrowserPlugin: Version: 1.3 [Support]
        Silverlight: Version: 5.1.30514.0 - SDK 10.6 [Support]
        Google Earth Web Plug-in: Version: 6.0 [Support]
        Default Browser: Version: 537 - SDK 10.9
        Flip4Mac WMV Plugin: Version: 3.2.0.16   - SDK 10.8 [Support]
        JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Check version
        OfficeLiveBrowserPlugin: Version: 12.3.6 [Support]
    User internet Plug-ins: ℹ️
        QuickTime Plugin: Version: 6.5.1
        fbplugin_1_0_0: Version: Unknown [Support]
    Safari Extensions: ℹ️
        Ultimate [Installed]
    3rd Party Preference Panes: ℹ️
        ASM  [Support]
        DivX  [Support]
        Flash Player  [Support]
        Flip4Mac WMV  [Support]
        Macaroni  [Support]
    Time Machine: ℹ️
        Skip System Files: NO
        Mobile backups: OFF
        Auto backup: NO - Auto backup turned off
        Destinations:
            G-DRIVE Mini [Local]
            Total size: 999.86 GB
            Total number of backups: 7
            Oldest backup: 2014-07-09 00:13:07 +0000
            Last backup: 2014-12-10 22:18:57 +0000
            Size of backup disk: Excellent
                Backup size 999.86 GB > (Disk size 0 B X 3)
    Top Processes by CPU: ℹ️
             6%    WindowServer
             3%    firefox
             1%    mds_stores
             0%    mdworker
             0%    Skype
    Top Processes by Memory: ℹ️
        348 MB    firefox
        137 MB    Skype
        122 MB    mds_stores
        120 MB    com.apple.IconServicesAgent
        73 MB    Dropbox
    Virtual Memory Information: ℹ️
        1.26 GB    Free RAM
        1.74 GB    Active RAM
        477 MB    Inactive RAM
        543 MB    Wired RAM
        503 MB    Page-ins
        0 B    Page-outs
    Diagnostics Information: ℹ️
        Dec 29, 2014, 04:58:09 PM    Self test - passed
        Dec 29, 2014, 10:58:04 AM    /Library/Logs/DiagnosticReports/Keychain Access_2014-12-29-105804_[redacted].hang
        Dec 29, 2014, 10:54:33 AM    /Library/Logs/DiagnosticReports/Keychain Access_2014-12-29-105433_[redacted].hang
        Dec 29, 2014, 10:52:33 AM    /Library/Logs/DiagnosticReports/Keychain Access_2014-12-29-105233_[redacted].hang
        Dec 29, 2014, 10:50:24 AM    /Library/Logs/DiagnosticReports/Keychain Access_2014-12-29-105024_[redacted].hang
        Dec 29, 2014, 10:50:24 AM    /Library/Logs/DiagnosticReports/Skype_2014-12-29-105024_[redacted].hang

  • How to sort Data in XML template (rtf) file?

    Hi, I have an oracle 11i custom report (rdf) with an xml output to a PDF. There is a formula column in the report. Now I need the data to be sorted on this formula column. As we cannot sort on formula column, i have decided to find a way to sort it in the data in the XML template. But I don't really know how to sort and also where to specify the sort tag in the rtf file. I appreciate your response.
    Databse version : 9.2.0.8.0
    E-Biz Version : 11.5.10.2
    Oracle Reports Version : 6.0.8.27.0
    Oracle BI version : 10.1.3.2.1
    Note : I posted this question under : XML General forum also. But did not get any response. I assumed that may be thats not the right place to post it as my report is in e-Biz environment.

    Hi
    As long as you don't have your ^field commands grouped inside a ^group the order in the .dat file is not important. Your last command
    ^field BG_DOC_LN__LN_AM
    246624.12
    should populate field BG_DOC_LN_AM wherever you place it on your form. Obviously you need to name the fields according to your ^field commands and not just use tab (move to next field).
    Shout if this was not what you are asking.
    Stale Sodal

  • How to sort via multi value parameter in ssrs

    I have a parameter with multi values. when the user selects ,he get of options like acount name, first name, last name.
    so if user selects firstname , the data has to sort by firstname.
    if he selects acount name , the data has to sort by account name.
    please help me how to sort the data using parameter with multivalue? in ssrs 2008.
    Thank you?

    Hi Venku,
    Based on your description, it seems that you create a parameter with available values and you want to sort the report data based on the parameter value. If the available values are the field names in the report, you can try to open the Tablix properties
    dialog box and specify the sort expression on "Sorting" tab as follows:
    =Fields(Parameter!parametername.value).value
    If the parameter allow multiple values and you want to sort the report data by more than one field, for example, sort the report data by "accountname" and then by "firstname", please add two sort expressions as follows:
    =Fields(Parameter!parametername.value(0)).value
    =Fields(Parameter!parametername.value(1)).value
    If you have any question, please let me know.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Custom Search portlet : how to sort the result in sequence (Portal 10.1.4)

    With a Custom Search portlet how to Sort the Result By Sequence. i.e. by respecting arrangements of the items in the page of contents?
    Actually the Results Options "Order By" are : Create Date, Author, Creator, Date Updated, Display Name, Last Update by, Publish Date, Score.
    Is there an action to add the "Sequence" Order By result Option?
    Great thanks for your kind help.
    Best regards

    No, I agree that it is functionality that should be added to the product, but it
    is not a bug because it was not written to do this.
    It is a short coming of the product.
    Cheers,
    Ersan

  • HELP! How te retrieve the last row in MYSQL database using Servlet!

    Hi ,
    I am new servlets. I am trying to retireve the last row id inserted using the servlet.
    Could someone show me a working sample code on how to retrieve the last record inserted?
    Thanks
    MY CODE
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class demo_gr extends HttpServlet {
    //***** Servlet access to data base
    public void doPost (HttpServletRequest req, HttpServletResponse resp)
         throws ServletException, IOException
         String url = "jdbc:mysql://sql2.njit.edu/ki3_proj";
              String param1 = req.getParameter("param1");
              PrintWriter out = resp.getWriter();
              resp.setContentType("text/html");
              String semail, sfname, slname, rfname, rlname, remail, message;
              int cardType;
              sfname = req.getParameter("sfname");
              slname = req.getParameter("slname");
              rfname = req.getParameter("rfname");
              rlname = req.getParameter("rlname");
              semail = req.getParameter("semail");
              remail = req.getParameter("remail");
              message = req.getParameter("message");
              //cardType = req.getParameter("cardType");
              cardType = Integer.parseInt(req.getParameter("cardType"));
              out.println(" param1 " + param1 + "\n");
         String query = "SELECT * FROM greeting_db "
    + "WHERE id =" + param1 + "";
              String query2 ="INSERT INTO greeting_db (sfname, slname ,semail , rfname , rlname , remail , message , cardType ,sentdate ,vieweddate) values('";
              query2 = query2 + sfname +"','"+ slname + "','"+ semail + "','"+ rfname + "','"+ rlname + "','"+ remail + "','"+ message + "','"+ cardType + "',NOW(),NOW())";
              //out.println(" query2 " + query2 + "\n");
              if (semail.equals("") || sfname.equals("") ||
              slname.equals("") || rfname.equals("") ||
              rlname.equals("") || remail.equals("") ||
              message.equals(""))
                        out.println("<h3> Please Click the back button and fill in <b>all</b> fields</h3>");
                        out.close();
                        return;
              String title = "Your Card Has Been Sent";
              out.println("<BODY>\n" +
    "<H1 ALIGN=CENTER>" + title + "</H1>\n" );
                   out.println("\n" +
    "\n" +
    " From  " + sfname + ", " + slname + "\n <br> To  "
                                            + rfname + ", " + rlname + "\n <br>Receiver Email  " + remail + "\n<br> Your Message "
                                            + message + "\n<br> <br> :");
                   if (cardType ==1)
                        out.println("<IMG SRC=/WEB-INF/images/bentley.jpg>");
                   else if(cardType ==2) {
                        out.println("<IMG SRC=/WEB-INF/images/Bugatti.jpg>");
                   else if(cardType ==3) {
                        out.println(" <IMG SRC=/WEB-INF/images/castle.jpg>");
    else if(cardType ==4) {
                        out.println(" <IMG SRC=/WEB-INF/images/motocross.jpg>");
    else if(cardType ==5) {
                        out.println(" <IMG SRC=/WEB-INF/images/Mustang.jpg>");
    else if(cardType ==6) {
                        out.println("<IMG SRC=/WEB-INF/images/Mustang.jpg>");
    out.println("</BODY></HTML>");
         try {
              Class.forName ("com.mysql.jdbc.Driver");
              Connection con = DriverManager.getConnection
              ( url, "*****", "******" );
    Statement stmt = con.createStatement ();
                   stmt.execute (query2);
                   //String query3 = "SELECT LAST_INSERT_ID()";
                   //ResultSet rs = stmt.executeQuery (query3);
                   //int questionID = rs.getInt(1);
                   System.out.println("Total rows:"+questionID);
    stmt.close();
    con.close();
    } // end try
    catch (SQLException ex) {
              //PrintWriter out = resp.getWriter();
         resp.setContentType("text/html");
              while (ex != null) { 
         out.println ("SQL Exception: " + ex.getMessage ());
         ex = ex.getNextException ();
    } // end while
    } // end catch SQLException
    catch (java.lang.Exception ex) {
         //PrintWriter out = resp.getWriter();
              resp.setContentType("text/html");     
              out.println ("Exception: " + ex.getMessage ());
    } // end doGet
    private void printResultSet ( HttpServletResponse resp, ResultSet rs )
    throws SQLException {
    try {
              PrintWriter out = resp.getWriter();
         out.println("<html>");
         out.println("<head><title>jbs jdbc/mysql servlet</title></head>");
         out.println("<body>");
         out.println("<center><font color=AA0000>");
         out.println("<table border='1'>");
         int numCols = rs.getMetaData().getColumnCount ();
    while ( rs.next() ) {
              out.println("<tr>");
         for (int i=1; i<=numCols; i++) {
    out.print("<td>" + rs.getString(i) + "</td>" );
    } // end for
    out.println("</tr>");
    } // end while
         out.println("</table>");
         out.println("</font></center>");
         out.println("</body>");
         out.println("</html>");
         out.close();
         } // end try
    catch ( IOException except) {
    } // end catch
    } // end returnHTML
    } // end jbsJDBCServlet

    I dont know what table names and fields you have but
    say you have a table called XYZ which has a primary
    key field called keyID.
    So in order to get the last row inserted, you could
    do something like
    Select *
    from XYZ
    where keyID = (Select MAX(keyID) from XYZ);
    Good Luckwhat gubloo said is correct ...But this is all in MS SQL Server I don't know the syntax and key words in MYSQL
    This works fine if the emp_id is incremental and of type integer
    Query:
    select      *
    from      employee e,  (select max(emp_id) as emp_id from employee) z
    where      e.emp_id = z.emp_id
    or
    select top 1 * from employee order by emp_id descUday

  • How to use at last/ at end of in this code

    Hi,
    i want to do sum for each and every line item of the delivery quantity and compare it with final purchase order quantity if it is equal do not display in the output.(how to use at last/at end of ) in this code,
    below code wat i have ritten is only comparing first record with final purchase order quantity and displaying the output, but i want sum of every line item and compare with final quantity(purchase order quantity)
    if possible try modify this code
    clear:wa_final,wa_kopoo,wa_likpp1.
        loop at it_kopoo into wa_kopoo.
          move wa_kopoo-ebeln to wa_final-ebeln.
          move wa_kopoo-ebelp to wa_final-ebelp.
          move wa_kopoo-matnr to wa_final-matnr.
          move wa_kopoo-txz01 to wa_final-txz01.
          move wa_kopoo-menge to wa_final-menge.
          move wa_kopoo-meins to wa_final-meins.
          move wa_kopoo-werks to wa_final-werks.
          move wa_kopoo-matkl to wa_final-matkl.
          move wa_kopoo-reswk to wa_final-reswk.
          move wa_kopoo-aedat to wa_final-aedat.
          move wa_kopoo-ekgrp to wa_final-ekgrp.
          move wa_kopoo-EINDT to wa_final-EINDT.
        read table it_likpp1 into wa_likpp1 with key vgbel = wa_final-ebeln
                                                     vgpos = wa_final-ebelp.
          if sy-subrc eq 0.
            if wa_final-menge > wa_likpp1-LFIMG.
            else.
              continue.
            endif.
          endif.
          append wa_final to it_final.
          clear:wa_final,wa_kopoo,wa_likpp1.
        endloop.
      endif.

    Hi,
    Try this:
    define one more internal table it_final1 similar to i_final .
    CLEAR:wa_final,wa_kopoo,wa_likpp1.
    SORT it_kopoo BY ebeln ebelp.
    LOOP AT it_kopoo INTO wa_kopoo.
      move-corresponding wa_kopoo to wa_final.
      COLLECT wa_final INTO it_final1.
      CLEAR: wa_kopoo, wa_final.
    ENDLOOP.
    sort it_final1 by ebeln ebelp.
    LOOP AT it_final1 INTO wa_final.
      READ TABLE it_likpp1 INTO wa_likpp1 WITH KEY vgbel = wa_final-ebeln
                                                   vgpos = wa_final-ebelp.
      IF sy-subrc EQ 0.
        IF wa_final-menge NE wa_likpp1-lfimg.
          APPEND wa_final TO it_final.
        ENDIF.
      ENDIF.
    ENDLOOP.
    Regards,
    Subramanian

Maybe you are looking for

  • HT201441 i cannot remember my icloud log in or pass words

    how can i reset my icloud account as i cannot remember my original ones

  • Events in iCal Missing

    I opened up my iCal today and all my individual calendars and events are missing. I have a back up but unfortunately haven't backed up since April. Is there any way to restore my events and individual calendars as of yesterday?

  • Unit of measure JHR not defined

    Hi Friends, What can cause this problem. I am getting this error message "Unit of measure  JHR  not defined"  after I am creating a Shopping card in EBP. JHR is existing on both sides Backend and EBP in the table T006. Regards Marco M.

  • Closed lid MBP wakes up by itself

    I just bought a mid 2012 MBP OS 10.8.3 and it keeps waking itself up when the lid is closed at random times during the night. I never had this problem with the 2007 Black MacBook or the Late 2011 MacBook Pro. "Wake for networkaccess" is turned off, t

  • Adobe Flash always likes to crash in firefox

    So I used to be able to watch two different youtube videos or at least have two different flash programs open on two different monitors. Now whenever I have a video open on one monitor, I can't even click on the video loaded in the other monitor with