Serial No. comes scrambled

I have got the following query :
select
htmldb_item.display_and_save(1, rownum) "Sr. No.",
htmldb_item.display_and_save(2, emp_name) "Emp Name",
htmldb_item.display_and_save(3, dept_id) "Dept No.",
from emp_master
where (emp_name like :P158_EMP_NAME or :P158_EMP_NAME is null)
and (dept_id like :P158_DEPT_ID or :P158_DEPT_ID is null)
and ((emp_f_er = 'Y' or emp_f_ig = 'Y') or :P158_ERROR = 2)
and (to_date(emp_fl_ts) between :p158_from and :p158_to or :p158_from is null)
and (bpclpb_f_a like :p158_active or :p158_active like '3' or :p158_active is null)
order by emp_name, dept_id
The problem with the above query is that the Serail Number (ROWNUM) values come scrambled.
It works fine in oracle sqlplus.. but am not able to understand the problem over here.
Thnx in advance
Ameya

Because as far as I know, first the records are
fetched in a sorted order and then the
rownum values are assigned.Thats why the inline view is used for Top-N queries. Order by gets applied last. So it can only be safely used after the entire set it ordered.
You can also use analytics which I like a lot better - it would save you from having to do the inline view on normal occassions (i dont think it would work with htmldb_item directly)
Untested btw
SELECT htmldb_item.display_and_save(1, rnum) "Sr. No.",
       htmldb_item.display_and_save(2, emp_name) "Emp Name",
       htmldb_item.display_and_save(3, dept_id) "Dept No.",
  FROM (SELECT emp_name,
               dept_id,
               emp_f_er,
               emp_f_ig,
               bpclpb_f_a,
               row_number() over(ORDER BY emp_name, dept_id) rnum
          FROM emp_master) emp
WHERE (emp_name LIKE :P158_EMP_NAME OR :P158_EMP_NAME IS NULL) AND
       (dept_id LIKE :P158_DEPT_ID OR :P158_DEPT_ID IS NULL) AND
       ((emp_f_er = 'Y' OR emp_f_ig = 'Y') OR :P158_ERROR = 2) AND
       (to_date(emp_fl_ts) BETWEEN :p158_from AND :p158_to OR
       :p158_from IS NULL) AND
       (bpclpb_f_a LIKE :p158_active OR :p158_active LIKE '3' OR
       :p158_active IS NULL)
ORDER BY emp_name,
          dept_id

Similar Messages

  • Where do the serial numbers come from?

    I am new to ALM. I get how it is supposed to work. My question is where to the serial numbers come from? I assign my e-licenses to a serial number and all is good. But, we have purchased MANY copies of Acrobat Pro v.8 and I only see three serial numbers to assign e-license to?!?!?!?!?!
    Thanks!
    - Dave

    Dave,
    If you have purchased through one of Adobe's AOO licensing programs, you can find your serial numbers by going to "Retrieve serial numbers" in the Licensing Web Site. Here you should find one Windows and one Mac serial number for Acrobat 8 Pro. You can use these serial numbers for all the copies of Acrobat you have purchased -- you will not receive a new serial number for every copy.
    Katherine

  • Does serial number come with specific motherboard or it's replaceable?

    Hello guys, there have been a lot of sudden death issues of Z3C and I was one of the victims too, luckily just got it back after nearly 2 months wait
    Anyway I was told that they had replaced a new motherboard to fix the problem, but I don't really think so because when I went to the repair centre they gave me a paper with a parts list they repaired and replaced, which included screen, lock button and so on but no "motherboard" or "mainboard" written on it, I looked again and again just to make sure. If they did change the motherboard, would there be a new serial number because when I checked it in the Android setting it is still the same as the first time I bought it, is this true or they can insert the same serial number into the new motherboard? I know this may sound crazy or dumb, I will be happy if they didn't because there's still a chance for me to retrieve all the previous datas which meant so much to me. Thanks for the help guys!

    Thanks for your reply Thommo, I had already contacted Xperia care there was nothing they could do to retrieve the data, but I have just found Wondershare Dr.Fone and some other data recovery softwares that can help to retrieve the lost data for non-rooted phones. However I don't know why only Z3C needs to be rooted in order to perform data retrieval but as stated in other websites rooting Z3C will void the DRM that result in bad quality low-light photos... So if possible I will unroot it but it seems like there hasn't been a way released yet to unroot Z3C so far, right? So I'm like stuck in between
    So before I root I just want to confirm if the IMEI / serial number comes with specific motherboard, if yes then there's still hope left to get back everything I want because that means they didn't replace the motherboard at all!

  • I bought photoshop elements, the serial number comes up as invalid. I know its right. .what do i do?

    I am having trouble installing Photoshop Elements 12.  I get to the screen where I can input my serial number and it says it is invalid.  in fact the number on the box and the receipt which also has the serial number on it match perfectly but they seem to be one number too long than what can be inputed.  What is wrong??  I don't know what to do!

    If you bought a boxed product then the serial number should be inside the box in the CD sleeve (this is exactly 24 characters long - 6 x 4).  See this picture:
    If, on the other hand, you have an insert in the box rather than a serial number then you have what is called a Redemption Code.  See this picture:
    If this is the case then you need to redeem your code for a real serial number:
    <http://helpx.adobe.com/x-productkb/global/redemption-code-help.html#purchasedproduct>
    If none of the above then clearly there isn't a real solution.

  • HT1349 Why does my serial number come back invalid?

    Hello,
         Every time I call Supportand paste my serial number in, it comes back as invalid. Why?

    Hi Dobe29,
    Welcome to Adobe Forum,
    Please refer to the steps in http://helpx.adobe.com/creative-suite/kb/invalid-serial-number-cs4.html
    For the best assistance, I recommend our chat support at http://adobe.ly/yxj0t6.
    You can try this, it might help you.
    After installation ,Just delete this file C:\Program Files\Common Files\Adobe\Adobe PCD\cache\cache.db This is the location where it installed the serial . After deleteing it will create a new cache.db file and store the serial there that goes with that disk . When you open PS cs4 it will ask to enter serial again.Just enter the serial again that came with box
    Regards,
    Rajshree

  • Data acquisition via serial port (COM)

    Hello,
    I want to ask how can I get data from a HP oscilloscope (model 5XXXB)
    thru the COM port with labview? By means of serial VI or do I need a driver?
    Thank you very much.

    thank you very much
    "Dennis Knutson" wrote in message
    news:[email protected]..
    > Looks like your newsreader broke the link into two lines. In any case,
    > Chris gave the link to the main instrument driver page. If you can't
    > find a driver there or from Agilent, then reply back with the exact
    > model number of the instrument. Maybe someone has worked with it. If
    > all else fails, then you'll have to get the instrument's programming
    > manual, decide which commands you need, and start testing. The easiest
    > way I've found to do this with any kind of serial communication is to
    > use hyperterminal to test the commands and see how the instrument
    > responds. Once you're confident with the instrumen
    t's syntax, you can
    > start with the LabVIEW code. One thing to keep in mind is that serial
    > communication usually requires that each line be terminated. This
    > might be a carriage return, line feed, or end of line. Your
    > programming manual will tell you what to use.

  • Shake Trial Serial never comes

    I downloaded the Shake 4 trial application 3 times, giving my email address each time. When you download, the response pages says you'll get a trial serial via email within the next hour. Four days later I'm still waiting. I gave my .Mac address the last 3 times, an address that has no filters, so this is not a spam filtering problem.
    I called both the Apple Store and Apple's Shake Support line. Apple Store referred me to Shake Support and as soon as I got Shake support on the line and told them the problem they referred me back to the Apple Store.
    I need help. I'm deaf and I had make those support calls via a relay service that assists deaf people with calls. That means I have a hearing person on the line who acts as my ears. The relay assistant who helped me was as baffled with the loop I got in as I was. Apple's departments were passing the problem back and forth. What to do now?

    I'm screwed. I let my emotion decide and I went ahead an bought Shake. NOT KNOWING THAT FINAL CUT STUDIO 2 has incorporated them into Motion 3. When I couldn't get the trial serial I went ahead and ordered Shake, by overnight delivery no less. I got it about 11 a.m today and had it installed by 11:02 a.m. I looked at the interfaced and as much as the reviewers BRAYED about it, I almost had a cow with all the keyboard combinations and Right/Left/Middle click stuff and the trigonometry formulas. So it was about THEN that I got your message that Shake was "EOL". I didn't even know what that meant so while I was waiting to see an answer, I looked up "eol" on Google and found the answer on Wikipedia.
    VAPORWARE! Or, to say it nicely, Apple gutted Shake and is incorporating it into Final Cut Studio 2 (3, 4, etc.). Well, you know Apple's return policy on software; if you crack the seals and install it, you OWN it. There was no way I could climb the learning curve on Shake and it took me all of 10 minutes with the application open to figure that out. When I saw what Final Cut 2 had, I had to go breath into a bag.
    I **immediately** called Apple and **begged** them to let me return Shake. They wouldn't do it, but they were kind enough to offer me a "goodwill" discount on Final Cut Studio 2. I already owned Final Cut Studio.
    I'm deaf. Sitting at a computer is about the only work I can get because I can't hear what people say to me. I edit homemade movies for a living and I work 12 hours a day doing it. I have a hearing guy who comes over to my house and helps me out with the sound. I'm screwed. My kid's just going to have to go without the GI Joe with the Kung Fu grip this Christmas. I don't blame Apple for this. I blame myself.

  • Elements 12 - serial number comes up invalid...

    Just downloaded the full version of Elements 12 for my iMac after using the trial version for a few weeks. I paid my money but the serial no. given is stated to be "invalid for Adobe Photoshop Elements 12".... How can I activate the software I just paid for?

    kglad - thanks but this seems to simply show me how to find my serial
    number. I know what my serial no. is but when I try to activate Elements 12
    it says this serial no. is not valid.
    I think Adobe either need to re-config. the software to accept my existing
    serial no. , or give me a new on which will work. I paid $125 for this
    software and so far have nothing to show for my money.
    Any advice/comments

  • Why does my iPad serial number come back as "changed"?

    When troubleshooting a problem with my boyfriend's iPad (that was frozen), using my iPad, we submitted mine's serial number to open a chat with technical support and it came back that it had been changed. We bought my iPad at the Apple store. It's the first generation (dinosaur). Recently, the only weird thing two weeks ago was when I was online participating at an auction and without keying anything, it appeared someone was typing on the keyboard. Other weird things recently include my 2 year old iMac melting down. Does anyone have a theory? Can my devices possibly be pirated? Thanks for any help.

    What KIND of CS5 do you have... regular or volume license or OEM that came with a computer or education or ???

  • My serial number comes up invalid?

    Hi, I just purchased a copy of Adobe Premiere Elements 10 from a seller on Amazon, and it looks great. Only my serial number is coming up invalid. It's a legit serial number, at least it looks that way and I've typed it in with the dashes, and without... I can't figure this out. Help? It's a 24 digit code so I don't know what's up with it. I type it in, a verify that all numbers are correct and it's just not working all I get is "invalid serial number"..

    >from a seller on Amazon
    1-contact that seller and give him/her a chance to fix the problem... a short term chance
    2-contact Amazon and tell them their sponsored seller has a problem... if that short term chance does not result in a fix
    I have bought through sponsored sellers on Amazon, but never software

  • HT1408 I have just purchased a mac book pro.  I've linked this to my windows pc to transfer the data from my windows to my mac using the migration assistant.  The serial code comes up on both computers but having commenced transfer it then stops!  why?

    I have tried to transfer data from my old Windows PC to my new MacBook Pro via Ethernet cable.  The function starts to download and then aftera  while it stops unexpectedly and both computers say they are "trying to reconnect">  This transfer  has failed on three attempts so far. What am I doing wrong?  Help please.   I am simlply tyring to transfer my itunes library and photos to the new Mac.

    Forget Migration Assistant. Just copy the files you want to transfer to an External drive and then move that drive to the Mac and copy them over to the Mac. Does matter what the external drive format is as OS X can read from NTFS, Windows, formatted drives.

  • HTML DB and Serial(COM) Port

    Hi, everyone,
    Is there any way that HTML DB can communicate with Serial Port (COM Port) directly? I searched the forum, and saw someone mentioned "Visual Baisc", "Javascript", "ActiveX", or "DLL". Could anyone give an example for it if you had successful experiences about it?
    My problem is I'm working on a HTML DB project which will read data from barcode scanner. And request I have is the HTML DB can monintor the Serial Port and read the data from there if there is one. That means some programs need to be embedded in or called in HTML DB page. I known there are some commerial software developed for this purpose on the market, but I am wondering if it can be done by HTML DB itself?
    Thank you. And Regards,
    Ran

    > Is there any way that HTML DB can communicate with Serial Port (COM Port)
    directly?
    There seems to be a misunderstanding or lack of understanding about what APEX/HTMLDB is ito client-server architecture.
    APEX is a server side application. It resides entirely in Oracle as PL/SQL software. It is executed by Oracle server processes that are servicing requests from a web (i.e. Apache) server.
    APEX does not "run" on the client. APEX streams, via the web server, data to the client browser. These MIME streams can be anything from HTML, XML, plain text (like CSV data), to images and so on.
    The browser receives this data stream, and depending on the browser configuration, does something with it - e.g. it renders a HTML data stream, it starts Flash Player plugin for a Flash graph, etc.
    The browser interacts with the client. With the user, the mouse, the keyboard, the printer and any other peripherals the client may have - like a barcode scanner.
    Can HTMDBL use a COM port? The more correct question is, Can PL/SQL in the Oracle Server Process access the COM port of the Oracle Server Platform?. The answer to that is yes - it can be done.
    But in the context of client interaction and the COM port being that of the client platform - no. PL/SQL is a server-side language. It does not execute on the client in the client browser.
    It is important to understand the web client-server architecture - as it is a lot more complex and inflexible and slower than the "traditional" client-server architecture. It is stateless. It uses a very "primitive" client, the web browser. It is bound to W3C standards which is the lowest common denominator. Forget about smooth and slick client GUIs using and supporting the latest desktop GUIs standards and controls. Forget about easily interfacing with the client platform's file system and peripherals and so on.

  • Automatic creation of serial number

    Hello guys,
       In serial number profile, in serializing procedure for PPAU and PPRL i have maintained 4-automatic(creation of serial number) and this serial number profile i have given in workscheduling view of material master.When i create the production order for this material of qty 20,it gives serial number from 1 to 20.And again  i create the production order for it of qty 20,it gives serial number to it from 20 to 40.
       Now my question is,in automatic creation of serial number from where it takes the number ranges.
      Does it take from equipment category which we assign to serial number profile?If not than from where it takes?
             Thanking you guys.

    Dear Jitendra,
    Automatic Serial Numbers come from Number Range Object which is defined in Tcode SNRO. Number range is also defined in SNRO only under number range object for specific purpose.
    You can check in SNRO----> Overview which gives you Overview of Number Range Objects & Number Ranges defined from them.
    So your serial numbers are coming automatically actually defined there only.
    Pls. go through the above.
    Hope this will clarify your doubt.
    If any doubt , pls. revert and reward if useful.
    Regards,
    Tejas

  • Adobe photoshop /premiere elements 12 serial number retrieval

    What can I do when redemption code entered to retrieve serial number comes back as invalid?

    contact adobe support, http://www.adobe.com/support/chat/ivrchat.html

  • Received a replacement ipod nano in early January . Works well in a sound system but keeps turning off when earphones are used. tried 3 pair but same result. When tried for support comes up as  expires. Says I have to purchase . Why????

    Received an ipod nano replacement in January. It works in a sound system but keeps turning itself of or loosing sound when earphones are used. I have tried several sets os earphones with the same result. When I just tried to seek support my Serial number comes up with warranty expired although the letter says 3 mths warranty. What gives Apple ??? Any one any advice??/

    This is usually an indication that your headphones are not plugged all the way in.  The white plastic part of the headphones should be flush with the Nano and no silver from the plug should still be visible.  The headphone jacks on the new 6G Nanos are a bit tighter than previous generations, so it requires a bit of extra push to get the headphones to pop all the way in.
    Also check make sure the jack is clear of debris such as lint.
    B-rock

Maybe you are looking for

  • Itunes 9 won't install on my Windows Vista (64 bit)

    I had Itunes 7, and my computer tried to update it to Itunes 9. While its downloading, it all of a sudden stops and says, "There is a problem with this windows installer package. A program required for this install to complete could not be run. Conta

  • External pictures only on low resolution after import from iPhoto to Photos

    Moved to the new Photos app. All pictures that were in my iPhoto library file are OK but the pictures that were stored outside the library folder are visible only on very very poor resolution (looks like only the thumbnail was imported and shown on f

  • Full Time Position interview questions and answers Please .

    Hi Experts, Please any body send me SAP HR Consultant full time position initial interview questions and answers for me? Including behavioral questions and answers? Thanks and I appreciate your time. Regards- Zubair.

  • AlivePDF HTTPS

    I trying to understand an issue I am having with a Flex builder 2 application and AlivePDF over https. I first programmed the application on a non-ssl connection and everything works just great. I then moved to migrate the application to a https envi

  • Adf web service run time cast error

    When I run the web service using the test client, I get the following error after entering the parameter and invoke <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault><faultcode>env:Server</faultcode