Different behaviour in SQL*Plus and PL/SQL

Does anyone know why the following SQL works from the command line in SQL*Plus but results in a syntax error when included within a cursor in a PL/SQL procedure?
SELECT (SELECT 'dummy' FROM dual)
FROM dual;
null

Is this what you require? This works...
declare
cursor cur_dummy is
SELECT d.dum
FROM (
SELECT 'dummy' dum
FROM dual
) d
v_dummy varchar2(30);
begin
open cur_dummy;
fetch cur_dummy into v_dummy;
close cur_dummy;
dbms_output.put_line(v_dummy);
end;
Cheers
BigB
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Aqueel ([email protected]):
In PL/SQL, every SELECT Statement must have a INTO clause. But still It's not working. Anyother know the answer?
<HR></BLOCKQUOTE>
null

Similar Messages

  • JComboBox - different behaviour in 1.3 and 1.4

    I have noticed that there is a difference in JCombobox behaviour in 1.3 and 1.4.
    I think it is better to give the program than explaining the issue.
    the below given program shows the difference.
    import javax.swing.* ;
    import java.awt.* ;
    import java.awt.event.* ;
    import java.util.* ;
    * Test program to show difference between
    * Combo behaviour in java1.3 and 1.4
    public class CTest extends JFrame
         private JComboBox combo1 ;
         private JComboBox combo2 ;
         public CTest()
              super() ;
         public void init()
         combo1 = new JComboBox() ;
              combo1.addItemListener( new ItemListener()
                        public void itemStateChanged( ItemEvent event )
                        if (null != combo1.getSelectedItem() && event.getStateChange() == ItemEvent.SELECTED)
                             loadCombo2(combo1.getSelectedIndex()+1) ;
         combo2 = new JComboBox() ;
              combo2.addItemListener( new ItemListener()
                        public void itemStateChanged( ItemEvent event )
                        if (null != combo2.getSelectedItem() && event.getStateChange() == ItemEvent.SELECTED)
                             System.out.println("Combo2 item selected : "+ combo2.getSelectedItem()) ;
              JPanel panel = new JPanel(new BorderLayout()) ;
              panel.add(combo1,BorderLayout.NORTH) ;
              panel.add(combo2,BorderLayout.SOUTH) ;
              getContentPane().add(panel) ;
         public void loadCombo1()
              combo1.removeAllItems() ;
              for (int iCount = 0 ; iCount <5 ; iCount++)
                   String strItem = "Item : "+iCount ;
              combo1.addItem(strItem) ;
              try
                   combo1.setSelectedIndex(0) ;
              catch(Exception e)
         private void loadCombo2(int itemCount)
              combo2.removeAllItems() ;
              for (int iCount = 0 ; iCount <itemCount ; iCount++)
                   String strItem = "Item : "+iCount ;
              combo2.addItem(strItem) ;
              try
                   combo2.setSelectedIndex(0) ;
              catch(Exception e)
         public static final void main(String args[])
              CTest app = new CTest() ;
              app.init() ;
              app.setSize(100,100) ;
              app.setVisible(true) ;
              app.loadCombo1() ;
    In jdk1.3 every time you change the selection in combo 1 there will be selection change in combo 2 also. but not in jdk1.4.
    i am not sure whether it is a bug. But surely te behaviour is different.
    any comments on this issue???

    Anil,
    I've just noticed this as well, so I had a quick look at the 1.4 sources. Quite simply, adding and removing items in a JComboBox will never fire an ItemStateChangedEvent, even if the selected item does change.
    The culprits are intervalAdded() and intervalRemoved() in JComboBox.java. Under 1.3 these methods called contentsChanged() which would then fire an ItemStateChangedEvent if necessary. Under 1.4, these methods are empty. Why? I have no idea. It seems like a bug to me, but can't see anything in the bug database about it. Hope someone from Sun can explain it.
    Regards,
    Peter

  • Different behaviour with non-versioned and versioned jars

    Everything works fine if I do not use the 'version' attribute into my jnlp file.
    Now, I set this version attribute : version="1.2" for example and I rename my jar file into blabla__V1.2.jar (before it was blabla.jar). When I try to execute my application with this configuration I have the following exception :
    JNLPException[category: Erreur de t�l�chargement : Exception: java.io.IOException: HTTP response 404 : LaunchDesc: null ]
    Why this difference between a versioned and non-versioned config. ?
    mailto:[email protected]

    The version based protocol requires you to running a servlet
    that implements the version based protocol. A basic web server
    will only implement the basic protocol. The java web start
    developers pack contains a sample servlet (JNLPDownloadServlet) that can be used to extend your web
    server to implement both version based and jardiff protocals.

  • Different behaviour of Outlook (client) and OWA when sending mails

    Hi everyone,
    we're developing an application which uses the push notifications of the Exchange systems to communicate (and synchronize) with the server.
    We're currently facing the following problem: we want to create a mail in the drafts folder of a user via EWS (working fine) and when the user sends this mail, we want to be notified in order to look for changes made to the mail (in order to keep our own
    "mail object" updated). The problem is, the Outlook client is sending a move-Notification from Draft to Sent Items whereas the OWA creates a Delete- and a Create-Notification.
    Is there a reason for this difference? Is there a way to change it / is the change planned for future releases? Right now our application is only handling the move-Notification and since this application is running on a server for a number of users, we don't
    want to create too many notification subscriptions which all have the same callback URL.
    Thank you in advance and kind regards,
    Bernd

    It does happen in OWA.
    We do have SP3 installed but we do not have the most recent rollup. We have version 14.03.0181.006 which is according to this article is Update Rollup 5 for Exchange Server 2010 SP3 Per this article, http://technet.microsoft.com/en-us/library/hh135098(v=exchg.150).aspx
    The server performance is certainly questionable, but we haven't gotten very far with upgrading or replacing it and I think something like this would certainly be something we could point to as an example of how the server performance is affecting business
    and the delay it causes. But I was really hoping to get something I could use to definitively point to as evidence of it being a server performance problem. Would you, or anyone who reads this, be able to tell me what the results of that cmdlet indicate?

  • UploadFromStreamAsync have a different behaviour in IIS express and Azure Free WebSites

    I am currently developing a MVC 5 web application. I am facing
    a problem when uploading a blob (azure blob storage) in async. My async controller ActionResult use this code: 
    [HttpPost]
    [ValidateAntiForgeryToken]
    public async Task<ActionResult> Index(file model)
    BlobStorageService blobStorageService = new BlobStorageService();
    CloudBlobContainer blobContainer = await blobStorageService.GetCloudBlobContainer();
    CloudBlockBlob blob = blobContainer.GetBlockBlobReference("video.mp4");
    blob.Properties.ContentType = model.Video.ContentType; await blob.UploadFromStreamAsync(model.Video.InputStream); return View();
    Everything works fine asynchronously on IIS Express but not when I deploy it on Windows Azure Free Websites, UploadFromStreamAsync stop working asynchronously.
    Any idea?

    I am currently developing a MVC 5 web application. I am facing a problem when uploading a blob (azure blob storage) in async. My async
    controller ActionResult use this code: 
    [HttpPost]
    [ValidateAntiForgeryToken]
    public async Task<ActionResult> Index(file model)
    BlobStorageService blobStorageService = new BlobStorageService();
    CloudBlobContainer blobContainer = await blobStorageService.GetCloudBlobContainer();
    CloudBlockBlob blob = blobContainer.GetBlockBlobReference("video.mp4");
    blob.Properties.ContentType = model.Video.ContentType; await blob.UploadFromStreamAsync(model.Video.InputStream); return View();
    Everything works fine asynchronously on IIS Express but not when I deploy it on Windows Azure Free Websites, UploadFromStreamAsync stop working asynchronously.
    Any idea?

  • Different behaviour of j_security_check between 6.1 and 8.1

    Hi,
    we have a web-application that is secured via security-constraints in
    the web.xml. We are authenticating using FORM-based authentification and
    had this app deployed on a wls6.1. Now we have moved to 8.1 and have a
    different behaviour between 6.1 and 8.1 for log-in forms using the
    j_security_check. We have login-boxes on most pages:
    <form method="POST" action="j_security_check">
                                  Username<br><input type="text" name="j_username" size=11
    class="texteingabe"><br>
                                  Password<br><input type="password" name="j_password" size=8
    class="texteingabe"> <input type=image
    src="/dvrWebApp/htdocs/images/pfeil_rechts_hi.gif" border=0><br>
    </form>
    that on 6.1 redirected after the login to the page they were placed on -
    on 8.1 the login redirects to the root of the web-app, regardless of the
    page they are placed- can i change this back to the old 6.1-Behaviour?!
    cheers
    stf

    This sounds like bollocks, I was doing some form based security recently under 8.1 and there was no attempt to direct to any page i was not trying to access.
    The idea is you try to access a protected resource, your not authorized, so you are authenticated, then you continue on to that resource.
    Are you sure, that the resource your accessing does not direct you there because of some inbuilt business logic in your JSP/servlet ?

  • Different behaviour inside a Thread

    Hello ,
    I am developing a software to help in automating certain tasks related to certain voice switch , i connect to the switch using ssh . i send commands generally using a button that ptints the content of a textbox into the outputstream . every thing works fine as long as i print the command into the outputstream from the code of the button press event . This hangs the interdace because i have to wait for a specific output format . So i used a Thread to execute the same code so that the interface doesn't hang . The strange thing is after the thread finishes i am not able to receive any thing from the switch ( although the printing into the output stream doesn't produce any exceptions and this is not the same if i executed the same code without the thread) . The question is why the program has different behaviour inside a thread and outside it ?
    Best Regards ,

    >
    Sounds like this actually is more related to Swing than concurrency (if I'm correct). I think that everything is working, but you are failing to update the UI with the result. You are only allowed to update the UI from the AWT thread, so you probably need to publish the result using invokeLater or use a SwingWorker.

  • Different execution plan in ApEx and SQL/PLUS

    Hi
    I have weird problem with sql query exectuion plans.
    DB version: 10.2.0.1
    ApEx version: 3.1.2
    I have workspace parsed as SCHEMA1.
    I have a view under different schema - SCHEMA2.view1 and a function SCHEMA2.func1.
    I have a query like SELECT * from SCHEMA2.view1 WHERE col1 = SCHEMA2.func1(:bind1)
    "col1" is a indexed column.
    When I execute this query in SQL/PLUS under user SCHEMA1 with the same bind value, then index is used perfectly.
    When I execute this query in ApEx report then index is not used, full scan is performed and hash join is done between the tables used in the view and explain plan shows that a view is formed during execution.
    What can be the reason for such a different behaviour.
    Statistics are freshly calculated, FIRST_ROWS hint doesn't help, using the INDEX hint results only index full scan.
    This happens only if I use a view and pl/sql function together in the query. If I use view with Oracle built in function like NVL instead then it works perfectly. Also when I access directly the same tabels with the same PL/SQL function then the execution plan is perfect. Only if the view and pl/sql function is used together in the query then execution plan is bad.
    It is not a problem of this specific query but, many different other queries with same pattern also. I have tried ApEx versions 3.0, 3.1.1 and 3.1.2.
    At the same time the exectuion plan is good in SQL/PLUS and TOAD.
    Any ideas?
    Best regards,
    jan

    I didn't help. But I rewrote the queries so that there is no database view and PL/SQL function used in the same query. I still don't know the reason for such different behavior, but I just try to accept it and keep in mind for future :)
    Thanks anyway!
    jan

  • SQL Server Management Studio and Native Client different behaviour on delete

    I have a problem with transaction containing insert and delete to same table and some select/insert/update to some other tables. Problematic table has primary key defined as combination of column1 and column2.
    When two different instances using Native Client execute simultaneously this code and make inserts to table then delete part of code causes deadlock. However this doesn't happen when trying this situation in MS SQL Server Management Studio query.
    Is there some option that is missing from Native Client connection string which can cause this different behaviour?

    Hello,
    I don't think there is a difference in the behavior. SSMS uses ADO.NET and that Provider base on the Native Client.
    The difference will be more that way, when the transaction is commited and so the locks released. I guess your application keeps the transaction (much) longer open; you should commit a transaction as soon as possible to avoid long time locks and so
    deadlocks.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • SQL Plus and ODBC w/different database types

    In order to connect to Oracle lite, we go through ODBC in SQL Plus (ex:login/pw@ODBC:polite)
    Can I utilize this method to connect SQL Plus to a SQL Server 7 database and from there run the COPY TO command to copy data into my Oracle database? If so, what do I need to install to make this work? Is there a specific version of SQL Plus that this works with?

    examples:
    - optimizer_mode is 'RULE' when I select using SQL*Plus and 'CHOOSE' when I use SQL*Plus Worksheet.
    - large_pool_size is 32Mb when I select using SQL*Plus and 108Mb when I use SQL*Plus Worksheet.
    etc.

  • SQL*Plus and NLS_DATE_FORMAT

    So, I haven't visited this topic in a long time, so I'm trying to refresh my memory on how everything works ...
    We set our NLS_DATE_FORMAT at the system level ... what ... 4 years ago to 'MM/DD/RR'. Despite the fact that I set this to something more commonly-used than the default of 'DD-Mon-RR', we've adopted the standard of always using TO_DATE() with an explicit format, just in case it's ever changed.
    There were some applications that missed the standard, and now that a driver (for ColdFusion) has been updated, these SQL statements are now failing.
    When I started looking into it, I realized that the system-level default of 'MM/DD/RR' should work fine. But, after experimenting in SQL*Plus and TOAD, I am thinking that either:
    1) the system-level format is not being used
    2) and/or there are login scripts which are setting these to something else
    Coincidentally, both SQL*Plus and TOAD return the exact same query results:
    SQL> select *
         from NLS_INSTANCE_PARAMETERS
         where parameter = 'NLS_DATE_FORMAT';
    PARAMETER                      VALUE
    NLS_DATE_FORMAT                MM/DD/RR
    SQL> select *
         from NLS_SESSION_PARAMETERS
         where parameter = 'NLS_DATE_FORMAT';
    PARAMETER                      VALUE
    NLS_DATE_FORMAT                DD-MON-RRSo I looked into the glogin.sql script (which both tools share), and there's nothing mentioned about the NLS_DATE_FORMAT
    -- Copyright (c) 1988, 2003, Oracle Corporation. 
    -- All Rights Reserved.
    -- NAME
    --   glogin.sql
    -- DESCRIPTION
    --   SQL*Plus global login "site profile" file
    --   Add any SQL*Plus commands here that are to
    --   be executed when a user starts SQL*Plus, or
    --   uses the SQL*Plus CONNECT command
    -- USAGE
    --   This script is automatically run
    -- Used by Trusted Oracle
    COLUMN ROWLABEL FORMAT A15
    -- Used for the SHOW ERRORS command
    COLUMN LINE/COL FORMAT A8
    COLUMN ERROR    FORMAT A65  WORD_WRAPPED
    -- Used for the SHOW SGA command
    COLUMN name_col_plus_show_sga FORMAT a24
    COLUMN units_col_plus_show_sga FORMAT a15
    -- Defaults for SHOW PARAMETERS
    COLUMN name_col_plus_show_param FORMAT a36 HEADING NAME
    COLUMN value_col_plus_show_param FORMAT a30 HEADING VALUE
    -- Defaults for SHOW RECYCLEBIN
    COLUMN origname_plus_show_recyc   FORMAT a16 HEADING 'ORIGINAL NAME'
    COLUMN objectname_plus_show_recyc FORMAT a30 HEADING 'RECYCLEBIN NAME'
    COLUMN objtype_plus_show_recyc    FORMAT a12 HEADING 'OBJECT TYPE'
    COLUMN droptime_plus_show_recyc   FORMAT a19 HEADING 'DROP TIME'
    -- Defaults for SET AUTOTRACE EXPLAIN report
    COLUMN id_plus_exp FORMAT 990 HEADING i
    COLUMN parent_id_plus_exp FORMAT 990 HEADING p
    COLUMN plan_plus_exp FORMAT a60
    COLUMN object_node_plus_exp FORMAT a8
    COLUMN other_tag_plus_exp FORMAT a29
    COLUMN other_plus_exp FORMAT a44
    -- Used to alter the TOAD environment so that users do not have to
    -- use the SET DEFINE OFF command prior to compiling code
    -- Charles Forbes 10.17.2005
    SET scan offIf I expressly go into either tool and execute, the following, setting the format to that already delcared at the system-level:
    alter session set nls_date_format = 'MM/DD/RR'Then these SQL statements start running just fine again.
    There's something that I'm missing in my basic understanding of how this works. I assumed that the driver update for ColdFusion perhaps enabled a different "glogin.sql"-type script equivalent for that tool ... until ... I started checking into how the NLS_DATE_FORMAT is supposed to work ... but isn't. Could someone help me clarify where the hole is in my understanding?
    Thanks,
    Chuck

    chuckers wrote:
    What's the difference, then, between NLS_SESSION_PARAMETERS and NLS_INSTANCE_PARAMETERS in my initial post? The glogin.sql script isn't altering the NLS_DATE_FORMAT for the desktop version of SQL*Plus, so I'm perplexed that the SESSION format differs from the INSTANCE format.NLS_SESSION_PARAMETERS are the NLS parameters that are in force for your particular session (i.e. the particular connection you have). Most client applications cause things like NLS_DATE_FORMAT to be set, overriding the NLS_INSTANCE_PARAMETERS. Instance-level NLS settings are most commonly used only for purely back-end processing (i.e. background jobs scheduled via DBMS_JOB or DBMS_SCHEDULER, etc.) 9 times out of 10, the client application is going to override the instance-level paramters.
    I even opened SQL Developer, and got
    select * from nls_session_parameters where parameter = 'NLS_DATE_FORMAT';
    PARAMETER                      VALUE                                   
    NLS_DATE_FORMAT                DD-MON-RR                               
    1 rows selected
    select * from nls_instance_parameters where parameter = 'NLS_DATE_FORMAT'
    PARAMETER                      VALUE                                   
    NLS_DATE_FORMAT                MM/DD/RR                                
    1 rows selected
    That's not unexpected. Java applications are going to use the Java regional properties at least to specify a date format. SQL Developer has a config option for the date format, so it may well be specifying a different format.
    They're all 3 (Toad, SQL*Plus, TOAD) so suspiciously consistent, that I'm questioning some of the fundamentals of the NLS setup.
    I went ahead and looked via SQL*Plus from the server-side, & things are looking more consistently in-line with my expectations:
    [oracle@dvsrvr13 ~]$ sqlplus forbesc@d13
    SQL*Plus: Release 10.1.0.4.0 - Production on Thu Mar 19 12:44:57 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select * from nls_session_parameters where parameter = 'NLS_DATE_FORMAT';
    PARAMETER                      VALUE
    NLS_DATE_FORMAT                MM/DD/RR
    SQL> select * from nls_instance_parameters where parameter = 'NLS_DATE_FORMAT';
    PARAMETER                      VALUE
    NLS_DATE_FORMAT                MM/DD/RR
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    [oracle@dvsrvr13 ~]$ locate glogin.sql
    /u01/app/oracle/product/10.1.0/db_1/sqlplus/admin/glogin.sql
    [oracle@dvsrvr13 ~]$ more /u01/app/oracle/product/10.1.0/db_1/sqlplus/admin/glogin.sql
    -- Copyright (c) 1988, 2003, Oracle Corporation.  All Rights Reserved.
    -- NAME
    --   glogin.sql
    -- DESCRIPTION
    --   SQL*Plus global login "site profile" file
    --   Add any SQL*Plus commands here that are to be executed when a
    --   user starts SQL*Plus, or uses the SQL*Plus CONNECT command
    -- USAGE
    --   This script is automatically run
    -- Used by Trusted Oracle
    COLUMN ROWLABEL FORMAT A15
    -- Used for the SHOW ERRORS command
    COLUMN LINE/COL FORMAT A8
    COLUMN ERROR    FORMAT A65  WORD_WRAPPED
    -- Used for the SHOW SGA command
    COLUMN name_col_plus_show_sga FORMAT a24
    COLUMN units_col_plus_show_sga FORMAT a15
    -- Defaults for SHOW PARAMETERS
    COLUMN name_col_plus_show_param FORMAT a36 HEADING NAME
    COLUMN value_col_plus_show_param FORMAT a30 HEADING VALUE
    -- Defaults for SHOW RECYCLEBIN
    COLUMN origname_plus_show_recyc   FORMAT a16 HEADING 'ORIGINAL NAME'
    COLUMN objectname_plus_show_recyc FORMAT a30 HEADING 'RECYCLEBIN NAME'
    COLUMN objtype_plus_show_recyc    FORMAT a12 HEADING 'OBJECT TYPE'
    COLUMN droptime_plus_show_recyc   FORMAT a19 HEADING 'DROP TIME'
    -- Defaults for SET AUTOTRACE EXPLAIN report
    COLUMN id_plus_exp FORMAT 990 HEADING i
    COLUMN parent_id_plus_exp FORMAT 990 HEADING p
    COLUMN plan_plus_exp FORMAT a60
    COLUMN object_node_plus_exp FORMAT a8
    COLUMN other_tag_plus_exp FORMAT a29
    COLUMN other_plus_exp FORMAT a44
    [oracle@dvsrvr13 ~]$ So in all, I'm just perplexed by the differences.
    --=cfI'm not surprised that SQL*Plus from the Unix database server is going to have session-level settings that match the instance-level settings because there is probably nothing set in the Unix environment that would override the instance-level settings. There is probably no NLS_LANG or NLS_DATE_FORMAT set as environment variables and probably no central place to look for regional settings. Most applications, particularly Windows and Java apps, are going to have multiple places to look for that sort of information.
    Justin

  • Differance between microsoft sql 7 server and oracle 8

    can anybody give me the exact technical differances between microsoft 7 server and
    oracle8 server ?

    hi,
    below i listed few differences known to me.
    Oracle is a multiplatform rdbms whereas sqlserver is restricted to NT server workstations.
    Oracle does not include the concept of master db. All db runs independently, with their own data files,mem management, and control.
    Sql server has much larger set of fundamental data types than oracle.
    Oracle uses row-level locking whereas sqlserver uses page level locking.
    Oracle is more mature product. It should be used for high throughput and availability and reliable backup and recovery.
    hope it will give u some idea.
    regards,
    arun.

  • How to connect to SQL*Plus and issue a query all in one command?

    Hi everyone,
    Does anyone know of a way to connect to a db with SQL*Plus, and issue a simple query, all with one command?
    I know that I can save a .sql script with a query, then do this:
    sqlplus user/pwd@db @myscript.sql
    But I'm wondering if there's any way to put the actual query right into the connect command, something like:
    sqlplus user/pwd@db "select count(*) from dba_tables;"
    Does anyone know of a way to do this?

    you didn't mention windows or unix. so, here's a link with both
    Re: windows sql script
    it also has a link to another thread on how to deal with the parens when using ehco in dos.

  • Sql Plus and Unicode (or utf-8) characters.

    Hello,
    i have problem with Sql Plus and unicode files. I want to execute Start {filename}, where {filename} is file in unicode format (this file have to contains german and polish characters). But i receive error message. It is possible to read from unicode (or utf-8) file and execute commands from this file)?
    Thanks in advance.
    Pawel Przybyla

    What is your client operating system characterset?

  • Using SQL stored procedures How to get the list of .rar files from e:\Tempbackup directories from the different remote desktop windows server and delete the .rar files which contains the current month and date

    Concept:
    Every month i need to find the list of .rar files from the
    E:/TempBackup directory from the different environments (remote desktop servers) and i need to delete the current month
    .rar files alone from the respective (E:/TempBackup) directory. below is example files structure inside the
    E:/TempBackup.
    example:
    zDROP_2014_08_31_Backups.rar
    zDROP_2014_09_31_Backups.rar
    zDROP_2014_10_31_Backups.rar
    from the above list i need to delete the zDROP_2014_08_31_Backups.rar(current month) file alone and also logs should be capture for this deletion.
    key words for this are zDROP and Current month and date.
    i need a stored procedure for this concept. could you please help on this.

    Hello,
    You can schedule an operating system task (Control Panel -> Schedule task) to either call a batch file or a PowerShell script.
    Please read the following resources for examples:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/61373719-fffb-4d94-bdbe-7d8ed8620b44/delete-filesfolders-on-remote-servers-using-powershell?forum=winserverpowershell
    http://www.networknet.nl/apps/wp/archives/943
    http://jeffwouters.nl/index.php/2011/10/powershell-script-to-delete-files-older-that-a-week/
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

Maybe you are looking for