Passing argstrings[1] to another method

Hello I want to pass argstrings[1] to another method. Other stuff is being passed there to. Before I passed argstrings[1] the other stuff worked, now it does not.
Please tell me why I am getting compilation errors.
Thanks
public static void main(String[] argStrings)
        String filePath = null;
        if(argStrings.length != 0)
             filePath = argStrings[0];
        else
             System.out.println("Enter a directory please");// Else you have to enter a directory
             Scanner scan = new Scanner(System.in);
                filePath = scan.nextLine();
        String copyDate = argStrings[1];
        Date dateToLookFor = new Date(copyDate);
        listFiles(filePath);// this no longer works as of the new log(datetolookfor)
        log(dateToLookFor);// just wanna pass this to the next method
   private static void log(File[] files, Date dateToLookFor)
   {

Well i only get one compile error, cheers.
So please could you help me what i have to do to this mess in order for it to work:
Or just edit the code as I dont think there is much to do:
Thanks
import java.lang.*;
import java.io.*;
import java.util.*;
* This application identifies files which could potentially be archived
* and copied. A file is to be archived if the last modified date is more
* than 100 days ago. A file is to be copied if it has been modified since
* a given time. Only nominated extensions are to be considered. The java.
* util.Calendar class contains relevant methods for comparing times and dates.
* For instance, a command line of: java CrawlerApp Knuth 2005-12-28 php html
* Will nominate for archiving or copying only php or html files in the Knuth
* directory tree. It will only nominate for copying files modified after
* midnight on the 28th of December, 2005.
* The output from this application is two files (called archive.txt and copy.txt)
* containing the names of files to be archived, and those which may be copied.
* The names will follow the convention specified in the create application.
* These two text files must appear in the root directory (Knuth, in this example).
public class Crawler
   public static void main(String[] argStrings)
        String name = null;
        if(argStrings.length != 0)
             name = argStrings[0];
        else
             System.out.println("Enter a directory please");// Else you have to enter a directory
             Scanner scan = new Scanner(System.in);
                name = scan.nextLine();
        String copyDate = argStrings[1];
        listFiles(name, copyDate);
   private static void log(String copyDate, File[] files)
        PrintStream archivePS = null;
        PrintStream copyPS = null;
        try
             archivePS = new PrintStream("archive.txt");
             copyPS = new PrintStream("copy.txt");
             // instantiate cutoff Calendar instance to test files with
               Calendar cutoff = Calendar.getInstance();
               // time now
           Date now = new Date();
               // set cutoff time with current time
               cutoff.setTime(now);
               // subtract 100 days from current time
               cutoff.add(Calendar.DAY_OF_YEAR, -100);//
             Calendar calendar = Calendar.getInstance();
             for(int j = 0; j < files.length; j++)
                  // get last modified time of file
                  long lastModified = files[j].lastModified();
                  // convert lastModified to a date
                  Date lastMod = new Date(lastModified);
                  // set the time for the Calendar instance with lastMod
                  calendar.setTime(lastMod);
                  // test against cutoff Calendar instance variable
                 if(lastMod.before(cutoff.getTime()))
                       archivePS.println(files[j]);
                     if(lastMod.before(cutoff.getTime()))
                          copyPS.println(files[j]);
                     // I will do copy later, just want to see if this works
        catch(FileNotFoundException fnfe)
             System.err.println("Log error: " + fnfe.getMessage());
        catch(IOException ioe)
             System.err.println("I/O exception: " + ioe.getMessage());
   private static void listFiles(String name, String copyDate)
       File f = new File(name);// Try to get a list of files in the directory
       File[] files = f.listFiles();// Make array of all the files in that directory
       log(files, copyDate);
       if(f.isDirectory())// If the argStrings[0] is a directory then do the following
           File[] children = f.listFiles(HTMLfilter);// Make an array of html files
           System.out.println("HTML files in " + name + " directory = " + children.length);
           File[] phpFiles = f.listFiles(PHPFilter);// Make an array of php files
           System.out.println("PHP files in " + name + " directory = " + phpFiles.length);
   private static FileFilter HTMLfilter = new FileFilter()
       public boolean accept(File f)// Accept directory Knuth
           //if(f.isDirectory()) return true;
           String name = f.getName().toLowerCase();
           return name.endsWith("html");
           //if(file is 100 days old)
   private static FileFilter PHPFilter = new FileFilter()
        public boolean accept(File f)
             //if(f.isDirectory()) return true;
             String name = f.getName().toLowerCase();
             return name.endsWith("php");
}

Similar Messages

  • Passing Array to Another Method

    Hello, I created a program with an array in one of the methods. I have been trying to figure out how to correctly pass the array to another method in the same class. I know my problem is in my method delcaration statements. Could someone please show me what I am doing wrong? Please let me know if you have any questions. Thanks for your help.
    import javax.swing.*;
    import java.util.*;
    class Bank1 {
         public static void main(String[] args) {
              Bank1 bank = new Bank1();
              bank.menu();
         //Main Menu that initializes other methods
         public void menu( ) {
              Scanner scanner = new Scanner(System.in);
              System.out.println("Welcome to the bank.  Please choose from the following options:");
              System.out.println("O - Open new account");
              System.out.println("T - Perform transaction on an account");
              System.out.println("Q - Quit program");
              String initial = scanner.next();
              char uInitial = initial.toUpperCase().charAt(0);
              while (uInitial != 'O' && uInitial != 'T' && uInitial != 'Q') {
                   System.out.println("That was an invalid input. Please try again.");
                   System.out.println();
                   initial = scanner.next();
                   uInitial = initial.toUpperCase().charAt(0);
              if (uInitial == 'O') newAccount();
              if (uInitial == 'T') transaction();
         //Method that creates new bank account
         public Person[] newAccount( ) {
              Person[] userData = new Person[1];
              for (int i = 0; i < userData.length; i++) {
                   Scanner scanner1 = new Scanner(System.in);
                   System.out.println("Enter your first and last name:");
                   String name = scanner1.next();
                   Scanner scanner2 = new Scanner(System.in);
                   System.out.println("Enter your address:");
                   String address = scanner2.next();
                   Scanner scanner3 = new Scanner(System.in);
                   System.out.println("Enter your telephone number:");
                   int telephone = scanner3.nextInt();
                   Scanner scanner4 = new Scanner(System.in);
                   System.out.println("Enter an initial balance:");
                   int balance = scanner4.nextInt();
                   int account = i + 578;
                   userData[i] = new Person( );
                   userData.setName               ( name );
                   userData[i].setAddress          ( address );
                   userData[i].setTelephone     ( telephone );
                   userData[i].setBalance          ( balance     );
                   userData[i].setAccount          ( account     );
                   System.out.println();
                   System.out.println("Your bank account number is: " + userData[i].getAccount());
              return userData;
              menu();
         //Method that gives transaction options
         public void transaction(Person userData[] ) {
              System.out.println(userData[0].getBalance());

    Thank you jverd, I was able to get that to work for me.
    I have another basic question about arrarys now. In all of the arrary examples I have seen, the array is populated all at once using a for statement like in my program.
    userData = new Person[50];
    for (int i = 0; i < userData.length; i++) In my program though, I want it to only fill the first array parameter and then go up to the main menu. If the user chooses to add another account, the next spot in the array will be used. Can someone point me in the right direction for doing this?

  • How to pass value from one method to another method

    Hi all,
    I have created a funtion module and i am calling this function module inside a method and it is exporting some value in a table, now i have to pass table value to another method where i have do some thing based upon this values.
    I think there a marco available to move the values from one method to another method.
    Please help me in this issue.
    Regards
    Balaji E.

    Hi,
    Let me make certain assumptions!
    Method 1 - You export the table values
    Method 2 - The method where you need the table values
    Once you create a method from a function module which has tables as one of the export parameters then the code automatically puts in the macro code which looks like : SWC_SET_TABLE CONTAINER 'Table' TABLE.
    The 'Table' in the above code is the container element which is created by the workflow once you use this method and the TABLE (The table that gets filled in the function module) is the variable to code automatically created.
    Now you can use the other function module in the workflow as a background step and pass the values from the 'Table' container to this method using the binding. When you use this then the method automatically has the macro SWC_GET_TABLE CONTAINER 'Table' ITABLE. Here the 'Table' is the same container table you used in the binding and the ITABLE would be the variable you can use in the other function module.
    Hope this helps,
    Sudhi

  • How to pass a internal table used in one method to another method in a view

    hi all,
    Is it possible to pass a internal table from one method to another method in a view??
    If so , kindly help me.

    Hi Bala,
    If you want to pass this internal table between different methods of the same view then write the contents of this internal table to a context node of your view using BIND_TABLE. You can then read the contents of this internal table from the other method using the reference of that node & the GET_STATIC_ATTRIBUTES_TABLE method.
    However if you want to pass the internal table between methods of different views then create a context node at the COMPONENTCONTROLLER level & then do a context mapping of this node to your local views context in both your views. You can follow the same BIND_TABLE & GET_STATIC_ATTRIBUTES_TABLE methods approach.
    Regards,
    Uday

  • Pass a variable from a method to another

    Hello,
    how is it possible to use, in a method, a variable instanciated in another method? None of them is a constructor. I saw many examples in the tutorials with constructors, but there it's different...
    This is a piece of my program:
    String string_;
    String other;
    public String getName()throws IOException{
         byte[] input = new byte[50];
         System.out.println("give string_");
         System.in.read(input);
         String other = new String(input);
         other = other.trim();
         System.out.println("other = "+other);
         return other ;
    public String Native( ){
         System.out.println("other in Native() = "+ other);
         string_ = other;
         return string_;
    When I run it I get the answer:
    other in Native()= null
    So the value I gave to other didn't pass from getName() to Native()...
    How can I do that?

    Your code:
      String string_;
      String other;
      public String getName()throws IOException {
        byte[] input = new byte[50];
        System.out.println("give string_");
        System.in.read(input);
        String other = new String(input);
        other = other.trim();
        System.out.println("other = "+other);
        return other;
      public String Native() {
        System.out.println("other in Native() = "+ other);
        string_ = other;
        return string_;
      }change to:
      String string_;
      String other;
      public String getName()throws IOException {
        byte[] input = new byte[50];
        System.out.println("give string_");
        System.in.read(input);
        String other = new String(input);
        other = other.trim();
        System.out.println("other = "+other);
        return other;
      public String Native(String another_other) {
        System.out.println("other in Native() = "+ other);
        another_other+="\tanother_other";
        string_ = another_other;
        return string_;
      }You'll see the change. You want to pass somthing into Native specifically and change it locally, and see the difference, right? Well this is the way you pass something in.
    ~Bill

  • Passing Tables from one method to another method.

    Hi All,
    I'm creating a Web-Dynpro program in which I wouild like to passing an internal table from one method to another method within the same View. 
    Is this possible?  And if so, how can I set it up.
    Thank you.
    Paul

    Hi Paul ,
    I hope u wud be clear with passing table from one method to another now .U may also wish to see this WIKI
    Link: [Passing table parameters|https://wiki.sdn.sap.com/wiki/display/WDABAP/Passingtableparameterfromoneviewtoanotherview+locally]
    I hope it wud help u .
    regards,
    amit

  • Passing an array from one method to another

    I am passing an array from my "load" method and passing it to be displayed in my "display" method in an applet .
    I made the array a class variable (to be able to pass it to the "display" method).
    The applet runs, but nothing seems to be in the array.The screen says applet started, but nothing else. There does not seem to be any CPU activity.
    Trying to debug this, I have tried to paint the screen during the array build. I never figured out how to do this. So I made this a non applet class, put it in debug, and the array seems to load okay.
    Any help is appreciated.
    This is the applet code:
    import java.applet.Applet;
    import java.awt.*;
    import java.io.*;
    import java.util.*;
    import java.net.*;
    public class urla extends java.applet.Applet
    int par1;
    int i = 1;
    int j = 20;
    int m = 0;
    int k = 0;
    String arr[] = new String[1000];
    String inputLine;
        public void load() throws Exception
          try
            URL mysite = new URL("http://www.xxxxxxxxxxxxxx.html");
           URLConnection ms = mysite.openConnection();
           BufferedReader in = new BufferedReader(
           new InputStreamReader(
           ms.getInputStream()));
             while ((inputLine = in.readLine()) != null)
               arr[m] = inputLine;
               m++;
           in.close();
          catch (MalformedURLException e)
            k++;
        public void display(Graphics screen)
          screen.drawString("THE FOLLOWING HAVE ADDED THEIR BIOS:",5 ,5);
          for (int i = 0; i < 20; i++);
            j = j + 20;
            screen.drawString("output - "
            + arr, 5, j);
            repaint() ;
    }

    String arr[] = new String[1000];is this typing mistake????? because if u did it in
    program as well i don think it will work.. the tag is
    innnside array lenght... hope iam saying this right!!no, he had the bold form tags (b and /b inside square brackets) in his previous non-code tagged post. He carried it over to this post and they caused an error. I highly doubt that they were in his actual program. Just delete them.
    Message was edited by:
    petes1234

  • How to call a java method so I can pass a file into the method

    I want to pass a file into a java method method from the main method. Can anyone give me some help as to how I pass the file into the method - do I pass the file name ? are there any special points I need to put in the methods signature etc ?
    FileReader file = new FileReader("Scores");
    BufferedReader infile = new BufferedReader(file);
    Where am I supposed to put the above text - in the main method or the one I want to pass the file into to?
    Thanks

    It's a matter of personal preference really. I would encapsulate all of the file-parsing logic in a separate class that implements an interface so that if in the future you want to start taking the integers from another source, e.g. a db, you wouldn't need to drastically alter your main application code. Probably something like this, (with an assumption that the numbers are delimited by a comma and a realisation that my file-handling routine sucks):
    public class MyApp{
    public static void main(String[] args){
    IntegerGather g = new FileIntegerGatherer();
    Integer[] result = g.getIntegers(args[0]);
    public interface IntegerGatherer{
    public Integer[] getIntegers(String location);
    import java.io.*;
    public class FileIntegerGatherer implements IntegerGatherer{
    public Integer[] getIntegers(String location){
    FileInputStream fs=null;
    try{
    File f = new File(location);
    fs = new FileInputStream(f);
    byte[] in = new byte[1024];
    StringBuffer sb = new StringBuffer();
    while((fs.read(in))!=-1){
    sb.append(new String(in));
    StringTokenizer st = new StringTokenizer(sb.toString(),",");
    Integer[] result = new Integer[st.countTokens()];
    int count = 0;
    while(st.hasMoreTokens()){
    result[count]=Integer.valueOf(st.nextToken());
    count++;
    catch(IOException e){
    //something sensible here
    finally{
    if(fs!=null){
    try{
    fs.close();
    catch(IOException f){
    return result;
    Once compiled you could invoke it as java MyApp c:\myInts.txt
    Sorry if there are typos in there, I don't have an ide open ;->

  • Reading a variable from one method to another method

    I am pretty new to Java and object code, so please understand if you think I should know the answer to this.
    I wish to pass a variable from one method to another within one servet. I have a doPost method:
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              HttpSession session = request.getSession();
             String userID = (String)session.getAttribute("userID");
             String title = request.getParameter("title");
            PrintWriter out = response.getWriter();
            out.println("userID is ..."+userID);
    } and wish to pass the variable userID to:
      public static void writeToDB(String title) {
             try{
                  String connectionURL = "jdbc:mysql://localhost/cms_college";
                  Connection connection=null;     
                 Class.forName("com.mysql.jdbc.Driver");
                 connection = DriverManager.getConnection(connectionURL, "root", "");
                 Statement st = connection.createStatement();         
                   st.executeUpdate ("INSERT INTO cmsarticles (title, userID) VALUES('"+title+"','"+userID+"')");
             catch(Exception e){
                   System.out.println("Exception is ;"+e);
        }because, at the moment the userID cannot be resolved in the writeToDB method. Thanking you in anticipation.

    Thanks for responding.
    If I replace
    public static void writeToDB(String title)with
    public static void writeToDB(String title, String userID)It throws up an error in the following method
    public void processFileItem(FileItem item) {
              // Can access all sorts of useful info. using FileItem methods
              if (item.isFormField()) {
                   //Map<String, String> formParameters = new LinkedHashMap<String, String>();
                   //String filename = item.getFieldName();
                   //String title = item.getString();
                   //System.out.println("received filename is ... " + filename );
                   //formParameters.put(title, filename);
                   } else {
                      // Is an uploaded file, so get name & store on local filesystem
                      String uploadedFileName = new File(item.getName()).getName();            
                      File savedFile = new File("c:/uploads/"+uploadedFileName);
                      long sizeInBytes = item.getSize();
                      System.out.println("uploadedFileName is " + uploadedFileName);
                      String title = uploadedFileName;
                      System.out.println("size in bytes is " + sizeInBytes);
                      writeToDB(title);
                      try {
                        item.write(savedFile);// write uploaded file to local storage
                      } catch (Exception e) {
                        // Problem while writing the file to local storage
              }      saying there are not enough arguments in writeToDB(title);
    and if I put in an extra argumenet writeToDB(title,String userID);
    again it does not recognise userID

  • How to pass table to in a method as a parameter

    Hi
    I need to pass one table in one method to another method as a parameter.
    ex: it_tab type zvalue(DDIC).
         send_mail( it_tab)like this i need to pass. How to do this.
    Please help me.
    Thanks & Regards
    SUN

    Hello,
    You'll need a table category that has the same structure of your internal table. Suppose you need to pass an internal table of type SCARR: you'll actually pass a parameter of type SCARR_TAB (look for it into tcode SE11).
    Remember that in a OOP scope, you cannot have header line in your internal tables.
    Regards,
    Andre

  • Passing parameters to an SQL method

    Does any one know how could i pass a set of string values and a double to the following method please ??
    public Object executeSQL(final String sql) throws SQLException
                              Object returnValue      = null;
                              Statement statement     = this.connection.createStatement();
                              boolean hasResultSet    = statement.execute(sql);
                              if (hasResultSet)
                              ResultSet rs            = statement.getResultSet();
                              ResultSetMetaData meta  = rs.getMetaData();
                              int numColumns          = meta.getColumnCount();
                              List rows               = new ArrayList();
                              while (rs.next())
                              Map thisRow = new LinkedHashMap();
                              for (int i = 1; i <= numColumns; ++i)
                              String columnName   = meta.getColumnName(i);
                              Object value        = rs.getObject(columnName);
                              thisRow.put(columnName, value);
                              rows.add(thisRow);
                              rs.close();
                              statement.close();
                              returnValue = rows;
                              else
                              int updateCount = statement.getUpdateCount();
                              returnValue     = new Integer(updateCount);
                              return returnValue;
                              }here is the sql statement i want to excute
    INSERT INTO [Receipt$] ([MastInterferenceID], [Name], [Address], [Town], [County], [AmountPaid]) VALUES ('"+mastID+"','"+name+"','"+address+"','"+town+"','"+county+"','"+amount+"');"all these variables are of type String except for amount which is a double ........ and im passing these parameter from another class called "MainMenuGUI"
    The SQL method at the top is part of an connection that enters data to an excel worksheet
    Thanks for taking the time to read this,
    Seanie.

    Does any one know how could i pass a set of string
    values and a double to the following method please ??
    public Object executeSQL(final String sql) throws
    SQLException
    Object returnValue      =
    Object returnValue      = null;
    Statement statement     =
    Statement statement     =
    this.connection.createStatement();
    boolean hasResultSet    =
    boolean hasResultSet    = statement.execute(sql);
    if (hasResultSet)
    ResultSet rs            =
    ResultSet rs            = statement.getResultSet();
    ResultSetMetaData meta  =
    ResultSetMetaData meta  = rs.getMetaData();
    int numColumns          =
    int numColumns          = meta.getColumnCount();
    List rows               =
    List rows               = new ArrayList();
    while (rs.next())
    Map thisRow = new
    Map thisRow = new LinkedHashMap();
    for (int i = 1; i <=
    for (int i = 1; i <= numColumns; ++i)
    String columnName   =
    String columnName   = meta.getColumnName(i);
    Object value        =
    Object value        = rs.getObject(columnName);
    thisRow.put(columnName,
    thisRow.put(columnName, value);
    rows.add(thisRow);
    rs.close();
    statement.close();
    returnValue = rows;
    else
    int updateCount =
    int updateCount = statement.getUpdateCount();
    returnValue     = new
    returnValue     = new Integer(updateCount);
    return returnValue;
    }here is the sql statement i want to excute
    INSERT INTO [Receipt$] ([MastInterferenceID], [Name],
    [Address], [Town], [County], [AmountPaid]) VALUES
    ('"+mastID+"','"+name+"','"+address+"','"+town+"','"+co
    nty+"','"+amount+"');"all these variables are of type String except for
    amount which is a double ........ and im passing these
    parameter from another class called "MainMenuGUI"
    The SQL method at the top is part of an connection
    that enters data to an excel worksheet
    Thanks for taking the time to read this,
    Seanie.Seanie,
    Why dont you use a Prepared Statement ? That way you will be able to input values to the SQL.
    Cheers!
    Jay

  • Passing many values to a method!

    I have many values, say 15, to be passed to another method! What is the best way to do this? Thanks,

    if the word "independant" suggests that they are of
    different types, then they are not!No, I mean it in the sense of not, naturally, being grouped together. Not relating to the same entity.
    Bean is a good idea, but the number of setter &
    getter methods is tedious!It's normal to use some kind of bean for this. It's called a "Data Transfer Object". It's a convenience when you deal with a validation error, since the bean lends itself to repopulating the fields when re-presenting the form.
    In fact it's common to generate forms using a standard set of tab libraries called JSTL, which assume a bean as a DTO.
    Beans are tedious to assemble by hand, but, as has been pointed out, if you use an IDE it will probably generate accessor methods for you one way or another.

  • Passing a resultset to a method

    Hi all,
    I want to pass a resultset object that is scrollable and updateable to a method. THe problem is that, the resultset object in the other method is not scrollable or updateable anymore.
    Eg.
    Statement stat = null;
    ResultSet rs = null;
    stat = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATEABLE);
    rs = executeQuery("SELECT * from table");
    rs.absolute(5); // when i use this, it works fine here, but it won't if i pass rs to another method
    method2(rs);
    // end of this method
    method2(ResultSet rs) {
    absolute(5); //this is where i am told that ResultSet is readonly and not updateable
    OFFCOURSE, ignore the syntax errors and stuff. I would greatly appreciate your help. I really need to figure this out otherwise i would have to rewirte a huge part of my code. Thank you very much

    warnerja is only partially right, it is true that database driver sometimes doesn't support updateable resultset, but my problem was solved by following this link
    http://www.oracle.com/forums/message.jsp?id=396810&pgm=otn&uid=1024413365365 (you have to register with oracle for that)
    for anybody who can't access the above page, the solution is
    instead of doing (SELECT * from abc), do (SELECT abc.* from abc)
    that should solve your problem if its the same as mine.
    HOWEVER, if i have multiple tables and if i do the following as above
    SELECT abc.*, zzz.channel, zzz.channel2, xyz.field1
    FROM abc, zzz, xyz
    the resultset remains readonly, i dont' know why
    ANY IDEAS???????

  • Pass array on to another class

    Hi. Simple question here.
    I have two classes and in one I have an array. I want to pass it on to the other class so I can use the values and stuff there. How do I do that?

    You don't pass things to classes. You pass them to constructors or methods of a class or instance of one.
    If you do this, for example:
    System.out.println("Hello world");
    you are passing a String argument to the println method.
    You can similarly pass your array to a method of some class, if that method accepts an array as a parameter.
    P.S. You're welcome. Obviously you didn't get hit by a bus and couldn't reply with a simple "thank you", as you posted another topic a day or so later than this. But, you're welcome.

  • Passing multiple values to another page via a sql report

    Having trouble passing multiple values to another page via a popup SQL report
    I have two fields one called "descr" and another called "Met"
    when I use the code below all works fine and the value of "descr" is passed
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_TYPE:'
    || descr
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    But when I want to pass another value, all goes bonkers and instead of the value of the field being passed the literal text is passed.
    can someone look at my code below and see what may be wrong
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_TYPE,P950_CODE:'
    || descr, Met
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    I appeciate your help looking into this
    FYI (Here is the entire SQL for reference)
    With t
    as
    (SELECT
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_CPT &gt; :P940_METRIC_1_WCS_CPT1 then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_CPT,'FML999G999G999G999G990D00')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_CPT,'FML999G999G999G999G990D00')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_CPT,'FML999G999G999G999G990D00')||'&lt;/span&gt;' end "WCSCPT",
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_TOI_PER_FTE &lt; :P940_METRIC_2_WCS_TOI_PER_FTE then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_TOI_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_TOI_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_TOI_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end "WCSTOIPERFTE",
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_SIO_PER_FTE &lt; :P940_METRIC_3_WCS_SIO_PER_FTE then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_SIO_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_SIO_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_SIO_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end "WCSSIOPERFTE",
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_TC_PER_FTE &lt; :P940_METRIC_4_WCS_TC_PER_FTE then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_TC_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_TC_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_TC_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end "WCSTCPERFTE",
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_ADSL_PER_FTE &lt; :P940_METRIC_5_WCS_DSL_PER_FTE then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_ADSL_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_ADSL_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_ADSL_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end "WCSADSLPERFTE",
    CASE WHEN KEY = 2 THEN
    TO_CHAR(MONTH,'MON-YY')
    else
    'METRICS'
    end "MONTH"
    FROM (
    SELECT DISTINCT
    ROW_NUMBER() OVER (ORDER BY KEY DESC) AS ROW_NUM, KEY, WCS_CPT, WCS_TOI_PER_FTE, WCS_SIO_PER_FTE, WCS_TC_PER_FTE, WCS_ADSL_PER_FTE, MONTH
    from TW_M_KEYMETRICS
    WHERE TO_DATE(UPPER(MONTH),'DD/MON/YY') &gt;= TO_DATE(UPPER(:P940_START_OF_THIS_FIN_YEAR),'DD/MON/YY')
    ORDER BY KEY ASC, ROW_NUM, MONTH)
    WHERE ROW_NUM &lt;= :P940_MONTHS_SINCE_FIN_START)
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_METRIC_TYPE,P950_METRIC_VALUE:descr,MET'
    || ''
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    , max(Met) METRICS, max(Jul) Jul08, max(Aug) Aug08, max(Sep) Sep08, max(Oct) Oct08, max(Nov) Nov08, max(Dec)Dec08, max(Jan) Jan08, max(Feb) Feb08, max(Mar) Mar08, max(Apr) Apr08, max(May) May08, max(Jun) Jun08
    from (
    Select 'Cost Per Transaction' descr,
    decode (MONTH, 'METRICS', WCSCPT) MET,
    decode (MONTH, 'JUL-08', WCSCPT) Jul,
    decode (MONTH, 'AUG-08', WCSCPT) Aug,
    decode (MONTH, 'SEP-08', WCSCPT) Sep,
    decode (MONTH, 'OCT-08', WCSCPT) Oct,
    decode (MONTH, 'NOV-08', WCSCPT) Nov,
    decode (MONTH, 'DEC-08', WCSCPT) Dec,
    decode (MONTH, 'JAN-08', WCSCPT) Jan,
    decode (MONTH, 'FEB-08', WCSCPT) Feb,
    decode (MONTH, 'MAR-08', WCSCPT) Mar,
    decode (MONTH, 'APR-08', WCSCPT) Apr,
    decode (MONTH, 'MAY-08', WCSCPT) May,
    decode (MONTH, 'JUN-08', WCSCPT) Jun
    from t
    union all
    Select 'Total Orders Issued Per FTE' descr,
    decode (MONTH, 'METRICS', WCSTOIPERFTE) MET,
    decode (MONTH, 'JUL-08', WCSTOIPERFTE) Jul,
    decode (MONTH, 'AUG-08', WCSTOIPERFTE) Aug,
    decode (MONTH, 'SEP-08', WCSTOIPERFTE) Sep,
    decode (MONTH, 'OCT-08', WCSTOIPERFTE) Oct,
    decode (MONTH, 'NOV-08', WCSTOIPERFTE) Nov,
    decode (MONTH, 'DEC-08', WCSTOIPERFTE) Dec,
    decode (MONTH, 'JAN-08', WCSTOIPERFTE) Jan,
    decode (MONTH, 'FEB-08', WCSTOIPERFTE) Feb,
    decode (MONTH, 'MAR-08', WCSTOIPERFTE) Mar,
    decode (MONTH, 'APR-08', WCSTOIPERFTE) Apr,
    decode (MONTH, 'MAY-08', WCSTOIPERFTE) May,
    decode (MONTH, 'JUN-08', WCSTOIPERFTE) Jun
    from t
    union all
    Select 'SIOs Per Billing FTE' descr,
    decode (MONTH, 'METRICS', WCSSIOPERFTE) MET,
    decode (MONTH, 'JUL-08', WCSSIOPERFTE) Jul,
    decode (MONTH, 'AUG-08', WCSSIOPERFTE) Aug,
    decode (MONTH, 'SEP-08', WCSSIOPERFTE) Sep,
    decode (MONTH, 'OCT-08', WCSSIOPERFTE) Oct,
    decode (MONTH, 'NOV-08', WCSSIOPERFTE) Nov,
    decode (MONTH, 'DEC-08', WCSSIOPERFTE) Dec,
    decode (MONTH, 'JAN-08', WCSSIOPERFTE) Jan,
    decode (MONTH, 'FEB-08', WCSSIOPERFTE) Feb,
    decode (MONTH, 'MAR-08', WCSSIOPERFTE) Mar,
    decode (MONTH, 'APR-08', WCSSIOPERFTE) Apr,
    decode (MONTH, 'MAY-08', WCSSIOPERFTE) May,
    decode (MONTH, 'JUN-08', WCSSIOPERFTE) Jun
    from t
    union all
    Select 'Total Calls Answered per FTE' descr,
    decode (MONTH, 'METRICS', WCSTCPERFTE) MET,
    decode (MONTH, 'JUL-08', WCSTCPERFTE) Jul,
    decode (MONTH, 'AUG-08', WCSTCPERFTE) Aug,
    decode (MONTH, 'SEP-08', WCSTCPERFTE) Sep,
    decode (MONTH, 'OCT-08', WCSTCPERFTE) Oct,
    decode (MONTH, 'NOV-08', WCSTCPERFTE) Nov,
    decode (MONTH, 'DEC-08', WCSTCPERFTE) Dec,
    decode (MONTH, 'JAN-08', WCSTCPERFTE) Jan,
    decode (MONTH, 'FEB-08', WCSTCPERFTE) Feb,
    decode (MONTH, 'MAR-08', WCSTCPERFTE) Mar,
    decode (MONTH, 'APR-08', WCSTCPERFTE) Apr,
    decode (MONTH, 'MAY-08', WCSTCPERFTE) May,
    decode (MONTH, 'JUN-08', WCSTCPERFTE) Jun
    from t
    union all
    Select 'ADSL Orders per FTE' descr,
    decode (MONTH, 'METRICS', WCSADSLPERFTE) MET,
    decode (MONTH, 'JUL-08', WCSADSLPERFTE) Jul,
    decode (MONTH, 'AUG-08', WCSADSLPERFTE) Aug,
    decode (MONTH, 'SEP-08', WCSADSLPERFTE) Sep,
    decode (MONTH, 'OCT-08', WCSADSLPERFTE) Oct,
    decode (MONTH, 'NOV-08', WCSADSLPERFTE) Nov,
    decode (MONTH, 'DEC-08', WCSADSLPERFTE) Dec,
    decode (MONTH, 'JAN-08', WCSADSLPERFTE) Jan,
    decode (MONTH, 'FEB-08', WCSADSLPERFTE) Feb,
    decode (MONTH, 'MAR-08', WCSADSLPERFTE) Mar,
    decode (MONTH, 'APR-08', WCSADSLPERFTE) Apr,
    decode (MONTH, 'MAY-08', WCSADSLPERFTE) May,
    decode (MONTH, 'JUN-08', WCSADSLPERFTE) Jun
    from t
    GROUP by descr
    Frank

    Borg Species 5618 wrote:
    Having trouble passing multiple values to another page via a popup SQL report
    But when I want to pass another value, all goes bonkers and instead of the value of the field being passed the literal text is passed.
    can someone look at my code below and see what may be wrong
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_TYPE,P950_CODE:'
    || descr, Met
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    Hi Frank,
    You should close this parameters with single quotation. Try this -
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_TYPE,P950_CODE:'
    *|| 'descr, Met'*
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    Hope this helps.
    Regards,
    M Tajuddin
    http://tajuddin.whitepagesbd.com

Maybe you are looking for

  • How can I put my mp3 files into my iTunes library? Every time I download a song from a website and try to drag it to my library, it won't add on. How can I fix this?

    Back then when I had the older update with iTunes i never had this problem with trying to put my mp3 files of music into my iTunes library. Now it doesn't want to be put into the library. Once I try to drag the music file to the iTunes library nothin

  • Security Reports in Shared Services

    Hi guys, Could you please help me with a simple question (well, I believe it's easy, but I'm not able to answer it... :)) I'd like to give a user the permission to run security reports, but it's seems he has to be "Shared Services admin" to do so. Is

  • I can't login to solaris server using ssh(putty).

    Hi, I can't login to solaris server using ssh(putty). However I am able to login to that server using telnet. # pkginfo | grep -i ssh system SUNWsshcu SSH Common, (Usr) system SUNWsshdr SSH Server, (Root) system SUNWsshdu SSH Server, (Usr) system SUN

  • 3GS 32GB - A Little Disappointed

    Hi all, First off, this phone (3GS 32GB 3.0.1 2 weeks old) has so many plus points that I'll definitely be keeping it. I do have some disappoinments though and, although I thought I'd researched fully (never owned an Apple device before) I'm hoping I

  • Burning Finished- Error #-34506

    i created movie in imovie, then went to idvd, after about a hour or more of encoding and burning the error message popped up "Burning Finished" errors were found during the burning process. the error #-34506 was reported. i spent a day making this im