Sorting does not work  with ROW_NUMBER () OVER (ORDER BY

CREATE OR REPLACE PROCEDURE SP_SALES (
p_sales_id IN VARCHAR2,
p_rownnum_from IN NUMBER,
p_rownnum_to IN NUMBER,
p_sort_by IN VARCHAR2,
p_query OUT SYS_REFCURSOR,
AS
v_query VARCHAR2 (32000);
v_sort_list VARCHAR2(32000) ;
BEGIN
IF p_spv_sort_by IS NULL THEN
v_sort_list := 'given_name ASC ' ;
ELSE
v_sort_list :=p_spv_sort_by;
END IF ;
DBMS_OUTPUT.PUT_LINE ('v_sort_list '||v_sort_list);
OPEN p_query FOR
SELECT sales_id,
item_id,
order_num,
employee_name
,given_name
dept_id,
manager_name,
ROW_NUM
FROM
(SELECT x.*,
ROW_NUMBER () OVER (ORDER BY v_sort_list ) ROW_NUM
FROM (sales_id,
item_id,
order_num,
employee_name
,given_name
dept_id,
manager_name,
FROM order rvw,
sales pol,
emp ca,
WHERE pol.id = rvw.pr_order_id
AND ca.empid =pol.employee_id
AND status = 'SUP') x )
WHERE ROW_NUM BETWEEN p_rownnum_from AND p_rownnum_to;
-- ORDER by v_sort_list ;
DBMS_OUTPUT.PUT_LINE ('v_sort_list '||v_sort_list);
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE ('EX ');
END;
END;
SHOW ERRORS
Sorting does not work. Am I doing something wrong here?
executing procedure using below
declare
x SYS_REFCURSOR;
y number;
BEGIN
SP_SALES('70159_502',1,5, 'GIVEN_NAME'||' ASC' ,:x);
--dbms_output.put_line (:x);
END;

Hello
Depending on how many different columns you can sort on and the data types of them, it may be feasible for you to include the conditional logic in the existing statement without the need for dynamic sql...
DTYLER_APP@pssdev2> var p_spv_sort_by varchar2(100)
DTYLER_APP@pssdev2>
DTYLER_APP@pssdev2> exec :p_spv_sort_by:='some other column'
PL/SQL procedure successfully completed.
P_SPV_SORT_BY
some other column
DTYLER_APP@pssdev2>
DTYLER_APP@pssdev2> WITH source AS
  2  (   SELECT 'a' given_name, 'z' other_column from dual UNION ALL
  3      SELECT 'b' given_name, 'y' other_column from dual UNION ALL
  4      SELECT 'c' given_name, 'x' other_column from dual
  5  )
  6  SELECT
  7      given_name,
  8      other_column,
  9      ROW_NUMBER ()
10     OVER (
11        ORDER BY
12           CASE
13              WHEN :p_spv_sort_by IS NULL THEN given_name
14              WHEN :p_spv_sort_by = 'some other column' THEN other_column
15           END)
16        ROW_NUM
17  FROM
18      source
19  /
G O    ROW_NUM
c x          1
b y          2
a z          3
3 rows selected.
DTYLER_APP@pssdev2> exec :p_spv_sort_by:=NULL;
PL/SQL procedure successfully completed.
P_SPV_SORT_BY
DTYLER_APP@pssdev2> WITH source AS
  2  (   SELECT 'a' given_name, 'z' other_column from dual UNION ALL
  3      SELECT 'b' given_name, 'y' other_column from dual UNION ALL
  4      SELECT 'c' given_name, 'x' other_column from dual
  5  )
  6  SELECT
  7      given_name,
  8      other_column,
  9      ROW_NUMBER ()
10     OVER (
11        ORDER BY
12           CASE
13              WHEN :p_spv_sort_by IS NULL THEN given_name
14              WHEN :p_spv_sort_by = 'some other column' THEN other_column
15           END)
16        ROW_NUM
17  FROM
18      source
19  /
G O    ROW_NUM
a z          1
b y          2
c x          3
3 rows selected.
DTYLER_APP@pssdev2>But that would depend on the columns you're sorting on being of the same data type or at least having the ability to convert them to the same data type without loosing the sort order.
DTYLER_APP@pssdev2> WITH source AS
  2  (   SELECT 'a' given_name, sysdate - 2 other_column from dual UNION ALL
  3      SELECT 'b' given_name, sysdate - 1 other_column from dual UNION ALL
  4      SELECT 'c' given_name, sysdate  other_column from dual
  5  )
  6  SELECT
  7      given_name,
  8      other_column,
  9      ROW_NUMBER ()
10     OVER (
11        ORDER BY
12           CASE
13              WHEN :p_spv_sort_by IS NULL THEN given_name
14              WHEN :p_spv_sort_by = 'some other column' THEN other_column
15           END)
16        ROW_NUM
17  FROM
18      source
19  /
            WHEN :p_spv_sort_by = 'some other column' THEN other_column
ERROR at line 14:
ORA-00932: inconsistent datatypes: expected CHAR got DATE
DTYLER_APP@pssdev2> WITH source AS
  2  (   SELECT 'a' given_name, sysdate - 2 other_column from dual UNION ALL
  3      SELECT 'b' given_name, sysdate - 1 other_column from dual UNION ALL
  4      SELECT 'c' given_name, sysdate  other_column from dual
  5  )
  6  SELECT
  7      given_name,
  8      other_column,
  9      ROW_NUMBER ()
10     OVER (
11        ORDER BY
12           CASE
13              WHEN :p_spv_sort_by IS NULL THEN given_name
14              WHEN :p_spv_sort_by = 'some other column' THEN TO_CHAR(other_column,'YYYYMMDDHH24MISS')
15           END)
16        ROW_NUM
17  FROM
18      source
19  /
G OTHER_COLUMN            ROW_NUM
a 12-SEP-2011 15:04:19          1
b 13-SEP-2011 15:04:19          2
c 14-SEP-2011 15:04:19          3
3 rows selected.HTH
David

Similar Messages

  • My Time Capsule does not work with existing WiFi

    Following a question solved on March 24 by LaPastenague, but gone bad again.
    Apple AirPort Time Capsule
    I felt the need for a physical backup of my data, as I would not completely trust the different clouds. I use, and have used Dropbox for 4-5 years and are very satisfied with that, but I am still not sure if or when a political lunatic will shut off the internet.
    I purchased the Apple AP Time Capsule 2T, because all my other stuff are Apple, and that it's wireless. My old backup is Maxtor 300 GB.
    Since we stay 2-3 weeks on two locations, one in Norway and one in Sweden (two different countries) we must use Mobile Broadband 4G, cables or fibre connections are useless for us, and we don't have it up to the houses. I have one mini router for each country, we bring with us iPhones, iPads, iMac, Apple TV, APExpress. When we pass the boarder I change the mini router, and the system continues working perfect on the WiFi, except the APExpress that needs to be reconfigured,  but then it works.
    The APTC was difficult to make working as it would not accept to be in an existing network, but with good help from the Apple Community, LaPastenague, with forcing the TC connect to the APE with Ethernet cable in bridge mode, ref "My Time Capsule does not work with existing WiFi" from March 24, the problem was solved and all gadgets worked together in a perfect harmony, until we changed location.
    Now, as I have my second WiFi network, and the APExspress is reconfigured, it's like the TC thinks, I am the base boss here, I am not taking orders from APE one more time, and it simply does not work, not only that, it fluctuates all the time.
    I have a slight feeling that the two WiFi bands are making the trouble as during the configuration of the TC sometime the last figure 6 and 7 pops up, and that has something two do with the two different 2,4 and 5 GHZ bands
    So, I am curious if you have any idea ?
    I am thinking of returning the TC if I don't make it work now, but how do I delete all the data that's on it?

    I can deal with the last question first and easily.
    I am thinking of returning the TC if I don't make it work now, but how do I delete all the data that's on it?
    Open the airport utility .. go to the disk tab and select erase.
    When you select erase you will get mulitiple options.
    Quick removes the file table but does not delete the files,, it takes 2min or less.
    A Zero out data is the secure way,, by writing 0 ie low level drive format.
    It can take several hours..
    7 pass will take a week.. not recommended..
    35 pass erase is ridiculous.. it would take a month.. put an ax through the TC. It is quick and better.
    Now, as I have my second WiFi network, and the APExspress is reconfigured, it's like the TC thinks, I am the base boss here, I am not taking orders from APE one more time, and it simply does not work, not only that, it fluctuates all the time.
    The fact that it did work and has now failed might point to faulty unit.
    The only way to tell is reset it properly to factory and start over.
    Universal Factory Reset.. any model TC or AE.
    Unplug your TC/AE from power or turn off at the power point.
    Hold in reset. and power the TC/AE back on..  all without releasing reset and keep holding in for about 10sec. (this is often difficult without a 2nd person or a 3rd arm).
    Release it when the status light flashes rapidly. If it doesn’t flash rapidly you have missed it and try again.
    Note..
    Be Gentle! Feel the switch click on. It has a positive feel..  add no more pressure after that.
    TC/AE will reboot after a couple of minutes with default factory settings and will wipe out previous configurations of the router.
    No files are deleted on the hard disk in a TC.. No reset of the TC deletes files.. to do that you use erase from the airport utility.
    Generally having multiple wireless AP should not cause problems.. but it is better to set channels manually.. so it doesn't go beserk rotating channels.
    Remember to keep all names short, no spaces and pure alphanumeric.
    Sadly though the Apple routers have no logging now and no SNMP and almost nothing to help diagnose a problem, so if it continues .. take it back to apple.. they have given you no other method of fixing it.

  • ITunes 12.1.1 does NOT work with Windows - Fix??

    Hi everyone,
    I had issue after issue with the latest iTunes update (12.1.1) not working on my windows 7. It simply would not lunch when clicking on the shortcut to open.
    After a fair bit of searching I found this alternative version which seemed to do the trick and now it works:
    iTunes 12.1.1.4 for Windows (64-bit - for older video cards) - iTunes64Setup.exe(2015-02-18)

    The "for older video cards" installer - which, like most prior "64 bit" versions of iTunes, is actually a 32 bit application with a 64 bit installer - may be a useful fallback if the full 64 bit version does not install or run correctly.  Although 12.1.1.4 is a major improvement over 12.1.0.71, there are clearly still some lurking incompatibilities with some 64 bit Windows systems/components.  It is, however, a little misleading to say that "iTunes 12.1.1 does NOT work with Windows" - in many cases it works fine without switching to the alternative version.  I have the full 64-bit version of 12.1.1.4 running on three systems - two Windows 7 and one Windows 8.1 - no issues with either installation or operation on any of them.

  • Ipod does not work with new usb

    i got my computer cleaned and a usb 2.0 pci card put in and now my ipod does not work with it, can anyone help

    tell me what you mean and i will tell. i ask the guy in the shop to remove any viruses and put my files in order and also put winzip on, ad-ware se peronal and windows defender. and to install a usb2.0 pci card, so that i can put music onto my ipod faster. is this enough for you

  • Applet does not work with a proxy server.URgent

    Hi,
    I have an asp page being hosted from a IIS server.
    The asp page has an applet which gets data from a server side component which is hosted as a service on the server side.For connection to the server I am using URLConnection object and trying to connect over a TCP connection.
    The problem occurs when I use an proxy in the middle.
    I have changed the browser settings to include the proxy.
    The following is the error I recieve:
    Full :http://172.25.11.63:4590/
    <-------------------------------->
    OPening input stream
    in Run ::::
    ERROR: Created data socket but can't open stream on
    it.172.25.11.63:4590//
    172.25.11.63:4590//
    java.io.FileNotFoundException: 172.25.11.63:4590//
         at com/ms/net/wininet/http/HttpInputStream.connect
         at com/ms/net/wininet/http/HttpInputStream.<init>
         at com/ms/net/wininet/http/HttpURLConnection.createInputStream
         at com/ms/net/wininet/WininetURLConnection.getInputStream
         at TalkClientApplet.rendezvous
         at TalkClientApplet.actionPerformed1
         at TalkClientApplet.start
         at com/ms/applet/AppletPanel.securedCall0
         at com/ms/applet/AppletPanel.securedCall
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.run
         at java/lang/Thread.run
    ...Disconnecting.
    Following is my code.
    url = new URL("http://" + host +":"+i);
    urlconnection = url.openConnection();
    urlconnection.setDoOutput(true);
    urlconnection.setDoInput(true);
    System.out.println("Successfully opened the URL connection at " + "http://" + host + ":" + i );
              System.out.println ("Protocol: " + url.getProtocol());
              System.out.println ("Host :" + url.getHost());     
              System.out.println ("Port :" + url.getPort());
              System.out.println ("File :" + url.getFile() );
              System.out.println ("Full :" + url.toExternalForm());
              System.out.println ("<-------------------------------->");
    os = new BufferedWriter(new OutputStreamWriter(urlconnection.getOutputStream()));
    System.out.println("OPening input stream ");
    // is = new DataInputStream(urlconnection.getInputStream());
         System.out.println(urlconnection.getInputStream());
    is = new DataInputStream(urlconnection.getInputStream());
    The exact place where I get the error is whn i call URLConnection.openInputStream().
    Usually this error comes with a malformed URL.But the same code words without a proxy.Also I am not making any changes to my code in both scenarios that is with or without proxy.
    Please help.This is urgent and a showstopper

    Thanks for your nice solution, but unfortunatelly it does not work with lines longer than 100 chars with Netscape. It works fine with IE and appletviewer too.
    Example:
    I use this code:
    try {
                URL url = new URL(protocol,hostName,portNumber,URLstring);
                InputStream in = url.openStream();
                BufferedInputStream bis = new BufferedInputStream(in);
                StringBuffer input = new StringBuffer(60);
                int c;
                while ((c = bis.read()) != -1){
                    System.out.print((char)c);
                    input.append((char)c);
                bis.close();
                dataFromServer = input.toString();
            catch(Exception ex) {
                ex.printStackTrace();
            }I use input file test.html with exactly 100 chars ('a')
    Netscape Java Console:
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadataFromServer : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaI use input file test.html with exactly 101 chars ('a')
    Netscape Java Console:
    ?JL?yyxk?cedataFromServer : ?

  • Microsof VX 3000 or 6000 Webcam does not work with Lync 2013 under Windows 8.1

    Hi,
    The problem is that i cannot use the Microsoft VX-3000 or VX-6000 with Lync 2013 under Windows 8.1.
    If i go in settings under Video i can see the preview from the webcam just fine, so it works there no problem.
    Wenn i try to enable my camera in a conference it does not work, i get an error: Your video cannot be started.
    Now, there are no Windows 8.1 drivers for the Webcam so i installed the latest Windows 7 drivers. Because of that this webcam does not work with apps, that is fine i understand the driver problem and the way the new apps work.
    But this Webcam works with skype under Windows 8.1 and it works with Lync 2010 client.
    The same Webcam works just fine with Lync 2013 under Windows 7.
    Is there anything i could do so that i get this Webcam to work with Lync 2013 desktop client under Windows 8.1?
    Thanks

    Hi,
    According to your description, it may be caused by driver.
    You can try to install the latest version of Display Driver to fix the display issue.
    Since there is no driver for Windows 8.1, I suggest you wait for updating.
    You can also post a case on Windows 8 forum, thank you for your understanding:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=W8ITProPreRel%2Cw81previtpro&filter=alltypes&sort=lastpostdesc
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Window 10 build 10041 does not work with Intel 82579V Gigabit Ethernet on ASUS motherboard

          
    I originally posted this question here:
    answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_update/window-10-build-10041-does-not-work-with-intel/6729892f-83aa-4822-b20a-ea84f4fd06c7
    and was asked to post it on this forum...
    I updated a computer I have which is a quad core i7 that I built and includes an ASUS motherboard with Intel 82579V Gigabit Ethernet built in. Windows 10 preview 9926 worked fine with this network adapter. Window 10 build 10041 does not, and I have tried
    it twice so far. I even went as far as buying a Thunderbolt-Gigabit Ethernet Adapter (Broadcom, sold by Apple)... and while it installed the driver automatically, it did not work either. Each time you try to view the properties of either of them, it locks
    up or give an error. In fact, doing much of anything with the Intel adapter icon assures you of not being able to do a clean reboot... have to kill power.  I have finally gone back the previous version 9926, which has its issues but no where near as bad
    as not having any network connectivity!  Does anyone have this issue and a workaround? 
    Note, there are two images on the windows 10 preview forum that I posted this question on. I could not post the full link as I was getting a message here that links and graphics are not allowed.

    Thanks Roger, I posted the following yesterday in the other thread (thinking it was this thread - confusing after they moved it here)... It may be that the new driver fixes the issue that 10041 has with it, but I have not tried that yet. If I do I will update
    this... Thanks!
    I have more information about this, which basically exonerates any issue with the Intel 82579V Gigabit Ethernet hardware or software. I have 3 computers with Windows 10 preview so I have multiple angles to see issues from. With this I have found a culprit
    (but I suspect not just the only culprit) in this above mentioned problem...
    10041 build combined with installing (or attempting to install) CISCO VPN Windows 7 64bit 5.0.07.0440-k9 client causes the issue mentioned above. I confirmed this on a completely different machine with a totally different Ethernet adapter. First machine
    is an ASUS motherboard in a tower system I built, with the Intel 82579V Gigabit Ethernet hardware built in. Second machine is a Gateway Laptop from 2008 which has a Marvell Yukon 88E8057 PCI-E Gigabit adapter built in. Build 10041 will work fine with my 2008
    laptop, including the MS VPN client (which I have tested). However, if you attempt to install or even uninstall the Cisco client you will have to do a recovery to a restore point (as I have done twice) in order to get your network working again. Installing
    or attempting to install (because it never even does install properly and times out), CISCO VPN client will render your entire network unusable. Going back to a restore point saved me and I am still running 10041 but I can't use CISCO VPN client any longer.
    I could with build 9926, including on all 3 machines. I now have 9926 on two machines and 10041 on only the 2008 laptop. 
    Hopefully this above information helps someone resolve the issue. I will also mention, even though my network is working on the 2008 laptop, I still can't go into the Control Panel\Network and Internet\Network Connections and right mouse click on the Marvell
    Yukon 88E8057 PCI-E Gigabit adapter icon. I get an error when clicking on Properties menu popup : "An unexpected error has occurred". So something is still up with my network adapter driver or windows software, but it could be a side effect of all
    that has happened with the Cisco software install attempts under 10041.
    Another note: CISCO Anyconnect also has the issue.

  • EPrint does not work with Google Apps for Business (hosted email)

    I have looked up numerous posts, from back into 2011 even, and HP still has not resolved this.
    HP's ePrint does not work with companies using Google Apps for Business (hosted email).
    Our emails come from our domain, but from the servers/DNS of Google, so we wind up getting
    the "550 5.7.1 Command Rehected" error.
    This is a major issue as more and more companies (especially small business owners) are moving away
    from having in-house/Exchange servers, and they are moving toward hosted systems.
    You really need to find a way to stop rejecting emails coming from Google Apps hosted email.
    It's been around 4 years now (looking at previous posts). Why hasn't HP found a resolution to this yet?

    I have brought your issue to the attention of an appropriate team within HP.
    They will likely request information from you in order to look up your case details or product serial number.
    Please look for a private message from an identified HP contact.
    Additionally, keep in mind not to publicly post serial numbers and case details.
    If you are unfamiliar with how the Forum's private message capability works, this post has instructions.
    Aardvark1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!

  • I upgraded Safari in my Mac (10.6.8 Leopard) but the new version does not work with my system so that I now have not a working browser. How can I solve the problem and/or install back my previous Safari version?

    I have upgraded Safari in my Mac, but the new Safari does not work with my system. So I find myself without any working browser. How can I solve this problem and/or install my previous Safari version?

    Reinstall Safari 5.1.10 for OS X 10.6.8: http://support.apple.com/kb/dl1569. Might do the trick.
    But, frankly, I don't think that simply reinstalling the old Safari will work because of all the peripheral, under the hood changes that happen when you upgrade from one version of Safari to another. Reinstalling 5.1.10 may be insufficient to turn back the clock. (This is the moment where a Time Machine or another form of full backup would save your bacon.)
    While you're getting a copy of Safari 5.1.10, get a copy of Firefox (https://www.mozilla.org/en-US/firefox/desktop/), too, so that you have an alternate browser to use as you're sorting matters.

  • Now a few of programs does not work with mountian lion. what to do?

    now a few of programs does not work with mountian lion. what to do?

    espons printer/scanner, toast titanum 5.2.1, intuos 4 wacom, appleworks, already updated ms office & order the upgrade for reunion which I hope it will work. 
    thank you mr michael allbritton for your help!

  • Final Cut Pro does not work with Yosemite. Can it be fixed?

    Final Cut Pro does not work with Yosemite. Can it be fixed?

    Hi Tom, I don't know if you can help me.
    I'm using Final Cut version 10.1.4 with Yosemite 10.10.2 and whenever I open FCP it opens for about 5 seconds (not allowing me to click anywhere) before closing with the message  "Final Cut Pro quit unexpectedly. click reopen to open the application again. This report will be sent to apple automatically." I have tried opening it multiple times and the same thing has been happening over and over again and i've tried everything I could find on the internet and nothing is working.
    HELP.
    Jada.

  • I have recently upgraded my iMac Intel G5 iSight to OS 10.6.8 and now the internal mic does not work with skype or facebook. I can here static when playing back clips. Do I need to update firmware or reload old sys parts

    I have recently upgraded my iMac Intel G5 iSight (iMac5,1) to OS 10.6.8 and now the internal mic does not work with skype or facebook. I can here static when playing back clips. Do I need to update firmware or reload old system parts. I have zapped PRAM. The blue indicator in system audio panel will appear for a second as I slide the bar for internal mic but then it disappears. Is there a fix?

    The sound seems very faint but can here static on playback.

  • Flash player does not work with new ICS Android 4.0.4 OS. Has this problem been addressed?

    Flash player does not work with new ICS Android 4.0.4 OS. Has this problem been addressed? I am using Firefox Beta for android and I also tried just Firefox.

    Please check the Play Store app for any Flash updates and install them if present.

  • Flash player does not work with Ie or Firefox with win 8.1?

    Flash player does not work with Ie or Firefox with win 8.1 64, If i try and play a video I get the message to install Flashplayer.
    If I try and install it it says it is already installed. Your onsite  installer says it is not applicable to my machine.
    I have followed all the normal steps re enabling addons and active filters etc.
    all to no avail Pc is Dell 6 months old, Flashplayer has never worked on this machine. Last MS update mid Dec 2014.
    Version of flashplayer is 15....03.......

    Flash Player is a built-in component of Internet Explorer.  There's nothing separate to download or install.
    Firefox requires a different version of Flash Player (the NPAPI plug-in), which will be served to you if you go here: http://get.adobe.com/flashplayer using Firefox; however, there are some unique stability issues related to Firefox on Win8.1, and you're probably better off using Google Chrome if you want a more optimal experience with Flash Player.
    For problems where IE isn't being detected by sites that require Flash:
    First, confirm that ActiveX Filtering is configured to allow Flash content:
    https://forums.adobe.com/thread/867968
    Internet Explorer 11 introduces a number of changes both to how the browser identifies itself to remote web servers, and to how it processes JavaScript intended to target behaviors specific to Internet Explorer. Unfortunately, this means that content on some sites will be broken until the content provider changes their site to conform to the new development approach required by modern versions of IE.
    You can try to work around these issues by using Compatibility View:
    http://windows.microsoft.com/en-us/internet-explorer/use-compatibility-view#ie=ie-11

  • Home sharing does not work with new mountain lion update.

    home sharing does not work with new mountain lion update. Does anyone else have the same issue. Updated all computers in my home, deauthorized and reauthorized each computer. turn off home sharing and turned it back on. don't know what else to do..please help...

    Our Apple TVs continue to lose connection ever since installing Mountain Lion on the host computer. The only thing that fixes them is to quit and relaunch iTunes, which only works unti the ATV goes to sleep. If a movie is paused for more than a few minutes and the ATV goes to sleep, pressing play again on the remote is greeted with "There are no movies on this computer" or "Turn on Home Sharing."
    If we stop a video on one ATV and attempt to resume it in another room, the error begins again. The other ATV can't connect until iTunes is relaunched.
    My guess is that it has something to do with the new [annoying] security settings. But I still haven't found a fix other than restarting iTunes everytime we want to watch something from our downloads. Fail.

Maybe you are looking for