Asc &Desc

Hi! all
i would appreciate if any one would clear me the concept of the
order by clause using the ASC and DESC
i have a table which has the few columns
including the date the column as one of them
Most of the Queires i deal with need to
return the most recent records
( as each record entered today as date field entered ..today's date..)
So...
select * from
<table_name>
where rownnum <=10 **need to only first 10 records**
order by datefiled desc
hoping that i would get most recent at the top...
but it falied...
i tried with
**Order by ASC*** it also returned same
old ten records(1998) but not new(2000)
Now i am confused with the concept of DESC/ASC
does it work with DATE field...
if not what would be best way to query the most recent records.(DATE FIELD)
Experts please clarify my question ASAP
Best Rgds
null

Hello Some,
This type of subquery was first available in 7.3.4 (I think). You can find more about it in:
Oracle8i SQL Reference
Release 8.1.5
Chapter 5 Expressions, Conditions, and Queries
This type of subquery can be used instead of creating a view. You can also use it to bypass some limitations. A nice example is the CONNECT BY clause. When you use this, you have limitations. When you put the part with the CONNECT BY clause in such a subquery, you are able to do a lot more in this SQL-statement than otherwise.
SELECT TRE.TREELEVEL, TRE.PARENTID, TRE.NODEID,
DOC.URL, DOC.DESCRIPTION,
NVL(IMG.CLOSEDIMAGE, nvl(IMG.OPENIMAGE, 'folder')) CLOSEDIMAGE,
NVL(IMG.OPENIMAGE, 'folder') OPENIMAGE
FROM (select level TREELEVEL, nod.documentid, nod.nodeid, nod.nodeseq, nod.parentid
from web.nodes nod
start with nod.nodeid=&TreeRoot
connect by prior nod.nodeid=nod.parentid) TRE,
WEB.DOCUMENTS DOC, WEB.IMAGES IMG
WHERE TRE.DOCUMENTID=DOC.DOCUMENTID(+)
AND DOC.IMAGEID =IMG.IMAGEID(+)
ORDER BY DOC.DESCRIPTION
null

Similar Messages

  • Decode in order by - asc/desc

    I'm trying to be able to dynamically change the asc/desc in the order by.
    Here is some sql that works:
    select * from transactions order by decode(somevar,'a',acct_nbr,'c',card_number,acct_nbr) asc
    What I wanted was something like this:
    select * from transactions order by decode(somevar,'a',acct_nbr,'c',card_number,acct_nbr) decode(anothervar,'a',asc,'d',desc,asc)
    but this doesn't appear to work. Am I missing something, or is there another way.
    Thanks in advance,

    There are a bunch of restrictions on ordering when you use union all. It usually either requires the numerical position of the column, so if you want to order by the first column, then you order by 1, or a column alias, which sometimes can be used in only the first select and is sometimes required in all of them. However, even if you order by column position, such as order by 1, it does not seem to allow this in a decode. The simplest method is to use your entire query containing the union all as an inline view in an outer query. Please see the following examples that do this and also demonstrate how to get the order by options, including ascending and descending that you desire, assuming that your columns are of numeric data types.
    scott@ORA92> -- sort by acct_nbr asc:
    scott@ORA92> ACCEPT somevar PROMPT 'Enter a to sort by acct_nbr or c to sort by card_number: '
    Enter a to sort by acct_nbr or c to sort by card_number: a
    scott@ORA92> ACCEPT anothervar PROMPT 'Enter 1 to sort ascending or -1 to sort descending: '
    Enter 1 to sort ascending or -1 to sort descending: 1
    scott@ORA92> SELECT acct_nbr, card_number
      2  FROM   (SELECT 1     AS acct_nbr,
      3                3     AS card_number
      4            FROM   dual
      5            UNION ALL
      6            SELECT 2     AS acct_nbr,
      7                4     AS card_number
      8            FROM   dual
      9            UNION ALL
    10            SELECT 3     AS acct_nbr,
    11                2     AS card_number
    12            FROM   dual
    13            UNION ALL
    14            SELECT 4     AS acct_nbr,
    15                5     AS card_number
    16            FROM   dual
    17            UNION ALL
    18            SELECT 5     AS acct_nbr,
    19                1     AS card_number
    20            FROM   dual)
    21  ORDER  BY DECODE ('&somevar',
    22                   'a', acct_nbr * NVL (&anothervar, 1),
    23                   'c', card_number * NVL (&anothervar, 1),
    24                   acct_nbr * NVL (&anothervar, 1))
    25  /
      ACCT_NBR CARD_NUMBER
             1           3
             2           4
             3           2
             4           5
             5           1
    scott@ORA92> -- sort by card_number asc:
    scott@ORA92> ACCEPT somevar PROMPT 'Enter a to sort by acct_nbr or c to sort by card_number: '
    Enter a to sort by acct_nbr or c to sort by card_number: c
    scott@ORA92> ACCEPT anothervar PROMPT 'Enter 1 to sort ascending or -1 to sort descending: '
    Enter 1 to sort ascending or -1 to sort descending: 1
    scott@ORA92> SELECT acct_nbr, card_number
      2  FROM   (SELECT 1     AS acct_nbr,
      3                3     AS card_number
      4            FROM   dual
      5            UNION ALL
      6            SELECT 2     AS acct_nbr,
      7                4     AS card_number
      8            FROM   dual
      9            UNION ALL
    10            SELECT 3     AS acct_nbr,
    11                2     AS card_number
    12            FROM   dual
    13            UNION ALL
    14            SELECT 4     AS acct_nbr,
    15                5     AS card_number
    16            FROM   dual
    17            UNION ALL
    18            SELECT 5     AS acct_nbr,
    19                1     AS card_number
    20            FROM   dual)
    21  ORDER  BY DECODE ('&somevar',
    22                   'a', acct_nbr * NVL (&anothervar, 1),
    23                   'c', card_number * NVL (&anothervar, 1),
    24                   acct_nbr * NVL (&anothervar, 1))
    25  /
      ACCT_NBR CARD_NUMBER
             5           1
             3           2
             1           3
             2           4
             4           5
    scott@ORA92> -- sort by acct_nbr desc:
    scott@ORA92> ACCEPT somevar PROMPT 'Enter a to sort by acct_nbr or c to sort by card_number: '
    Enter a to sort by acct_nbr or c to sort by card_number: a
    scott@ORA92> ACCEPT anothervar PROMPT 'Enter 1 to sort ascending or -1 to sort descending: '
    Enter 1 to sort ascending or -1 to sort descending: -1
    scott@ORA92> SELECT acct_nbr, card_number
      2  FROM   (SELECT 1     AS acct_nbr,
      3                3     AS card_number
      4            FROM   dual
      5            UNION ALL
      6            SELECT 2     AS acct_nbr,
      7                4     AS card_number
      8            FROM   dual
      9            UNION ALL
    10            SELECT 3     AS acct_nbr,
    11                2     AS card_number
    12            FROM   dual
    13            UNION ALL
    14            SELECT 4     AS acct_nbr,
    15                5     AS card_number
    16            FROM   dual
    17            UNION ALL
    18            SELECT 5     AS acct_nbr,
    19                1     AS card_number
    20            FROM   dual)
    21  ORDER  BY DECODE ('&somevar',
    22                   'a', acct_nbr * NVL (&anothervar, 1),
    23                   'c', card_number * NVL (&anothervar, 1),
    24                   acct_nbr * NVL (&anothervar, 1))
    25  /
      ACCT_NBR CARD_NUMBER
             5           1
             4           5
             3           2
             2           4
             1           3
    scott@ORA92> -- sort by card_number desc:
    scott@ORA92> ACCEPT somevar PROMPT 'Enter a to sort by acct_nbr or c to sort by card_number: '
    Enter a to sort by acct_nbr or c to sort by card_number: c
    scott@ORA92> ACCEPT anothervar PROMPT 'Enter 1 to sort ascending or -1 to sort descending: '
    Enter 1 to sort ascending or -1 to sort descending: -1
    scott@ORA92> SELECT acct_nbr, card_number
      2  FROM   (SELECT 1     AS acct_nbr,
      3                3     AS card_number
      4            FROM   dual
      5            UNION ALL
      6            SELECT 2     AS acct_nbr,
      7                4     AS card_number
      8            FROM   dual
      9            UNION ALL
    10            SELECT 3     AS acct_nbr,
    11                2     AS card_number
    12            FROM   dual
    13            UNION ALL
    14            SELECT 4     AS acct_nbr,
    15                5     AS card_number
    16            FROM   dual
    17            UNION ALL
    18            SELECT 5     AS acct_nbr,
    19                1     AS card_number
    20            FROM   dual)
    21  ORDER  BY DECODE ('&somevar',
    22                   'a', acct_nbr * NVL (&anothervar, 1),
    23                   'c', card_number * NVL (&anothervar, 1),
    24                   acct_nbr * NVL (&anothervar, 1))
    25  /
      ACCT_NBR CARD_NUMBER
             4           5
             2           4
             1           3
             3           2
             5           1
    [pre]

  • Break Order Attribute (Asc/Desc) in Reports

    Please forgive me my ignorance.
    I have a dummy column that I use to select another column into. I set the break attribute on it as ascending.
    Now my user wants it either way i.e. ascending or descending.
    Is there way to change the break order attribute to change sorting dynamically depending on inputs.
    Thanks in advance to all who reply.

    I was hoping that someone would know how I can modify the
    ORDER BY 1 DESC,27 ASC part
    The ORDER BY 1 DESC,27 ASC part is generated by break attributes. I would like to modify the "DESC" dynamically from within the report so I could change it as needed.
    I don't know if it can be done via one of the srw package functions... and if so, which one and how. That was where I was trying to go.

  • How To Sort the Table Through Push Buttons (ASC & Desc)???

    Hi,
    I am facing a problem with regard to 'Push Buttons' that I have created on
    my Form. I want the 'Push Button' to sort the table with respect to a
    specific column in 'Ascending order' on first push and then in 'Descending
    order' on second push and then again in 'Ascending order' on third push and so
    on...
    please help me to achieve this
    regards,
    .

    Hello,
    You could try something like this:
    Declare
         LC$Order Varchar2(128) := Get_Block_Property( 'EMP', ORDER_BY ) ;
    Begin
         If Instr( LC$Order, 'DESC' ) > 1 Then
               Set_Block_Property( 'EMP', ORDER_BY, 'EMPNO ASC' ) ;
         Else
               Set_Block_Property( 'EMP', ORDER_BY, 'EMPNO DESC' ) ;
         End if ;
         Execute_Query ;
    End ;     Francois

  • How to show values with initial sort asc/desc in 11.5.10 iProcurement page?

    (Logged Bug 12902576 with OAFramework DEV, but OAF DEV closed the bug and advised to log the issue here in the forum)
    How to have values sorted in ascending order when user first navigates to the page?
    Currently the values are unsorted, and are only sorted after the user clicks the column heading to sort the values. We expect the users should not have to click the column heading, but instead that the values should be sorted in ascending order when the user navigates to the page. This issue occurs on an OAFramework based page in iProcurement application.
    PROBLEM STATEMENT
    =================
    Receipts and Invoices are not sorted in iProcurement Lifecycle page even after implementing personalization to sort ascending on Receipt Number and Invoice Number. Users expect the receipts and invoices to be sorted but they are not sorted.
    STEPS TO REPRODUCE
    1. Navigate to iProcurement
    2. Click the Requisitions tab
    3. Search and find a requisition line that is associated to a Purchase Order having multiple receipts and multiple invoices.
    4. Click the Details icon to view the lifecycle page where the receipts and invoices are listed
    - see that the receipts are not sorted, and the invoices are not sorted
    5. Implement personalization to sort in ascending order for Receipt Number and for Invoice Number. Apply the personalization and return to page.
    - the receipts and invoices are still not sorted.
    IMPACT
    Users need the receipts and invoices sorted to make it easier to review the data. As a workaround, click the column heading to sort the results
    Tried workaround suggested by OAFramework DEV in Bug 12902576 but this did not help.
    TESTCASE of suggested workaround
    NAVIGATION in visprc01
    1. Login: dfelton / welcome
    2. iProcurement responsibility / iProcurement Home Page / Requisitions tab
    3. Click the Search button in the upper right
    4. Specify search criteria
    - Remove the 'Created by' value
    - Change 'Last 7 Days' to 'Anytime'
    - Type Requisition = 2206
    5. Click Go to execute the search
    6. Click the Requisition 2206 number link
    7. Click the Details icon
    8. In the Receipt section, click the link 'Personalize Table: (ReceivingTableRN)'
    9. Click the Personalize (pencil) icon
    10. Click the Query icon for Site level (looks different than the screenshots from OAFramework team, because this is 11.5.10 rather than R12
    - Compare this to the Table personalization page show in the reference provided by OAFramework team -
    http://www-apps.us.oracle.com/fwk/fwksite/jdev/doc/devguide/persguide/T401443T401450.htm#cust_persadmin_editperprop
    11. See on the Create Query page
    Sorting
    No sorting is allowed
    The Query Row option becomes available in personalize after setting the Receipt Number row to Searchable. However, even after clicking the Query icon to personalize, it is not possible to specify sorting. There is a Sorting heading section on the personalization page, but there is also a statement: No sorting is allowed
    The workaround mentioned by OAFramework team in Bug 12902576 does not work for this case
    - maybe because this is 11.5.10 rather than R12?
    - maybe similar to Bug 8351696, this requires extension implementation?
    What is the purpose of offering ascending/descending for Sort Allowed if it does not work?
    Please advise if there is a way to have the initial sort in ascending order for this page.

    I´m sorry that you couldn´t reproduce the problem.
    To be clear:
    It´s not about which symbol should seperate the integer part from the fraction.
    The problem is, that i can´t hide the fraction in bargraph.
    The data im showing are integers but the adf bar graph component wants to show at least 4 digits.
    As I´m from germany my locale should be "de" but it should matter in the test case.
    You can download my test case from google drive:
    https://docs.google.com/open?id=0B5xsRfHLScFEMWhUNTJsMzNNUDQ]
    If there are problems with the download please send me an e-mail: [email protected]
    I uploaded another screenshot to show the problem more clear:
    http://s8.postimage.org/6hu2ljymt/otn_hide_fraction.jpg
    Edited by: ckunzmann on Oct 26, 2012 8:43 AM

  • Needs rows to be listed in BEX in a particular order(not asc desc)

    See the thread.
    Needs rows to be listed in a particular order(not ascending or descending)

    To create a hierarchy you can go in RSA1, infoobject tag, find your infoobject, double click on it and set the flag with hierarchy under Hierarchy tag; save and activate and exit.
    Than right click and choose 'Create hierarchy'.
    After creating hierarchy, in bex properties of the infoobject you can set it to use this hierarchy.
    For second question, if there's a logic to define sort order, while you are loading data, you can write a routine in update rules to populate a specific infoobject with a value for the sort.
    Hope now it's more clear.
    Regards

  • Capture Asc/Desc Sort direction in headerRelease

    I want to store the user's sort column AND direction so data
    updates will
    maintain the user's sort preference.
    I am using the Datagrid's headerRelease function to capture
    the column that
    the user sorted on, but I cannot figure out how to capture
    whether their
    last column sort was ascending or descending.

    This may not be the best way but I needed something quick, so
    I
    compared the column clicked on to the stored column, if it
    matched
    then I know the sort direction is the opposite of what it
    was, and if the
    column doesn't match then I know when you click on a new
    column
    the sort direction is ascending.

  • Follow-up question to thread 'Sort by "total" in Answers'

    Seems I was a bit too quick in closing.
    Sorry for opening two threads on this, but I need to get this solved as I'm on a tight deadline here...
    The answer that pretty much solved my issue on sorting columns on sub-totals in Answers was:
    if you want to sort on sub-totals, follow this:
    i'm assuming that for that profitability column sub-total is sum of individual values for that segment..
    create other column in criteria tab:
    change it's fx to: sum(Profitability by Year, Sector)
    then, keep first sort order asc/desc on this column
    hide this column
    apply 2nd sort order asc/desc on normal profitability column..
    hope it resolve your issue.... I just have one more quick question:
    I can now sort according to sub-total, but how can I hide this new column from my table view? Clicking on the red 'x' button totally removes it as a filter.. The "hide" checkbox in the properties of the column simply grays the column out and shows it without any numbers.
    Thanks in advance
    - Magnus

    go to column properties (first option) > Column Format tab
    you find hide check box.. select and save.
    grays out the values in the column, which is correct and the same what we want..
    But, you should look at that in compound layout, not in edit properties of table...
    in compound layout, appears like it's hidden
    or
    achieve everything in pivot then exlude that particular column
    Edited by: Kishore Guggilla on Nov 29, 2010 7:18 PM

  • IMGBurn updated to 2.0.0.0

    See http://www.imgburn.com/
    All-new version of the popular freeware burn utility.
    Changelog:
    * Added: 'Build' mode for creating ISO's from files on your hard disk, or burning them direct to a disc.
    * Added: Capturing Processor usage is now optional.
    * Added: Option to change the thread priority of the 'Graph Data' thread. Might give more accurate results on some PC's.
    * Added: Workaround for Windows Vista where the system tray icon wouldn't display the initial (top most) 'Restore ImgBurn' item because it had the 'Default' flag set.
    * Added: Additional variations of the 'Send Cue Sheet' command when the initial attempt fails.
    * Added: If 'Send Cue Sheet' now fails because the drive is sooooo old it doesn't support SAO burning, the program will revert to TAO.
    * Added: Option to make Verify mode just test readability of the disc itself and not verify against an image file.
    * Added: Verify mode now reports (for all modes) the file mapped to any unreadable sector at a given LBA address.
    * Added: Buffer Recovery (+ user configurable threshold settings) for times when burning and hdd goes mental, meaning device buffer empties. This means less start / stopping for the drive.
    * Added: Option to set read speed for Verify mode (any type of verify, in the case where it's being done after burn etc).
    * Added: 32bit colour Icons to the icon used for 'default' file associations.
    * Added: When the program needs another disc as part of queued burns (and it's not the foreground window), it now flashes the taskbar button.
    * Added: A rating system to the layerbreak positions/screens. Should make it easier to pick the best one.
    * Added/Changed: The 'Wait For +RW Background Format' option into a 'Prefer Properly Formatted +RW' option. When checked, the program waits for background format to finish and will also prompt to format (before writing) any disc that's in the 'Formatted: No' or 'Formatted: No (Started)' states. When unchecked, it will only prompt when in the 'Formatted: No' state (i.e. when it really has to format).
    * Added: 'Mark as Burnt' to the Queue window context menu.
    * Added: New startup screen on OS's supporting layered windows.
    * Added: A new item to the main menu called 'Output'. This is visible in ISO Build mode and lets you switch between building to an image file or doing on-the-fly to a device (drive).
    * Added: '/VOLUMELABEL' CLI parameter for ISO Build mode.
    * Added: '/NOIMAGEDETAILS' CLI parameter for use in ISO Build mode. Does the same thing at ticking 'Don't Prompt Image Details' in the settings.
    * Added: '/OVERWRITE' CLI parameter for use in ISO Build mode.
    * Added: Support for detecting device arrival / removal.
    * Added: 'Copies' to the main window - as such, logic behind queue has had to change (as has the Queue window).
    * Added: '/COPIES' CLI command for use in ISOWRITE mode.
    * Added: Ability to load/save settings to a '.ini' file. File name passed via '/SETTINGS' CLI command or will default to 'ImgBurn.ini' in the exe's directory.
    * Added: 'Eject Tray' checkbox to all the transfer screens. Whatever that box is set to is now what the program does at the end of the burn (or burn + verify).
    * Added: Additional MD5 calculations to Build/Write/Verify modes where I thought they'd be handy - logged when operation completes successfully.
    * Added: Ability to eject the tray after write ONLY when there are additional images in the queue.
    * Added: Copies + speed info to the burn progress screen.
    * Added: Support for '.IBB' files - these are plain text backup project files. See 'ReadMe.txt' for additional information.
    * Added: Support for '/FILESYSTEM' CLI command for use in ISOBUILD mode.
    * Added: Support for CloneCD's updated version of my old '.dvd' file (from DVD Dec days) where it also contains layerbreak information.
    * Added: More image info to verify / write main screens (to fill empty space!) - due to additional real estate needed for 'Build' mode.
    * Added: Files > 1GB and that have sizes divisible (exactly) by 2048 are now just always accepted for burning - regardless of presence of 'supported' filesystems in the image.
    * Added: 'ImgBurn Statistics' to the 'Help' menu.
    * Added: '/LOG' CLI switch to auto save the log to specified file (overrides setting / filename in settings window).
    * Added: '/INFO' CLI switch to save Info panel information to specified file the first time a disc is fully recognised / checked.
    * Added: The installer now writes out the options (Desktop/Quick Launch icon etc) to the registry so those options are preserved if you install again.
    * Added: Ability to Load/Eject disc from Queue window.
    * Added: Improved file association removal code within the uninstaller.
    * Added: List of (supported!) file systems used within an image to the log and to the tooltip on the volume label.
    * Added: Ability to sort the queue asc/desc by clicking on the column header.
    * Added: Workaround for some old drives that wouldn't report a disc as being erasable.
    * Added: Option to ignore IFO/Filesystem layerbreak positions and revert to VOBU/ECC scanning.
    * Added: Option to set the chosen layerbreak position as 'seamless' via a checkbox in the 'select layer break position' / 'create layer break position' dialog boxes.
    * Added: Option to tell the program NOT to update the IFO/BUP files.
    * Added: Verify mode can now collect data / produce IBG files in its own right.
    * Added/Changed: Use of ComboBoxEx for device dropdown lists when running under Vista. The standard customdraw ComboBox didn't theme properly.
    * Changed: Processor performance counters are now initialised earlier to reduce the delay when the 'GraphData' thread starts.
    * Changed: Even when you load the ISO rather than the MDS file, the MDS (with the same name) will still be deleted if you opt to delete the image.
    * Changed: IBG files are now made to version 2 specs. You'll need an updated DVDInfoPro to view them.
    * Changed: Max speed can now be 33% larger than the average value (was 20%) - otherwise it's ignored - probably a spike.
    * Changed: Shortcut keys for modes/log window/queue window have been changed - forced due to nature of keypressing in new 'Build' mode. Old shortcuts do still work for Write/Verify/Discovery modes though.
    * Changed: 'L' and 'E' on Load/Eject buttons have been replaced by some pictures.
    * Changed: Updated 'ReadMe.txt' file with new CLI stuff.
    * Changed: The little picture of the drive in the device dropdown boxes is now greyed out for all devices except the active one.
    * Fixed: Drag + Drop of some items could look like it was going to work (going by the mouse cursor) but then didn't actually do anything (Effected Build mode's 'Source' box, the 'Queue' window and the 'Create DVD MDS File' window).
    * Fixed: When setting SPLIP flag in IFO/BUP files as a result of layerbreak stuff, it now checks the previous cell doesn't have a cell command before doing so.
    * Fixed: MSF values found in the 16 byte header of some CD sectors sizes (as part of internal conversion routines) were being calculated/stored in normal decimal format, not BCD (binary coded decimal).
    * Fixed: Selecting 'Incremental' and burning a CD meant all kinds of weird things happened. As Incremental doesn't work on CD (or at least not in ImgBurn), it'll always force SAO mode burning.
    * Fixed: Transparency problem with the 48x48x32 program icon.
    * Fixed: Unfinalised multisession discs where last session was empty were reported as being totally empty - meaning the program didn't prompt to erase them - meaning the burn then failed.
    * Fixed: Couldn't open read-only files (via the 'Open' dialog box) using Windows 98.
    * Fixed: Problem with non all-numeric OS 'short dates' in IBG files. The export function would bomb out because Borland's Date/Time functions wouldn't convert the string (taken from the IBG) back into a 'TDateTime' object. i.e. '2/July/2006 12:00:00' would fail where '2/7/2006 12:00:00' would work fine.
    * Fixed: Error message boxes shown from within threads did not stop other windows from becoming inactive.
    * Fixed: Problem where freshly formatted +RW media with unreadable sectors (not normal! - probably means burn will fail anyway) was not considered as writable.
    * Fixed: (Workaround) For a problem with Borlands resource compiler where icons have their index's messed up - this stopped the icon for file associations from working properly.
    * Fixed: Problem with Queue sort order not resetting when going between 'sort by name' and 'sort by name (ignore path)'.
    * Fixed: Unnecessary creation of reg keys for file types where association was disabled.
    * Fixed: 'Standard' user accounts got errors when closing the program down (failing to set file associations) - Maybe it is just visible in Vista?
    * Fixed: Problem updating volume labels in UDF filesystem if previously there was no volume label at all.
    * Fixed: Acceleration character (an '_') was shown in the Queue window for images containing an '&' in the volume label or file name.
    * Fixed: IBG CPU % usage stats on non English PC's.
    * Fixed: Incorrect 'Start In' property for shortcuts/icons created by the installer.
    * Fixed: Incorrect conversion of UDF revision field resulted in some weird values being reported.
    * Fixed: Problem where displaying IBG file with minimum required version of DVDInfoPro would show an error.
    * Fixed: IBQ files couldn't be loaded from the CLI and still keep all the correct settings - selected device info was lost.
    * Fixed: The Log window's open/save dialog boxes used the 'filename' path (part of internal structure) as the default folder, rather than the 'initialdir' path - so they didn't default to the correct 'Most Recently Used' folder.
    * Fixed: Compressing the exe with PECompact meant the 2nd application icon was compressed and so didn't show up for associated file extensions.
    * Fixed: Deferred errors caught by the 'WaitImmediateIO' function were not being correctly copied to the parent function - this could cause a crash.
    * Fixed: File Association code wasn't clearing up the registry properly.
    * Fixed: The filesystem parsing code as part of the verify stage could attempt to read beyond the end of the image file if it was a really small image.
    How can you possibly go wrong!

    Just for the heck of it, I went into Edge and was able to retrieve e-mail for one of my accounts. Don't really understand what 2.0.2 was designed to do.
    From my purely anecdotal experience, I think it's designed to display more bars on the screen Kind of like a Potemkin phone ...
    Well, it's been confirmed. As I type this, I have now received e-mail from both of my accounts ... on Edge ...
    I guess it's back to the drawing board for Apple and AT&T.

  • How can I modify this script to return only certain rows of my mySQL table?

    Hi there,
    I have a php script that accesses a mySQL database and it was generated out of the Flex Builder wizard automatically. The script works great and there are no problems with it. It allows me to perform CRUD on a table by calling it from my Flex app. and it retrieves all the data and puts it into a nice MXML format.
    My question, currently when I call "findAll" to retrieve all the data in the table, well, it retrieves ALL the rows in the table. That's fine, but my table is starting to grow really large with thousands of rows.
    I want to modify this script so that I can pass a variable into it from Flex so that it only retrieves the rows that match the "$subscriber_id" variable that I pass. In this way the results are not the entire table's data, only the rows that match 'subscriber_id'.
    I know how to pass a variable from Flex into php and the code on the php side to pick it up would look like this:
    $subscriberID = $_POST['subscriberID'];
    Can anyone shed light as to the proper code modification in "findAll" which will take my $subscriberID variable and compare it to the 'subscriber_id' field and then only return those rows that match? I think it has something to do with lines 98 to 101.
    Any help is appreciated.
    <?php
    require_once(dirname(__FILE__) . "/2257safeDBconn.php");
    require_once(dirname(__FILE__) . "/functions.inc.php");
    require_once(dirname(__FILE__) . "/XmlSerializer.class.php");
    * This is the main PHP file that process the HTTP parameters,
    * performs the basic db operations (FIND, INSERT, UPDATE, DELETE)
    * and then serialize the response in an XML format.
    * XmlSerializer uses a PEAR xml parser to generate an xml response.
    * this takes a php array and generates an xml according to the following rules:
    * - the root tag name is called "response"
    * - if the current value is a hash, generate a tagname with the key value, recurse inside
    * - if the current value is an array, generated tags with the default value "row"
    * for example, we have the following array:
    * $arr = array(
    *      "data" => array(
    *           array("id_pol" => 1, "name_pol" => "name 1"),
    *           array("id_pol" => 2, "name_pol" => "name 2")
    *      "metadata" => array(
    *           "pageNum" => 1,
    *           "totalRows" => 345
    * we will get an xml of the following form
    * <?xml version="1.0" encoding="ISO-8859-1"?>
    * <response>
    *   <data>
    *     <row>
    *       <id_pol>1</id_pol>
    *       <name_pol>name 1</name_pol>
    *     </row>
    *     <row>
    *       <id_pol>2</id_pol>
    *       <name_pol>name 2</name_pol>
    *     </row>
    *   </data>
    *   <metadata>
    *     <totalRows>345</totalRows>
    *     <pageNum>1</pageNum>
    *   </metadata>
    * </response>
    * Please notice that the generated server side code does not have any
    * specific authentication mechanism in place.
    * The filter field. This is the only field that we will do filtering after.
    $filter_field = "subscriber_id";
    * we need to escape the value, so we need to know what it is
    * possible values: text, long, int, double, date, defined
    $filter_type = "text";
    * constructs and executes a sql select query against the selected database
    * can take the following parameters:
    * $_REQUEST["orderField"] - the field by which we do the ordering. MUST appear inside $fields.
    * $_REQUEST["orderValue"] - ASC or DESC. If neither, the default value is ASC
    * $_REQUEST["filter"] - the filter value
    * $_REQUEST["pageNum"] - the page index
    * $_REQUEST["pageSize"] - the page size (number of rows to return)
    * if neither pageNum and pageSize appear, we do a full select, no limit
    * returns : an array of the form
    * array (
    *           data => array(
    *                array('field1' => "value1", "field2" => "value2")
    *           metadata => array(
    *                "pageNum" => page_index,
    *                "totalRows" => number_of_rows
    function findAll() {
         global $conn, $filter_field, $filter_type;
          * the list of fields in the table. We need this to check that the sent value for the ordering is indeed correct.
         $fields = array('id','subscriber_id','lastName','firstName','birthdate','gender');
         $where = "";
         if (@$_REQUEST['filter'] != "") {
              $where = "WHERE " . $filter_field . " LIKE " . GetSQLValueStringForSelect(@$_REQUEST["filter"], $filter_type);     
         $order = "";
         if (@$_REQUEST["orderField"] != "" && in_array(@$_REQUEST["orderField"], $fields)) {
              $order = "ORDER BY " . @$_REQUEST["orderField"] . " " . (in_array(@$_REQUEST["orderDirection"], array("ASC", "DESC")) ? @$_REQUEST["orderDirection"] : "ASC");
         //calculate the number of rows in this table
         $rscount = mysql_query("SELECT count(*) AS cnt FROM `modelName` $where");
         $row_rscount = mysql_fetch_assoc($rscount);
         $totalrows = (int) $row_rscount["cnt"];
         //get the page number, and the page size
         $pageNum = (int)@$_REQUEST["pageNum"];
         $pageSize = (int)@$_REQUEST["pageSize"];
         //calculate the start row for the limit clause
         $start = $pageNum * $pageSize;
         //construct the query, using the where and order condition
         $query_recordset = "SELECT id,subscriber_id,lastName,firstName,birthdate,gender FROM `modelName` $where $order";
         //if we use pagination, add the limit clause
         if ($pageNum >= 0 && $pageSize > 0) {     
              $query_recordset = sprintf("%s LIMIT %d, %d", $query_recordset, $start, $pageSize);
         $recordset = mysql_query($query_recordset, $conn);
         //if we have rows in the table, loop through them and fill the array
         $toret = array();
         while ($row_recordset = mysql_fetch_assoc($recordset)) {
              array_push($toret, $row_recordset);
         //create the standard response structure
         $toret = array(
              "data" => $toret,
              "metadata" => array (
                   "totalRows" => $totalrows,
                   "pageNum" => $pageNum
         return $toret;
    * constructs and executes a sql count query against the selected database
    * can take the following parameters:
    * $_REQUEST["filter"] - the filter value
    * returns : an array of the form
    * array (
    *           data => number_of_rows,
    *           metadata => array()
    function rowCount() {
         global $conn, $filter_field, $filter_type;
         $where = "";
         if (@$_REQUEST['filter'] != "") {
              $where = "WHERE " . $filter_field . " LIKE " . GetSQLValueStringForSelect(@$_REQUEST["filter"], $filter_type);     
         //calculate the number of rows in this table
         $rscount = mysql_query("SELECT count(*) AS cnt FROM `modelName` $where");
         $row_rscount = mysql_fetch_assoc($rscount);
         $totalrows = (int) $row_rscount["cnt"];
         //create the standard response structure
         $toret = array(
              "data" => $totalrows,
              "metadata" => array()
         return $toret;

    Hi there,
    I have a php script that accesses a mySQL database and it was generated out of the Flex Builder wizard automatically. The script works great and there are no problems with it. It allows me to perform CRUD on a table by calling it from my Flex app. and it retrieves all the data and puts it into a nice MXML format.
    My question, currently when I call "findAll" to retrieve all the data in the table, well, it retrieves ALL the rows in the table. That's fine, but my table is starting to grow really large with thousands of rows.
    I want to modify this script so that I can pass a variable into it from Flex so that it only retrieves the rows that match the "$subscriber_id" variable that I pass. In this way the results are not the entire table's data, only the rows that match 'subscriber_id'.
    I know how to pass a variable from Flex into php and the code on the php side to pick it up would look like this:
    $subscriberID = $_POST['subscriberID'];
    Can anyone shed light as to the proper code modification in "findAll" which will take my $subscriberID variable and compare it to the 'subscriber_id' field and then only return those rows that match? I think it has something to do with lines 98 to 101.
    Any help is appreciated.
    <?php
    require_once(dirname(__FILE__) . "/2257safeDBconn.php");
    require_once(dirname(__FILE__) . "/functions.inc.php");
    require_once(dirname(__FILE__) . "/XmlSerializer.class.php");
    * This is the main PHP file that process the HTTP parameters,
    * performs the basic db operations (FIND, INSERT, UPDATE, DELETE)
    * and then serialize the response in an XML format.
    * XmlSerializer uses a PEAR xml parser to generate an xml response.
    * this takes a php array and generates an xml according to the following rules:
    * - the root tag name is called "response"
    * - if the current value is a hash, generate a tagname with the key value, recurse inside
    * - if the current value is an array, generated tags with the default value "row"
    * for example, we have the following array:
    * $arr = array(
    *      "data" => array(
    *           array("id_pol" => 1, "name_pol" => "name 1"),
    *           array("id_pol" => 2, "name_pol" => "name 2")
    *      "metadata" => array(
    *           "pageNum" => 1,
    *           "totalRows" => 345
    * we will get an xml of the following form
    * <?xml version="1.0" encoding="ISO-8859-1"?>
    * <response>
    *   <data>
    *     <row>
    *       <id_pol>1</id_pol>
    *       <name_pol>name 1</name_pol>
    *     </row>
    *     <row>
    *       <id_pol>2</id_pol>
    *       <name_pol>name 2</name_pol>
    *     </row>
    *   </data>
    *   <metadata>
    *     <totalRows>345</totalRows>
    *     <pageNum>1</pageNum>
    *   </metadata>
    * </response>
    * Please notice that the generated server side code does not have any
    * specific authentication mechanism in place.
    * The filter field. This is the only field that we will do filtering after.
    $filter_field = "subscriber_id";
    * we need to escape the value, so we need to know what it is
    * possible values: text, long, int, double, date, defined
    $filter_type = "text";
    * constructs and executes a sql select query against the selected database
    * can take the following parameters:
    * $_REQUEST["orderField"] - the field by which we do the ordering. MUST appear inside $fields.
    * $_REQUEST["orderValue"] - ASC or DESC. If neither, the default value is ASC
    * $_REQUEST["filter"] - the filter value
    * $_REQUEST["pageNum"] - the page index
    * $_REQUEST["pageSize"] - the page size (number of rows to return)
    * if neither pageNum and pageSize appear, we do a full select, no limit
    * returns : an array of the form
    * array (
    *           data => array(
    *                array('field1' => "value1", "field2" => "value2")
    *           metadata => array(
    *                "pageNum" => page_index,
    *                "totalRows" => number_of_rows
    function findAll() {
         global $conn, $filter_field, $filter_type;
          * the list of fields in the table. We need this to check that the sent value for the ordering is indeed correct.
         $fields = array('id','subscriber_id','lastName','firstName','birthdate','gender');
         $where = "";
         if (@$_REQUEST['filter'] != "") {
              $where = "WHERE " . $filter_field . " LIKE " . GetSQLValueStringForSelect(@$_REQUEST["filter"], $filter_type);     
         $order = "";
         if (@$_REQUEST["orderField"] != "" && in_array(@$_REQUEST["orderField"], $fields)) {
              $order = "ORDER BY " . @$_REQUEST["orderField"] . " " . (in_array(@$_REQUEST["orderDirection"], array("ASC", "DESC")) ? @$_REQUEST["orderDirection"] : "ASC");
         //calculate the number of rows in this table
         $rscount = mysql_query("SELECT count(*) AS cnt FROM `modelName` $where");
         $row_rscount = mysql_fetch_assoc($rscount);
         $totalrows = (int) $row_rscount["cnt"];
         //get the page number, and the page size
         $pageNum = (int)@$_REQUEST["pageNum"];
         $pageSize = (int)@$_REQUEST["pageSize"];
         //calculate the start row for the limit clause
         $start = $pageNum * $pageSize;
         //construct the query, using the where and order condition
         $query_recordset = "SELECT id,subscriber_id,lastName,firstName,birthdate,gender FROM `modelName` $where $order";
         //if we use pagination, add the limit clause
         if ($pageNum >= 0 && $pageSize > 0) {     
              $query_recordset = sprintf("%s LIMIT %d, %d", $query_recordset, $start, $pageSize);
         $recordset = mysql_query($query_recordset, $conn);
         //if we have rows in the table, loop through them and fill the array
         $toret = array();
         while ($row_recordset = mysql_fetch_assoc($recordset)) {
              array_push($toret, $row_recordset);
         //create the standard response structure
         $toret = array(
              "data" => $toret,
              "metadata" => array (
                   "totalRows" => $totalrows,
                   "pageNum" => $pageNum
         return $toret;
    * constructs and executes a sql count query against the selected database
    * can take the following parameters:
    * $_REQUEST["filter"] - the filter value
    * returns : an array of the form
    * array (
    *           data => number_of_rows,
    *           metadata => array()
    function rowCount() {
         global $conn, $filter_field, $filter_type;
         $where = "";
         if (@$_REQUEST['filter'] != "") {
              $where = "WHERE " . $filter_field . " LIKE " . GetSQLValueStringForSelect(@$_REQUEST["filter"], $filter_type);     
         //calculate the number of rows in this table
         $rscount = mysql_query("SELECT count(*) AS cnt FROM `modelName` $where");
         $row_rscount = mysql_fetch_assoc($rscount);
         $totalrows = (int) $row_rscount["cnt"];
         //create the standard response structure
         $toret = array(
              "data" => $totalrows,
              "metadata" => array()
         return $toret;

  • Order by clause in PL/SQL cursors

    I am trying to execute a procedure with some input parameters. I open a cursor
    with a select statement. However, the order by clause in the query does not
    recognize parameter sent through the procedure input parameters.
    For example:
    open <<cursor name>> for
    select id from member order by <<dynamic parameter>>" does not work (Compiles fine but does not return the right result).
    But if I try and give a static order by <<column name>> it works. Is the
    order by clause in the PL/SQL a compile time phenomenon?
    I have also tried it through dynamic sql. All the other parameters work except the order by <<parameter>> asc|desc
    Also "asc" and "desc" does not work if given dynamically.
    What alternatives do I have?
    null

    I don't think order by can be dynamic in a cursor, but it sure can be using dynamic sql. The only issue is that you must do a replace in the sql string with the dynamic variable. For example:
    create or replace procedure test_dyn(p_col in varchar2, p_order in varchar2) as
    q varchar2(500);
    u_exec_cur number;
    u_columnnumber NUMBER;
    u_columndate DATE;
    u_columnvarchar varchar2(50);
    u_cur_count number;
    u_ename varchar2(20);
    u_sal number;
    begin
    q := 'select ename, sal from scott.emp order by p_col p_order';
    -- got to do these two replaces
    q:= replace(q,'p_col',p_col);
    q:= replace(q,'p_order',p_order);
    u_exec_cur := dbms_sql.open_cursor;
    dbms_sql.parse(u_exec_cur,q,dbms_sql.v7);
    dbms_sql.define_column(u_exec_cur, 1, u_columnvarchar, 20);
    dbms_sql.define_column(u_exec_cur, 2, u_columnnumber);
    u_cur_count := dbms_sql.execute(u_exec_cur);
    loop
    exit when (dbms_sql.fetch_rows(u_exec_cur) <= 0);
    dbms_sql.column_value(u_exec_cur, 1, u_ename);
    dbms_sql.column_value(u_exec_cur, 2, u_sal);
    dbms_output.put_line(u_ename);
    dbms_output.put_line(u_sail);
    --htp.p(u_ename);
    --htp.p(u_sal);
    end loop;
    end;
    show errors;
    Now when when I execute my procedure I can change the order by clause all I want, for example:
    SQL> set serveroutput on;
    SQL> exec gmika.test_dyn('sal','asc');
    SMITH
    800
    ADAMS
    1100
    WARD
    1250
    MARTIN
    1250
    MILLER
    1300
    TURNER
    1500
    ALLEN
    1600
    JLO
    2222
    BLAKE
    2850
    JONES
    2975
    SCOTT
    3000
    FORD
    3000
    LOKITZ
    4500
    KING
    5000
    JAMES
    5151
    JAMES
    5555
    PL/SQL procedure successfully completed.
    SQL>
    null

  • Missing objects in SDK

    <p>
    <span style="font-size: 8pt; font-family: Verdana">HI Friend, </span>
    </p>
    <p>
    <span style="font-size: 8pt; font-family: Verdana">We are trying to develop the BO reports through SDK, the following objects are not available in SDK.</span><span style="font-size: 8pt; font-family: Verdana">How to get the following objects in full client report from SDK ( BO 5x to BO XI)</span>
    </p>
    <address>
    <span style="font-size: 8pt; font-style: normal; font-family: Verdana"><span style="color: #0000ff">1 Break </span></span></address>
    <address>
    <span style="font-size: 8pt; font-style: normal; font-family: Verdana"><span style="color: #0000ff">2 Report sorting (asc, desc, Custom)</span></span></address>
    <address>
    <span style="font-size: 8pt; font-style: normal; font-family: Verdana"><span style="color: #0000ff">3 Block header and footer items (Ex: name of object, sum(<xyz>)</span></span></address>
    <address>
    <span style="font-size: 8pt; font-style: normal; font-family: Verdana"><span style="color: #0000ff">4 Alerter</span></span></address>
    <address>
    <span style="font-size: 8pt; font-style: normal; font-family: Verdana"><span style="color: #0000ff">5 Rank</span></span></address>
    <address>
    <span style="font-size: 8pt; font-style: normal; font-family: Verdana"><span style="color: #0000ff">6 Drill</span> </span></address>
    <address>
    </address>

    Hi Smily,
    You can use the transaction SCMP, enter the table that you want to compare (RSDCUBE for comparison of cubes, RSDIOBJ for a directory of all InfoObjects) enter the system that you want to compare with (in this case dev or Quality) and choose the option Display differences only to display all the objects of wat all are transported and wat are not transported...
    there with the help of the legends you'll be able to find out and analyze the differences in both your development and quality system...
    Hope it solves your issue...
    Regards
    Manick

  • Order by dynamic variable

    Hello,
    I am trying to sort my query based on a dynamic variable p_sorton in the cursor as follows:
    function getMarketView2(
    p_event_id in ex_event.event_id%type,
    p_fromrow in integer,
    p_torow in integer,
    p_appTZ in char,
    p_calcTZ in char,
    p_sorton in varchar2) return varchar2 as
    type t_ticket_trade is ref cursor return ex_ticket_trade%rowtype;
    v_return varchar2(32767);
    v_return_integer integer;
    v_String varchar2(32767);
    v_ex_ticket_trade_obj ex_ticket_trade_obj;
    v_rowcount integer:=0;
    v_rowtotal integer:=0;
    v_done boolean:=false;
    v_sysdate date:=NEW_TIME(SYSDATE,trim(p_appTZ),trim(p_calcTZ));
    cursor cur_ticket_trade_event_open (p_event_id in ex_event.event_id%type, v_sysdate in date) is
    select "TICKET_TRADE_ID","SELLER_ACCESS_ID","CREATE_DATETIME","MODIFY_DATETIME","LASTMODIFY_BY",
    "BUYER_ACCESS_ID","OPEN_TRADE_DATE","CLOSE_TRADE_DATE","TICKET_SUITE_CODE","TICKET_DATETIME",
    "TICKET_TIMEZONE","TICKET_EVENT_ID","TICKET_TYPE","TICKET_SEAT_TYPE","TICKET_OPPONENT",
    "TICKET_TOTAL_SEAT","TICKET_PRICE","TICKET_PRICE_EXT","START_BID_DATE","OPEN_BID_PRICE",
    "CURRENT_BID_COUNT","CURRENT_HIGH_BID","CURRENT_LAST_BID_DATETIME","CURRENT_BID_INCREMENT_BY","TICKET_TRANSACTION_DATE",
    "TICKET_TRADE_STATUS" from ex_ticket_trade
    where ex_ticket_trade.TICKET_EVENT_ID = p_event_id
    and (ex_ticket_trade.ticket_datetime > v_sysdate)
    and (ex_ticket_trade.ticket_trade_status in ('F','A','AB'))
    and (ex_ticket_trade.ticket_suite_code='N' OR ex_ticket_trade.ticket_suite_code='Y')
    order by p_sorton desc;
    --ex_ticket_trade.ticket_datetime desc;
    ........then comes the rest of the code........
    This code compiles fine but does not use the value passed in the param p_sorton in the order by clause.
    the same code works fine when hardcoded to "ex_ticket_trade.ticket_datetime"
    No idea where I may be going wrong?
    Also can I do anything like ORDER BY v1 v2
    where v1 specifies columns to sort on and v2 asc/desc, coz that's what I really need to do?
    Pls help ...
    Thanks,
    Karuna

    Hi,
    Thanks for the reply ... I tried the same but due to my basic knowledge of pl-sql, I'm running into some other problem.
    ================================================
    CREATE OR REPLACE FUNCTION testMarketView(p_event_id in ex_event.event_id%type,
    p_fromrow in integer,p_torow in integer,
    p_appTZ in char, p_calcTZ in char, p_sorton in varchar2
                   ) return varchar2 as
    type t_ticket_trade is ref cursor return ex_ticket_trade%rowtype;
         v_return varchar2(32767);
         v_return_integer integer;
         v_String varchar2(32767);
         v_ex_ticket_trade_obj ex_ticket_trade_obj;
         v_rowcount integer:=0;
         v_rowtotal integer:=0;
         v_done boolean:=false;
         v_sysdate date:=NEW_TIME(SYSDATE,trim(p_appTZ),trim(p_calcTZ));
         TYPE t_ticket_trade_event IS REF CURSOR;
         cur_ticket_trade_event t_ticket_trade_event;
         v_dynQuery VARCHAR2(1000);
         cursor cur_event_seat_section_row (p_ticket_trade in ex_event_seat_inv.ticket_trade_id%type) is
         select distinct event_seat_section, event_seat_row
         from ex_event_seat_inv
         where ticket_trade_id = p_ticket_trade;
         type t_event_seat_section_row is ref cursor return cur_event_seat_section_row%rowtype;
    /*v_section varchar2(32767);
         v_section_row varchar2(32767);
         the 26 variables that belong to table ex_ticket_trade-----------
         v_ticket_transaction_date date;
         v_ticket_trade_status varchar2(10);*/
    begin
    v_dynQuery := 'select
    "TICKET_TRADE_ID","SELLER_ACCESS_ID","CREATE_DATETIME","MODIFY_DATETIME","LASTMODIFY_BY",
    "BUYER_ACCESS_ID","OPEN_TRADE_DATE","CLOSE_TRADE_DATE","TICKET_SUITE_CODE","TICKET_DATETIME",
    "TICKET_TIMEZONE","TICKET_EVENT_ID","TICKET_TYPE","TICKET_SEAT_TYPE","TICKET_OPPONENT",
    "TICKET_TOTAL_SEAT","TICKET_PRICE","TICKET_PRICE_EXT","START_BID_DATE",
    "OPEN_BID_PRICE","CURRENT_BID_COUNT","CURRENT_HIGH_BID",
    "CURRENT_LAST_BID_DATETIME","CURRENT_BID_INCREMENT_BY",
    "TICKET_TRANSACTION_DATE","TICKET_TRADE_STATUS"
    from ex_ticket_trade where
    ex_ticket_trade.TICKET_EVENT_ID = ' || p_event_id || ' and (ex_ticket_trade.ticket_datetime > '|| v_sysdate||')
    and (ex_ticket_trade.ticket_trade_status in ('||'''F'''||','||'''A'''||','||'''AB'''||'))
    and (ex_ticket_trade.ticket_suite_code='||'''N'''||' OR ex_ticket_trade.ticket_suite_code='||'''Y'''||')
    order by '|| p_sorton ||'desc ' ;
    select count(*) into v_rowtotal
    from ex_ticket_trade
    where
    ex_ticket_trade.TICKET_EVENT_ID = p_event_id
    and (ex_ticket_trade.ticket_datetime > v_sysdate)
    and (ex_ticket_trade.ticket_trade_status in ('F','A','AB'))
    and (ex_ticket_trade.ticket_suite_code='N' OR ex_ticket_trade.ticket_suite_code='Y')
    order by ex_ticket_trade.ticket_datetime asc;
    v_ex_ticket_trade_obj:=ex_ticket_trade_tabobj.initialize;
    v_rowcount:=1;
    OPEN cur_ticket_trade_event FOR v_dynQuery;
         LOOP
         FETCH cur_ticket_trade_event INTO t_ticket_trade;
    /*     -- THIS IS WHAT I HAVE TO DEAL WITH IF I CAN"T
         --PUT THE RESULTS OF THE CURSOR in t_ticket_trade
         v_ticket_trade_id , v_seller_access_id , v_create_datetime, v_modify_datetime , v_lastmodify_by ,
         v_buyer_access_id, v_open_trade_date, v_close_trade_date, v_ticket_suite_code, v_ticket_datetime,
         v_ticket_timezone, v_ticket_event_id , v_ticket_type, v_ticket_seat_type,     v_ticket_opponent,
         v_ticket_total_seat, v_ticket_price ,     v_ticket_price_ext , v_start_bid_date, v_open_bid_price ,
         v_current_bid_count , v_current_high_bid , v_current_last_bid_datetime , v_current_bid_increment_by ,
         v_ticket_transaction_date , v_ticket_trade_status ;
    if (t_ticket_trade.TICKET_SEAT_TYPE is null) then
    for t_event_seat_section_row in cur_event_seat_section_row(t_ticket_trade.ticket_trade_id) loop
    if (t_event_seat_section_row.event_seat_section is not null) then
    v_section := t_event_seat_section_row.event_seat_section;
    BEGIN
    select alt_txt into v_parking_desc from ex_alt_txt
    where event_id = p_event_id
    and alt_txt_type = 'PARKING_DESC'
    and original_txt = v_section;
    t_ticket_trade.TICKET_SEAT_TYPE := v_parking_desc;
    EXCEPTION
    WHEN no_data_found THEN
    v_section_row := 'Sec. ' || v_section;
    if (t_event_seat_section_row.event_seat_row is not null) then
    v_section_row := v_section_row || ', Row ' || t_event_seat_section_row.event_seat_row;
    end if;
    v_section_row := substr(v_section_row, 1, 30);
    t_ticket_trade.TICKET_SEAT_TYPE := v_section_row;
    END;
    exit;
    end if;
    end loop;
    end if;
    if ((v_rowcount >= p_fromrow) and (v_rowcount <= p_torow)) then
    -- p_ex_ticket_trade => t_ticket_trade
         -- THIS IS WHAT I CAN'T DO in the next line IF I get the results of the cursor in seperate variables
         v_ex_ticket_trade_obj:=ex_ticket_trade_tabobj.maprowtoobj(p_ex_ticket_trade => t_ticket_trade);
    v_string:=v_string||v_ex_ticket_trade_obj.todatastring;
    end if;
    if (v_rowcount>=p_torow) then
    exit;
    end if;
    v_section := null;
    v_section_row := null;
    v_parking_desc := null;
    v_rowcount:=v_rowcount+1;
    end loop;
    v_prefix:='1' || v_delimiter || v_rowtotal || v_terminator;
    v_return:= v_prefix || v_ex_ticket_trade_obj.tometadata||v_string;
    return v_return;
    end;
    ===========================================
    I keep running into one error:
    PLS-00403: expression 'T_TICKET_TRADE' cannot be used as an INTO-target of a SELECT/FETCH statement
    How can I get each row of the cursor either as an object or as 'T_TICKET_TRADE' ?
    Thanks,
    Karuna

  • Row doesn't get selected after sorting

    I have a table bond to a javabean data control. I have enabled multi row selection. I get some rows on the table and then I select one of those rows, after that I use the value of the selected row for some operations.
    I have 3 columns, first name, lastname , email. The first 2 are sortable. If I click on the header of firstname, the information gets sorted ok (asc / desc). The problem is that after sorting, I can NOT select any rows. When I click on the row, it doesn't get highlighted, and If I try to use the value of the selected row I get a null pointer exception.
    Again this is happening only after sorting. If I don't sort, it works ok.
    I'm using JDEV + ADF 11.1.1.5.
    This is my code
    <af:table value="#{bindings.User1.collectionModel}" var="row" partialTriggers="::cb1"
    rows="#{bindings.User1.rangeSize}"
    emptyText="#{bindings.User1.viewable ? identityBundle.no_data_to_display : identityBundle.access_denied}"
    fetchSize="#{bindings.User1.rangeSize}" rowBandingInterval="0"
    id="t1" rowSelection="multiple"
    selectionListener="#{AssignRolesBean.onTableSelect}"
    binding="#{AssignRolesBean.searchResultsTable}"
    columnStretching="last">
    <af:column sortProperty="firstname" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.firstname.label}" id="c1"
    width="136">
    <af:outputText value="#{row.firstname}" id="ot4"/>
    </af:column>
    <af:column sortProperty="lastname" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.lastname.label}" id="c2"
    width="182">
    <af:outputText value="#{row.lastname}" id="ot2"/>
    </af:column>
    <af:column sortProperty="mail" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.mail.label}" id="c4"
    width="361">
    <af:outputText value="#{row.mail}" id="ot5"/>
    </af:column>
    <af:column sortProperty="uid" sortable="false"
    headerText="#{bindings.User1.hints.uid.label}" id="c3"
    visible="false">
    <af:outputText value="#{row.uid}" id="ot3"/>
    </af:column>
    </af:table>
    I have a selection listener only, I don't have a sort listener.
    My bean;
    AssignRolesBean
    public void onTableSelect(SelectionEvent selectionEvent) {
    GenericTableSelectionHandler.makeCurrent(selectionEvent);
    My makeCurrent method
    public static void makeCurrent( SelectionEvent selectionEvent){
    RichTable _table = (RichTable) selectionEvent.getSource();
    CollectionModel tableModel = (CollectionModel) table.getValue();
    JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding) tableModel.getWrappedData();
    DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding();
    Object selectedRowData = table.getSelectedRowData();
    JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding) selectedRowData;
    Key rwKey = nodeBinding.getRowKey();
    tableIteratorBinding.setCurrentRowWithKey( rwKey.toStringFormat(true));
    SHOULD I IMPLEMENT A SORT LISTENER FOR THIS TABLE IN ORDER TO HANDLE ROW SELECTION PROPERLY AFTER SORTING?
    Is there a guideline for handling row selection after sorting?
    Thanks

    I have a table bond to a javabean data control. I have enabled multi row selection. I get some rows on the table and then I select one of those rows, after that I use the value of the selected row for some operations.
    I have 3 columns, first name, lastname , email. The first 2 are sortable. If I click on the header of firstname, the information gets sorted ok (asc / desc). The problem is that after sorting, I can NOT select any rows. When I click on the row, it doesn't get highlighted, and If I try to use the value of the selected row I get a null pointer exception.
    Again this is happening only after sorting. If I don't sort, it works ok.
    I'm using JDEV + ADF 11.1.1.5.
    This is my code
    <af:table value="#{bindings.User1.collectionModel}" var="row" partialTriggers="::cb1"
    rows="#{bindings.User1.rangeSize}"
    emptyText="#{bindings.User1.viewable ? identityBundle.no_data_to_display : identityBundle.access_denied}"
    fetchSize="#{bindings.User1.rangeSize}" rowBandingInterval="0"
    id="t1" rowSelection="multiple"
    selectionListener="#{AssignRolesBean.onTableSelect}"
    binding="#{AssignRolesBean.searchResultsTable}"
    columnStretching="last">
    <af:column sortProperty="firstname" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.firstname.label}" id="c1"
    width="136">
    <af:outputText value="#{row.firstname}" id="ot4"/>
    </af:column>
    <af:column sortProperty="lastname" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.lastname.label}" id="c2"
    width="182">
    <af:outputText value="#{row.lastname}" id="ot2"/>
    </af:column>
    <af:column sortProperty="mail" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.mail.label}" id="c4"
    width="361">
    <af:outputText value="#{row.mail}" id="ot5"/>
    </af:column>
    <af:column sortProperty="uid" sortable="false"
    headerText="#{bindings.User1.hints.uid.label}" id="c3"
    visible="false">
    <af:outputText value="#{row.uid}" id="ot3"/>
    </af:column>
    </af:table>
    I have a selection listener only, I don't have a sort listener.
    My bean;
    AssignRolesBean
    public void onTableSelect(SelectionEvent selectionEvent) {
    GenericTableSelectionHandler.makeCurrent(selectionEvent);
    My makeCurrent method
    public static void makeCurrent( SelectionEvent selectionEvent){
    RichTable _table = (RichTable) selectionEvent.getSource();
    CollectionModel tableModel = (CollectionModel) table.getValue();
    JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding) tableModel.getWrappedData();
    DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding();
    Object selectedRowData = table.getSelectedRowData();
    JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding) selectedRowData;
    Key rwKey = nodeBinding.getRowKey();
    tableIteratorBinding.setCurrentRowWithKey( rwKey.toStringFormat(true));
    SHOULD I IMPLEMENT A SORT LISTENER FOR THIS TABLE IN ORDER TO HANDLE ROW SELECTION PROPERLY AFTER SORTING?
    Is there a guideline for handling row selection after sorting?
    Thanks

  • Can I "catch" a click on a sortable column header of a report?

    Hi,
    I have a report.
    Most columns are made sortable: users can click on them to sort.
    I notice that when clicked only page-rendering executes (i.e. not page processing).
    Here is the question.
    I need to call some custom PL/SQL when the user clicks on a sortable column header. This PL/SQL could executes in the before header (it needs to fire before the page re-executes the query).
    The PL/SQL needs to know which column was clicked on: how can I determine this?
    Can I access the url (example below)? I see that it shows which column was clicked.
    https://dev.centraal.boekhuis.nl:4443/pls/apex/f?p=100:3:145900176972409:fsp_sort_4::RP&fsp_region_id=1562722058676533
    Thanks,
    Toon

    That would order the report by C1 when I click C2, which isn't what I want. I want to preserve the order of C1 (whether that's ascending or descending) and then have C2 ascend or descend for each set of values in C1.
    If I can't set the Order By then I'll need something like this as my query. The "last_col1_order" and "this_col2_order" would be items, set according to the last few values of Request. It's horrible, but it gets the job done. This would be so easy in forms!
    WITH data AS (
      select level col from dual connect by level < 6)
    SELECT
      col1,
      col2,
      lpad(case last_col1_order
             when decode(this_col2_order,'asc','asc','desc') then col1
             else col1_desc end,20,'#') ||
        lpad(col2,20,'#') col2_sort
    FROM (
      SELECT
        col1,
        col2,
        (max(col1) over(partition by 1))-(dense_rank() over(order by col1)) col1_desc,
        'asc' last_col1_order,
        'desc' this_col2_order
      FROM (
        SELECT a.col col1, b.col col2
        FROM data a, data b
    order by col2_sort desc

Maybe you are looking for

  • Formatted External drive for Mac OS extended

    Hi, I actually change from windows to Mac (no comparison...!!) but trying to transfer my photos (Pictures in finder) to an external hard disk i can`t drag and drop and i do not know why....i read in one forume that i have to formatted the external dr

  • Description string based on a formula

    I am stumpped, I am trying to write a formula so that I can return a description string from a database. My database is structured poorly so I will try to explain it as best I can. The collumns that are of intrest are my CA1 collumns which has all of

  • Cairngorm 3 Module and Parsley Context initialization problem.

    Hi,    I am using parsley 2.2, cairngorm 3 module library. When the module is loaded the parsley context is not getting initialized at that time and returing null for the objects managed by the parsley container. <fx:Script> <![CDATA[ import mx.event

  • Uploading a document

    How do I upload a document into wwdoc_document$ ? I've tried doing: l_src_blob := portal_dev.wwdoc_api.get_document_blob_content( p_name => p_filename); insert into portal_dev.wwdoc_document$ (blob_content) values (l_src_blob); and keep getting an Er

  • Why does Photo Booth make my camera echo every time I'm video chatting?

    When I am Video Chatting with other people, my camera all of a sudden starts acting weird and echoy. Meaning, every time I dance or get up, it act not good. Please help me with this solution? Thank you very much!