Automator Sorting Help

I'm trying to automate a particular function using Automator. I am hoping to take the entire contents of one folder and sort them to seperate folders of no more then 500MB each in total size. Each folder can be generically named as it is generated, but that max  total size of the folder is what's important. In looking at the selection list within Automator, I can't seem to figure out how to make this particular sort happen?
Any help with this would be super appreciative.
Thanks again.

j. patrick wrote:
I cannot get the subject line part to work. I drag the variable to the subject line and it adds a whole new process undernieth.
Can you post a screen shot of the workflow?

Similar Messages

  • RoboHelp Office Pro - Automated offline help?

    The summary of features for RoboHelp Office Pro lists
    "automated offline help" as a feature but I can't find anything
    about how this works. We plan to publish our WebHelp Pro project to
    a server using RoboEngine but would like users to be able to fall
    back on a local copy of the help files. Any ideas what this listed
    feature really means?

    Hi EmmaG2 and welcome to our community
    Unless I'm mistaken, you are referring to a feature known as
    "airplane help". This is something your developers would do. I have
    no idea how to set this up, but as I understand it, you create a
    compiled .CHM version of your help system. The compiled .CHM is
    placed on the user's local hard drive. Then your developer
    configures the call to help so that *IF* the connection to WebHelp
    Pro is unavailable (as would be the case if you were traveling on
    an airplane-hence the term "airplane help") then the call
    automagickally switches to the offline version. How well this works
    in actual use remains to be seen. We often see that RoboHelp's very
    own help often fails users and presents a blank window. And the fix
    is normally to configure RoboHelp HTML to simply always look for
    help locally.
    I can't imagine this would take place without some .DLL in
    the picture that your developers will need to call. Try looking
    inside the help file that ships with RoboHelp HTML. Look in the
    Index using the term: "Airplane Help".
    Hopefully this helps... Rick

  • Automator can help me earn and I need your help

    Hey guys, I am doing a project sort of a thing, where I have to copy the content of a PDF file onto word and do some regular editing work (alignment, paragraph spacing). I am finding it a bit difficult to meet the dead lines, so if you guys could help me out to make an automator application that does this automatically, I would be extremely thankful to you.
    Please respond to show your interest and then I will list out all the commands that I need to follow

    Well.. you can take a look at this PDF for futher help on scripting Word:
    http://download.microsoft.com/download/1/3/e/13e8ae25-78f7-41a8-b252-f09c465ce29 c/word2004applescriptref.pdf
    You could use DropBox to post files here...

  • Movie Library, sorting HELP!!!

    I recently converted home movies and imported them to itunes. One thing that I notice is I can't sort them alphabetically. There is no rhyme or reason to the way that itunes sorts the movie titles. I am familiar with sorting by genre, name, time, etc. etc. but even then itunes does not sort them properly.
    I.e. Genre, then alphabetically.
    In addition I can't add a description, or movie rating to the file.
    Now the purchased movies from itunes seem to organize properly, which might have something to do with the files it self. Who knows? Can anyone help me figure this out?
    Thanks for your help
    CaSandra

    Figured it out..
    Thanks anyway

  • Radix sort help needed

    Can someone please help me with this radix sort on a dictionary (linkedList from the java utils). I am trying to pass the linkedList into an array which the java apis say that you can do with the to.Array() method but I am getting the noninformative cannot resolve symbol. Like the theory here is that one I should be able to pass a linkedList into an array and two, that I should be able to sort the list by calling the substrings(1,MAX_LENGTH) and then do a minus one on the length for the recursive call. However, this is giving me fits at this point and I don't know if I am totally off track and this will never work or if I am just not thinking it through clearly.
    Any help at all would be appreciated greatly...
    import java.util.*;
    public class radixSort
      //  radix sort using linked lists, where radixSort is not
      //  a method of the LinkeList class.
       public void radixSort(LinkedList listA)
       //*******************this is the line that's giving me fits***********************/
       java.util.LinkedList[] objArray = listA.toArray();
       final int MAX_LENGTH  =  8;    //  Strings are no more than 8 characters
       final int RADIX_SIZE = 26;    //  Alphabet has 26 letters
       // Use an array of 26 ArrayLists to groups the elements of the array
       createQueue[] groups = new createQueue[RADIX_SIZE];
       for (int x = 0; x < MAX_LENGTH; x++)
                 for (int i; i < MAX_LENGTH; i++)
                 groups = new createQueue();
              for (int position=MAX_LENGTH; position < 0; position--)
    for (int scan=0; scan < MAX_LENGTH; scan++)
    //ListIterator iter1 = listA.listIterator();
    String temp = String.valueOf (listA[scan]);
    String letter = temp.substring(0, position);
    groups[letter].enqueue ((listA[scan]));
    // gather numbers back into list
    int num = 0;
    for(int d=0; d<MAX_LENGTH; d++)
    while (!(groups[d].isEmpty()))
    numObj = groups[d].dequeue();
    listA[num] = numObj.intValue();
    num++;
    //****************************Here is the createQueue class...***********************/
    public class createQueue
    * Construct the queue.
    public createQueue( )
    front = back = null;
    * Test if the queue is logically empty.
    * @return true if empty, false otherwise.
    public boolean isEmpty( )
    return front == null;
    * Insert a new item into the queue.
    * @param x the item to insert.
    public void enqueue( Object x )
    if( isEmpty( ) ) // Make queue of one element
    back = front = new ListNode( x );
    else // Regular case
    back = back.next = new ListNode( x );
    * Return and remove the least recently inserted item
    * from the queue.
    public Object dequeue( )
    if( isEmpty( ) )
    //throw new UnderflowException( "ListQueue dequeue" );
              System.out.println("No elements");
    else;
    Object returnValue = front;
    front = front.next;
    return returnValue;
    * Get the least recently inserted item in the queue.
    * Does not alter the queue.
    public Object getFront( )
    if( isEmpty( ) )
    System.out.println("No elements");
    else;
    return front;
    * Make the queue logically empty.
    public void makeEmpty( )
    front = null;
    back = null;
    private ListNode front;
    private ListNode back;
    private void printans()
         if (isEmpty())
         System.out.println("No elements");
         else
         while (back != front)
         System.out.println (front);
         //front++;

    java.util.LinkedList[] objArray = listA.toArray();Impossible! You are going to convert a LinkedList to an array of LinkedList. It's impossible! Or, sheer nonsense, if ever possible.

  • Vector sorting help

    hi, im trying to figure out how to sort the vector objects below in alphabetical order. But i can't figure out how to fix this code
    any help is greatly appreciated. THANKS!!!
    import java.lang.String.*;
    import java.util.Vector;
    public class Test2
    public void hi()
    Vector v = new Vector();
    v.add("Donkey");
    v.add("Dog");
    v.add("Parakeet");
    v.add("Cat");
    v.add("Mule");
    v.add("Horse");
    v.add("Zebra");
    v.add("Lion");
    v.add("Frog");
    v.add("Catepillar");
    v.add("Butterfly");
    v.add("Ostrich");
    for(int i = 0; i < v.size(); i++)
    int o = i;
    int j = i - 1;
    while(j>=0 && j > o)
    v.get(j + 1) = v.get(i);
    j--;
    j + 1 = o;
    //substring(s.indexOf(",") + 2, s.indexOf("[") - 1)
    }

    hi, im trying to figure out how to sort the vector
    objects below in alphabetical order. But i can't
    figure out how to fix this code
    any help is greatly appreciated. THANKS!!!
    import java.lang.String.*;
    import java.util.Vector;
    public class Test2
    public void hi()
    Vector v = new Vector();
    v.add("Donkey");
    v.add("Dog");
    v.add("Parakeet");
    v.add("Cat");
    v.add("Mule");
    v.add("Horse");
    v.add("Zebra");
    v.add("Lion");
    v.add("Frog");
    v.add("Catepillar");
    v.add("Butterfly");
    v.add("Ostrich");
    for(int i = 0; i < v.size(); i++)
    int o = i;
    int j = i - 1;
    while(j>=0 && j > o)
    v.get(j + 1) = v.get(i);
    j--;
    j + 1 = o;
    //substring(s.indexOf(",") + 2, s.indexOf("[") -
    ) - 1)
    }Hi!
    You can't do:
    v.get(j + 1) = v.get(i);
    I think what you want to do is:
    v.set(j+1,v.get(i));
    Read this:
    "set
    public Object set(int�index,Object�element)
    Replaces the element at the specified position in this Vector with the specified element."
    If you have other questions, just say!
    Hope it helps!!!
    Regards,
    ACN

  • Complicated Sort help

    I am try to sort a table of 3 columns and many rows. each row's data have to be in tact. But I would like to sort the first column's data (assuming strings) in ascending order. Then given that, sort the second column with decending order. Then sort the third column with acsending again. or any combinations. How to accomplish this in Java? what is the best logic or tool i should use? arrary of array? or collection? etc...
    any help is appricated!!!
    example:
    (before sort)
    apple 5 red
    watermelon 2 green
    pear 10 yellow
    (after sort first iteration)
    apple 5 red
    pear 10 yellow
    watermelon 2 green
    (after sort 2nd iteration)
    watermelon 2 green
    apple 5 red
    pear 10 yellow
    (third and final result)
    watermelon 2 green
    apple 5 red
    pear 10 yellow
    thanks

    I am doing something similar in my application. I am using a JTable.
    On mouse click on a column header i do the following:
    <code>
    -----Method inside the class having the JTable
    protected void sortAllRowsBy(DefaultTableModel model, int colIndex, boolean ascending)
    data = model.getDataVector();
    Collections.sort(data, new ColumnSorter(colIndex, ascending));
    model.fireTableStructureChanged();
              data=null;
    ------ColumnSorter.java
    import java.util.Vector;
    import java.util.Comparator;
    public class ColumnSorter implements Comparator
    int colIndex;
    boolean ascending;
    ColumnSorter(int colIndex, boolean ascending)
    this.colIndex = colIndex;
    this.ascending = ascending;
    public int compare(Object a, Object b)
    Vector v1 = (Vector)a;
    Vector v2 = (Vector)b;
    Object o1 = v1.get(colIndex);
    Object o2 = v2.get(colIndex);
    // Treat empty strains like nulls
    if (o1 instanceof String && ((String)o1).length() == 0)
    o1 = null;
    if (o2 instanceof String && ((String)o2).length() == 0)
    o2 = null;
    // Sort nulls so they appear last, regardless
    // of sort order
    if (o1 == null && o2 == null)
    return 0;
                   else if (o1 == null)
    return 1;
                   else if (o2 == null)
    return -1;
                   else if (o1 instanceof Comparable)
    if (ascending)
                             try
                                  Double d1=Double.valueOf(o1.toString());
                                  Double d2= Double.valueOf(o2.toString());
                                  return d1.compareTo(d2);
                             catch(Exception e)
                                  // LogFileWriter.writeTextInFile("Exception occured in ColumnSorter: "+ e.toString());
                                  return ((Comparable)o1).compareTo(o2);
                        else
                             try
                                  Double d1=Double.valueOf(o1.toString());
                                  Double d2= Double.valueOf(o2.toString());
                                  return d2.compareTo(d1);
                             catch(Exception e)
                                  // LogFileWriter.writeTextInFile("Exception occured in ColumnSorter: "+ e.toString());
                                  return ((Comparable)o2).compareTo(o1);
                   else
                        System.out.println("not comparable");
    if (ascending)
    return o1.toString().compareTo(o2.toString());
                        else
    return o2.toString().compareTo(o1.toString());
    </code>

  • URGENT SORT HELP NEEDED

    Hey everyone...
    This is VERY time critical....
    Could someone give me a method that uses an Insertion Sort to sort an array of Strings??
    Please help!!!
    Thanks!!
    Lardiop

    Object[] arr = new Object[size];
    Object temp1;
    for(int i=2; i <= arr.length; i++) {
      for(int j=i-1; j > 0; j--) {
        if(arr[j].compareTo(arr[j - 1]) < 0) {
          temp1 = arr[j];
          arr[j] = arr[j - 1];
          arr[j - 1] = temp1;
    }

  • Automator PDF help please?

    I generate a PDF file each day with anywhere from 5-20 pages.  I need to use automator (or something similar) to split this large document into a separate document for each page.  Then rename each new document by the text on the first line (ie. name). Then consolidate all of these documents into 1 folder and zip it so that I can email it out.
    I can split it fine with "PDF to images" and I can automate the consolidation and zip procedure.  However, I can't figure out any way to rename each file to the text on the first line which is the person's name.  Is this possible?  If so, any help with how to do it?
    Thank you!!

    Hello
    You may also try something like the following rubycocoa script. It will split the specified pdf(s) into pages, each of which is named after its first non-empty line, and zip the directory containing the resultant pages. Currently space : / in name is replaced with _.
    #!/bin/bash
    infile=~/desktop/test/*.pdf
    outdir=~/desktop/test/out
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w <<'EOF' - $infile "$outdir"
    #   ARGV = pdf [pdf ...] [output_directory]
    #   * If out_directory is specified and exists, pages of every specified pdf are saved in out_directory and zipped.
    #   Otherwise, pages of each pdf are saved in directory named after pdf followed by "'s pages" in the same directory as pdf and zipped.
    #   v0.10
    #   written by Hiroto, 2014-10
    require 'osx/cocoa'
    OSX.require_framework 'PDFKit'
    include OSX
    def usage
        $stderr.puts "Usage: #{File.basename($0)} pdf [pdf ...] [output_directory]"
        exit 1
    end
    def quoted_form(s)
        #   string s : source string
        #   return string : s's quoted form for use in shell
        #   * e.g., given s = a'b, quoted form of s = 'a'\''b'
        %q['%s'] % s.gsub(/'/) {%q['\'']}
    end
    def zip_j(d)
        d = quoted_form(d)
        %x[zip -j #{d}.zip #{d}/*]
    end
    usage unless ARGV.length > 0
    outdir = File.directory?(ARGV.last) ? ARGV.pop : nil
    usage unless ARGV.length > 0
    ARGV.select { |f| File.file?(f) }.each do |f|
        url = NSURL.fileURLWithPath(f)
        doc = PDFDocument.alloc.initWithURL(url)
        unless doc
            $stderr.puts "Not a pdf file: %s" % f
            next
        end
        odir = outdir ? outdir : (f + "'s pages")
        Dir.mkdir(odir) unless File.directory?(odir)
        (0 .. (doc.pageCount - 1)).each do |i|
            page = doc.pageAtIndex(i)
            line1 = ''
            page.selectionForRange(NSMakeRange(0, page.string.length)).selectionsByLine.each do |q|
                line1 = q.string.to_s.
                    gsub(/^[![:space:]]+|[![:space:]]+\z/, ''). # remove leading and trailing spaces and !
                    gsub(/[[:space:]:\/]/, '_')                 # replace space : / with _
                break if line1.length > 0
            end
            line1 = '_' unless line1.length > 0
            doc1 = PDFDocument.alloc.initWithData(page.dataRepresentation)
            unless doc1.writeToFile(outfile = "#{odir}/#{line1}.pdf")
                $stderr.puts "Failed to write page %d of %s to %s" % [i, f, outfile]
            end
        end
        zip_j(odir) unless outdir
    end
    zip_j(outdir) if outdir
    EOF
    If you'd like to have this as an Automator Service, you may try something like this:
    0) Service input: Services receives selected [PDF files] in [any application].
    1) Run AppleScript aciton
    code =
    on run {argv}
        tell application "System Events"
            activate
            set d to choose folder with prompt "Choose destination folder"
        end tell
        return argv & d
    end run
    2) Run Shell Script action
    shell = /bin/bash
    pass input = as arguments
    code =
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w <<'EOF' - $@"
    #   ARGV = pdf [pdf ...] [output_directory]
    #   * If out_directory is specified and exists, pages of every specified pdf are saved in out_directory and zipped.
    #   Otherwise, pages of each pdf are saved in directory named after pdf followed by "'s pages" in the same directory as pdf and zipped.
    #   v0.10
    #   written by Hiroto, 2014-10
    require 'osx/cocoa'
    OSX.require_framework 'PDFKit'
    include OSX
    def usage
        $stderr.puts "Usage: #{File.basename($0)} pdf [pdf ...] [output_directory]"
        exit 1
    end
    def quoted_form(s)
        #   string s : source string
        #   return string : s's quoted form for use in shell
        #   * e.g., given s = a'b, quoted form of s = 'a'\''b'
        %q['%s'] % s.gsub(/'/) {%q['\'']}
    end
    def zip_j(d)
        d = quoted_form(d)
        %x[zip -j #{d}.zip #{d}/*]
    end
    usage unless ARGV.length > 0
    outdir = File.directory?(ARGV.last) ? ARGV.pop : nil
    usage unless ARGV.length > 0
    ARGV.select { |f| File.file?(f) }.each do |f|
        url = NSURL.fileURLWithPath(f)
        doc = PDFDocument.alloc.initWithURL(url)
        unless doc
            $stderr.puts "Not a pdf file: %s" % f
            next
        end
        odir = outdir ? outdir : (f + "'s pages")
        Dir.mkdir(odir) unless File.directory?(odir)
        (0 .. (doc.pageCount - 1)).each do |i|
            page = doc.pageAtIndex(i)
            line1 = ''
            page.selectionForRange(NSMakeRange(0, page.string.length)).selectionsByLine.each do |q|
                line1 = q.string.to_s.
                    gsub(/^[![:space:]]+|[![:space:]]+\z/, ''). # remove leading and trailing spaces and !
                    gsub(/[[:space:]:\/]/, '_')                 # replace space : / with _
                break if line1.length > 0
            end
            line1 = '_' unless line1.length > 0
            doc1 = PDFDocument.alloc.initWithData(page.dataRepresentation)
            unless doc1.writeToFile(outfile = "#{odir}/#{line1}.pdf")
                $stderr.puts "Failed to write page %d of %s to %s" % [i, f, outfile]
            end
        end
        zip_j(odir) unless outdir
    end
    zip_j(outdir) if outdir
    EOF
    Resulting workflow will look something like this:
    Tested under OS X 10.6.8.
    Good luck,
    H

  • Finder sorting help?

    Hi, I want my finder Organized by 'Type' and sorted by 'Name', but every time I open a new folder I have to manually reset the sorting option, how can I set it by default so that every new windows I open is sorted that way?

    Hi Filippo1,
    If you are interested in setting a preferred Finder view, you may find the following article helpful:
    Mac OS X: How to Save a Finder View (Column, Icon, or List) for a Specific Folder or Disk
    http://support.apple.com/kb/TA20803
    Regards,
    - Brenden

  • Automator/applescript help needed

    Basically I want to use automator and/or applescript to create a script that will add my current MAC address to a text file i specify (in the script) and then have a popup to enter a new one that also gets logged in the text file and then it changes to the new one. I need a way to paste the contents of the clipboard in to a terminal command. How can I do that?

    Note that Discussions has dedicated AppleScript & UNIX forums in Support > Discussions > Mac OS X Technologies & an Automator one in Support > Discussions > Mac OS X v10.5 Leopard. These would be better places to post if you are looking for detailed help with this.
    That said, take a peek at the man page for pbcopy, which provides Terminal access to the Mac clipboard. The "See Also" section has references to developer info for working with the clipboard.
    Message was edited by: R C-R

  • Automating building help

    Hello,
    I've been asked to try and have our help building processes
    completely automated. Currently there is no automation to our
    process - as changes are made to the programs, I create or edit the
    necessary documentation (either from within RH or from Word docs
    and then import them into RH) and then manually create the updated
    help files and save them out to the designated network spot.
    How much of this can be automated? How easy, feasible, and/or
    dependable is such automation?
    I personally don't have a problem with the current process,
    but the manager who asked me sounds adamant about making the
    process automated and my own concern is that trying to automate
    will end up causing more headaches than anything due to the normal
    nature of most software...
    (PS: currently we use RH 5, but we are upgrading to RH
    7).

    Starting with RH6, you have the option of using RoboHelp's
    command line compile, rhcl. I have started using it for our RH6
    help projects, and am pleased with the results.
    The command line compile allows you to specify an output
    location that is different than the one listed in your SSL, which
    is very convenient.
    There is one bug that you might run into: if you copy the
    source projects to a new location before performing the command
    line compile, there's a path in the project.pss file that does not
    update correctly. It's the Language line. It sometimes (but not
    always
    ) retains its original path. As a result, the rhcl
    process reports a bunch of errors at the end. My workaround was to
    place a replica of the "missing" file (robohhre.lng) in the
    expected location. Kludgy, but it works.
    Using the command line compile, automating your process
    should be do-able. You might have to play with it for a bit to get
    the results you want, but it's pretty straightforward.
    G

  • Automator & Keynote - Help

    I am unable to get automator to create a sequence of slides (one image per slide, or one slide per image) from a group of selected JPG pics.
    I have always been able to select JPG's and order powerpoint to do it, and creates 10, 20, 500 slides, whatever number of JPG's you feed into it, as one slide per image.
    I though the "Create Image Slide" keynote action from Automator, could be used to do this, in the proper workflow. It keeps telling me an "error" message. My workflow, as I tried to use it is:
    1.- "Get specified finder items"
    2.- "Create image slide"
    I have a blank Keynote presentation open in the background while the workflow is running.
    It just does not work, tells me that "cannot get the master for slide one", or something to that effect.
    If somebody is familiar with this please help. I know might not been common, but I use a lot of images in my medical presentations, and do not want to have to create a .ppt presentation and save as .key every time.

    I did not know that, will try it.
    The main reason is because I like to chose files and use the workflow as a finder plug-in, sometimes pics are in different folders and I find myself back and forth
    Will check that out.
    Thanks

  • Hierarchical Query Sort help needed in 9i (9.2.0.6)

    Hello all, hope you guys are far away from IKE (it hit us pretty bad last weekend), anyway come to point
    My requirement is data sorted by name is such a way after parent show its childs (if exists) i.e first sort parents and then by childs within parants
    I am expecting this
    1     BBQU-1
    2     BBQU-1 Sub event 1
    3     BBQU-1 Sub event 2
    10     BBQU-1 Sub event 3
    6     BBQU-1 Birthday
    5     BBQU-1 Advance
    7     BBQU-2
    4     BBQU-2 Sub event
    from
    1     BBQU-1     
    5     BBQU-1 Advance     
    2     BBQU-1 Sub event 1     1
    3     BBQU-1 Sub event 2     1
    10     BBQU-1 Sub event 3     1
    6     BBQU-1 Birthday     
    7     BBQU-2     
    4     BBQU-2 Sub event     7
    Here is the script for table and data.
    create table no_more_ike (event_id number, event_name varchar2(30), subevent_id number);
    insert into no_more_ike values (1, 'BBQU-1', null);
    insert into no_more_ike values (5, 'BBQU-1 Advance', null);
    insert into no_more_ike values (2, 'BBQU-1 Sub event 1', 1);
    insert into no_more_ike values (3, 'BBQU-1 Sub event 2', 1);
    insert into no_more_ike values (10, 'BBQU-1 Sub event 3', 1);
    insert into no_more_ike values (6, 'BBQU-1 Birthday', null);
    insert into no_more_ike values (7, 'BBQU-2', null);
    insert into no_more_ike values (4, 'BBQU-2 Sub event', 7);
    commit;
    Thanks a lot

    Is this OK?
    select
       event_id,
       event_name,
       subevent_id
    from no_more_ike
    start with SUBEVENT_ID is null
    connect by prior EVENT_ID = SUBEVENT_ID
    order by decode(subevent_id, null, event_id, subevent_id) asc;

  • Dynamic sort help needed

    I am trying to implement a dynamic sort using pl/sql procedure
    with two IN params, which tell what column to sort by
    and wich direction. smth. like this
    procedure getEmployees (p_dept_no in employee.dept_no%type,
    p_sortBy in varchar2,
    p_sortDir in varchar2
    p_empl_cur in out emplCur
    ) is
    begin
    OPEN p_empl_cur
    FOR
    SELECT EMP_ID, F_NAME, L_NAME
    FROM EMPLOYEE
    WHERE DEPT_NO=p_dept_no
    ORDER BY p_sortBy p_sortDir ; --> this is the part that does not work
    -- I make sure that the params values are correct
    -- possible p_sortBy values: EMP_ID, F_NAME, L_NAME
    -- and p_sortDir: 'ASC' or 'DESC'
    end getEmployees;
    Thank you in advance.

    Try execute immediate.
    Some thing like this:
    PROCEDURE GETEMPLOYEES (P_DEPT_NO IN EMPLOYEE.DEPT_NO%TYPE,
    P_SORTBY IN VARCHAR2,
    P_SORTDIR IN VARCHAR2
    P_EMPL_CUR IN OUT EMPLCUR
    ) IS
    BEGIN
    OPEN P_EMPL_CUR
    FOR
    SORT_SQL := NULL;
    SORT_SQL := 'SELECT EMP_ID, F_NAME, L_NAME FROM EMPLOYEE'||
    ' WHERE DEPT_NO=P_DEPT_NO '||
    ' ORDER BY '||P_SORTBY||' '||P_SORTDIR||';'
    EXECUTE IMMEDIATE SORT_SQL INTO P_EMPL_CUR;
    Thanks
    Vasu
    I am trying to implement a dynamic sort using pl/sql procedure
    with two IN params, which tell what column to sort by
    and wich direction. smth. like this
    procedure getEmployees (p_dept_no in employee.dept_no%type,
    p_sortBy in varchar2,
    p_sortDir in varchar2
    p_empl_cur in out emplCur
    ) is
    begin
    OPEN p_empl_cur
    FOR
    SELECT EMP_ID, F_NAME, L_NAME
    FROM EMPLOYEE
    WHERE DEPT_NO=p_dept_no
    ORDER BY p_sortBy p_sortDir ; --> this is the part that does not work
    -- I make sure that the params values are correct
    -- possible p_sortBy values: EMP_ID, F_NAME, L_NAME
    -- and p_sortDir: 'ASC' or 'DESC'
    end getEmployees;
    Thank you in advance.

Maybe you are looking for

  • Ipad music search not working properly after updating to iOS 6.1

    I just updated my 3rd generation ipad to iOS 6.1 and search in music app doesn't work now.i search for some song and only a few songs show up, whereas I can find the songs, manually. Even the spotlight search doesn't show all the songs. I have tried

  • Populate Values for Drop Down by Index in Table in Web Dynpro Java

    Hi Experts, I have a table and having a column table cell editor as Drop Down by Index. I have created the table node (tbnode) and child node for DDBI (ddbinode) and set the singleton property for DDBI node to false. I have same local variable node a

  • How to export out the date into the csv file?

    Hi, I had been trying to export out the value of the date to csv file. This is the  script: $strADPath = 'LDAP://dc=test,dc=com' function ConvertLargeIntegerToDate([object]$LargeInteger){ try $int64 = ConvertLargeIntegerToInt64 ($LargeInteger) if ($i

  • Do Leopard && Aiport support WPA ?

    Hi All , I would like to know whether WPA feature (Wi-Fi Protected Access ) has been supported by both wireless network adaptor (Airport) in the MacBook Black and Leopard (OS version - 10.5.2). I have a NETGEAR WPN824 router and would like enable WPA

  • How to clear hung conferences on CUBE

    based on the packet TX/RX show below, these are hung conferences.  Is there a way to clear them without restarting the CUBE? CUBE-A#sh dspfarm dsp active SLOT DSP VERSION  STATUS CHNL USE   TYPE    RSC_ID BRIDGE_ID PKTS_TXED PKTS_RXED 0    12  24.3.6