Another simple enquiry on georaster..

Hi contributors,
In another thread i asked about analysis of Oracle GeoRaster objects. Jeffrey Xie replied that GeoRaster's focus is storage and management not analysis. Replying another forum member, on whether GeoRaster API supports raster algebra or interpolation, Jeffrey said that it does not cover algebra and interpolation. Justin L and Jeffrey later point to ERDAS Imagine and PCI Geomatica.
I hav an interest in using Oracle GeoRaster for multitemporal raster data, and try to come up with some simple (spatiotemporal) queries.
My questions :
1. does this mean that there are no built-in capability or additional feature for algebra and interpolation natively from Oracle ?
2. I am guessing if GeoRaster API does not cover this, then trying to develop application using Java, Oracle JDBC, and GeoRaster API would not help at all. Is this correct ?
3. Also, i am thinking that MapViewer (and Map Builder) is not the tool for this; is this also correct ?
4. Does this lead to tools/package from third parties or "oracle partners" (eg. ERDAS, PCI geomatica) ?
5. Could you please share to me what are the options for what i have in mind ?
I thank you Jeffrey, Justin, and all.
/D
ps: I am a beginner in oracle DBMS and oracle spatial. My experience mainly is gis/RS.

the answers to your question 1, 3 and 4 are all yes. (GeoRaster provides native pixel resamplings (kind of interpolation) during scaleCopy and pyramid generation. But certainly that's not what you want for interpolation.)
But the answer to your question 2 is NO. Your applications would typically run outside the database server as either a middleware server or a thick/thin application. So you always need to use JDBC/ODBC/OCI to connect to database and then better to call GeoRaster API to access the raster data. The GeoRaster API hides all the complexity of the raster database objects and their retrieval etc. It's also good to consider using the MapViewer API depending on your applications. MapViewer handles the database connection part for you as well as some GeoRaster API calls.
So, it comes to your question 5. For that, I wonder what exactly are your goals. Are you an end user doing some development in-house? Or are you developing some products or solutions to sell?
thanks
Jeffrey

Similar Messages

  • Another simple web service w/ database

    hi all, can anyone tell me where i can find another simple web services( w/ database) article just like http://java.sun.com/developer/technicalArticles/WebServices/getstartjaxrpc/
    Thanks

    hi all, can anyone tell me where i can find another
    simple web services( w/ database) article just like
    http://java.sun.com/developer/technicalArticles/WebSer
    vices/getstartjaxrpc/
    ThanksThis tutorial covers Oracle and Apache Axis:
    http://www.orindasoft.com/public/axisdemotwo.php4
    David Rolfe

  • Another simple questions

    Hello friends:
    Another simple question: I need to learn things about Oracle on my desktop.
    My machine runs Windows 98. Oracle has some desktop product of its Database Line?
    For example: Oracle Personal?
    And Oracle Lite? What's the main difference between Oracle Personal and
    Oracle Lite?
    Thank You
    Gracias
    Ing. Pablo Romero
    CORDOBA ARGENTINA

    1. I didn't know the answer to your first question, but I googled it and it says the item is the in-call audio boost.
    http://forums.crackberry.com/f71/flag-icon-47659/
    2. isn't this setting determined by the carrier? So it's not a setting in the phone, but when you call in to your voicemail you can change your options?

  • Another simple classpath problem question

    Hi All
    Yes I know, there are a lots of questions about this matter, but I couldn't found a solution to my problem.
    I have a simple program:
    public class prueba {
            public static void main(String[] args) {
                    System.out.println("Ahi va...");
    }placed in /tmp/javier/prueba.java
    After compiled, I've tried to run it from / and then problems started:
    cd /
    java /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    I said, ok...it could be a classpath problem...then:
    java -cp /tmp/javier/ /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba
    Damn, another try...
    java -cp .:/tmp/javier/ /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    Jesus Christ....may be the last slash....
    java -cp .:/tmp/javier /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    Oh...no.... may be classpath to java classes..
    java -cp .:/usr/java/j2sdk1.4.2_01/lib/jre/:/tmp/javier/ /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    Well, I don't know why this error happens....
    Please, could somebody help me !!!
    Thanks in advance...
    <jl>

    It's not too early to start following the Sun coding
    conventions for Java:
    http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.
    tmlHi
    thanks for your reply.
    Yes, I agree. I use conventions with my programs. But my real problem was with a real application and then I did quickly this simple code to help others to understand the problem and give a fast reply...
    Let me know if that works. (It was fine on my
    machine.) - MODYes it works fine, thanks.... and Damn...Murphys law again, the only option I didn't tried is the solution to my problem... :)
    Thanks again...

  • Another Simple Button

    I have a Dynamic page that is a parts list in a MySQL
    database that I show on a page using PHP in Dreamweaver.
    The page uses a repeat region to list the parts depending on
    what nav link is clicked and what I want to do is add a flash
    button to the repeated region that when clicked will take you to a
    larger view. I have all of this setup and working fine except for
    the flash button.
    For instance when the page is loaded you may see 10 parts
    listed and the button will show up 10 times also, on button next to
    each part listed. I am currently using a simple image as a link to
    the larger view and it works fine. The link looks like this.
    largeview.php?SearchField=<?php echo
    $row_Recordset1['Part']; ?>
    My problem is that flash doesn't read the php in this code:
    "<?php echo $row_Recordset1['Part']; ?>". I need flash read
    the php code so it knows what part number to show.
    Is there any other code that can be used to have Flash read
    the php code?
    I hope I explained this properly and any help would be
    greatly appreciated!

    I guess I don't understand this very well I can't seem to get
    it to work.
    I can get the part # to show on the page using:
    print "myVar=$x";
    but the button link I am trying to use is:
    largeview.php?SearchField="myVar=$x"
    I know this isn't right but the button is just a button using
    the option in Dreamweaver to Insert > Media > Flash Button
    and the only option is a link.
    how should I right the link so that the flash button will
    read it?

  • Another simple SQL question?

    Can someone help me (an SQL novice) optimize this query?
    Assume a table TRANS with four columns ACCOUNT, PURCHASE_DATE,
    ITEM_NUMBER, and QUANTITY. (Fairly self evident names, I hope.)
    I want to create a view that returns the most recent purchase
    date for each account, and the sum of all items purchase on that
    date.
    The following works, but involves a sub-query, which I think
    must be inefficient (the real table I'm working with has about
    20 million rows, returning about 1 million rows and takes
    hours!):
    select unique a.account,
    purchase_date,
    sum(quantity)
    from TRANS a,
    (select account,
    max(purchase_date) as cdate
    from TRANS
    group by account) b
    where a.account = b.account and
    a.purchase_date = b.cdate
    group by a.account;
    A second, similar query is to find the most recent purchase
    date, by account, for each item, and the total quantity of that
    item purchased on that date. But, hopefully, an answer to the
    first question will lead me in the right direction.
    Thanks!
    Bob

    Here is another batch of queries to test. The one on top is the
    only one that is drastically different from your query or
    anything that David already suggested.
    SELECT  account,
            purchase_date,
            total
    FROM    (SELECT   account,
                      purchase_date,
                      SUM (quantity) total,
                      RANK () OVER
                           (PARTITION BY account
                            ORDER BY purchase_date DESC)
                      AS rk
             FROM     trans
             GROUP BY account, purchase_date)
    WHERE    rk = 1
    ORDER BY account
    SELECT   a.account,
             a.purchase_date,
             SUM (quantity) total
    FROM     trans a,
             (SELECT   account,
                       MAX (purchase_date) cdate
              FROM     trans
              GROUP BY account) b
    WHERE    a.account = b.account
    AND      a.purchase_date = b.cdate
    GROUP BY a.account, a.purchase_date
    ORDER BY a.account
    SELECT    account,
              purchase_date,
              SUM (quantity) total
    FROM      trans a
    WHERE NOT EXISTS
              (SELECT 0
               FROM   trans b
               WHERE  b.account = a.account
               AND    b.purchase_date > a.purchase_date)
    GROUP BY  account, purchase_date
    ORDER BY  a.account
    SELECT   a.account,
             a.purchase_date,
             SUM (quantity) total
    FROM     trans a
    WHERE    a.purchase_date =
             (SELECT MAX (b.purchase_date)
              FROM   trans b
              WHERE  b.account=a.account)
    GROUP BY a.account, a.purchase_date
    ORDER BY a.account
    SELECT   a.account,
             a.purchase_date,
             SUM (quantity) total
    FROM     trans a
    WHERE    (a.account, a.purchase_date) IN
             (SELECT   b.account,
                       MAX (b.purchase_date)
              FROM     trans b
              GROUP BY b.account)
    GROUP BY a.account, a.purchase_date
    ORDER BY a.account
    SELECT   a.account,
             a.purchase_date,
             SUM (quantity) total
    FROM     trans a
    WHERE    a.purchase_date =
             (SELECT /*+ INDEX_DESC (b my_index) */
                     b.purchase_date
              FROM   trans b
              WHERE  b.account = a.account
              AND    ROWNUM = 1)
    GROUP BY a.account, a.purchase_date
    ORDER BY a.account

  • Another simple bash script to clean pacman cache

    here is a simple script that I have written which cleans pacman cache folder in a way that only the packages which are now "updated" in the repositories, will get removed. This is different from what "pacman -Sc" does. pacman -Sc also removes any package which is not installed, while this script keeps all the packages which are updated whether they are installed or not.
    The functionality is some how like what "apt-get autoclean" does in debian.
    to use this script you need to run it with "list" or "clean" arguments.  you can also use the "help" argument for more help.
    I hope it helps
    #! /bin/bash
    # clcache - This script cleans pacman cache folder in a way that only the packages
    #+ which are now updated in the repositories, will get removed. This is
    #+ different from what "pacman -Sc" does. pacman -Sc also removes any package
    #+ which is not installed, while this script keeps all the packages which are
    #+ updated whether they are installed or not.
    # I have tweaked this script to be as fast as possible, it might still need a
    #+ couple of minutes to compelete based on the size of your cache folder.
    # to use this script you need to run it with "list" or "clean" arguments.
    # you can also use the "help" argument for more help.
    # This script is written by "Ali Mousavi". Please report bugs to [email protected]
    DIR="/var/cache/pacman/pkg" #the default directory of pacman cache.
    ROOT_UID=0 #Only users with $UID 0 have root privilages.
    TMPFILE="/tmp/cache.tmp"
    # Run as root
    if [ "$UID" -ne "$ROOT_UID" ]
    then
    echo "Must be root to run this script"
    exit 1
    fi
    # Check for the arguments
    if [ -z "$1" ]
    then
    echo -e 'What should I do?\nValid Argument are "list", "clean" or "help"'
    exit 1
    elif [ "$1" = "list" ]
    then
    ACTION="ls"
    MESSAGE="Are you sure you want to continue?"
    elif [ "$1" = "clean" ]
    then
    ACTION="rm -vf"
    MESSAGE="Are you sure you want to remove outdated packages? This process can not be undone!"
    elif [ "$1" = "help" -o "$1" = "-h" -o "$1" = "--help" ]
    then
    echo -e "This script checks the packages in your pacman cache directory and removes the packages that are outdated. It doesn't matter if the package is installed or not.\n\n3 arguments can be passed to the script:\n\nlist:\n\tchecks for package that are outdated and prints the names.\n\nclean:\n\tremoves outdated packages.\n\nhelp,-h,--help:\n\tprints this help text.\n\nThis script is written by \"Ali Mousavi\". Please report bugs to [email protected]"
    exit 0
    else
    echo 'Valid Argument are "list", "clean" or "help"'
    exit 1
    fi
    # Check if the user is sure!
    echo "This might take a while based on the amount of cached packages."
    echo -n "$MESSAGE(y/n) "
    read ANS
    if [ $ANS = "y" -o $ANS = "Y" -o $ANS = "yes" ]
    then
    echo "Processing packages..."
    elif [ $ANS = "n" -o $ANS = "N" -o $ANS = "No" ]
    then
    echo "Exiting on user request"
    exit 0
    else
    echo "Invalid answer"
    exit 1
    fi
    # Process the packages
    cd $DIR #change to cache directory.
    pacman -Sl | awk '{ print $2" "$3; }' > $TMPFILE
    for f in $(ls $DIR)
    do
    pname=$(file $f | cut -d: -f1) #Produces filename, like: fetchmail-6.3.19-1-i686.pkg.tar.xz"
    spname=$(echo $pname | sed 's/-[0-9][0-9]*.*//g') #removes package version: fetchmail
    pver=$(echo $pname | sed 's/.*-\([0-9\-\.][0-9\-\.]*-[0-9\-\.][0-9\-\.]*\).*/\1/g') #using pacman -Qi for all files takes a lot of time.
    if [ $(echo $pver | grep '[^0-9\-\.\-\-]' | wc -l) != 0 ] #checks if package version is alright
    then
    pver=$(pacman -Qpi $f | grep Version | awk '{print $3}')
    fi
    newpver=$(grep -e "^$spname " $TMPFILE | awk '{ print $2 }')
    if [[ $newpver != $pver ]]
    then
    $ACTION $f
    fi
    done
    rm -f $TMPFILE
    echo "Outdated packages processed successfully!"
    exit 0
    Last edited by tuxitop (2011-09-13 09:24:26)

    tuxitop wrote:# Check for the arguments
    if [ -z "$1" ]
    then
    echo -e 'What should I do?\nValid Argument are "list", "clean" or "help"'
    exit 1
    elif [ "$1" = "list" ]
    then
    ACTION="ls"
    MESSAGE="Are you sure you want to continue?"
    elif [ "$1" = "clean" ]
    then
    ACTION="rm -vf"
    MESSAGE="Are you sure you want to remove outdated packages? This process can not be undone!"
    elif [ "$1" = "help" -o "$1" = "-h" -o "$1" = "--help" ]
    then
    echo -e "This script checks the packages in your pacman cache directory and removes the packages that are outdated. It doesn't matter if the package is installed or not.\n\n3 arguments can be passed to the script:\n\nlist:\n\tchecks for package that are outdated and prints the names.\n\nclean:\n\tremoves outdated packages.\n\nhelp,-h,--help:\n\tprints this help text.\n\nThis script is written by \"Ali Mousavi\". Please report bugs to [email protected]"
    exit 0
    else
    echo 'Valid Argument are "list", "clean" or "help"'
    exit 1
    fi
    1. `echo -e 'foo\nbar\nbaz'` gets long and unreadable quickly. Instead, use here documents:
    cat <<EOF
    What should I do?
    Valid Argument are "list", "clean" or "help"
    EOF
    2. Use a case command, looks cleaner:
    case "$1" in
    list) ... ;;
    clean) ... ;;
    help|-h|--hep) ... ;;
    # Check if the user is sure!
    echo "This might take a while based on the amount of cached packages."
    echo -n "$MESSAGE(y/n) "
    read ANS
    if [ $ANS = "y" -o $ANS = "Y" -o $ANS = "yes" ]
    then
    echo "Processing packages..."
    elif [ $ANS = "n" -o $ANS = "N" -o $ANS = "No" ]
    then
    echo "Exiting on user request"
    exit 0
    else
    echo "Invalid answer"
    exit 1
    fi
    Try:
    read -p "hello: " -r
    echo $REPLY
    And again, `case` should be cleaner in this case.
    # Process the packages
    cd $DIR #change to cache directory.
    pacman -Sl | awk '{ print $2" "$3; }' > $TMPFILE
    While you quoted a lot, you left these two out. "$DIR" and "$TMPFILE" should be quoted, otherwise whitespaces will break the code.
    for f in $(ls $DIR)
    Apart from the same missing quotes, calling `ls` is a waste here. The following is sufficient and (maybe surprisingly) more accurate:
    for f in *
    How is it more accurate? Run this test script:
    #!/bin/bash
    DIR=/tmp/foo
    mkdir -p "$DIR"
    cd "$DIR"
    touch a\ b c$'\n'd
    for i in *; do
    printf '+%s+\n' "$i"
    done
    printf '%s\n' ---
    for i in $(ls $DIR); do
    printf '+%s+\n' "$i"
    done
    Let's not go too far here. Just get the idea.
    do
    pname=$(file $f | cut -d: -f1) #Produces filename, like: fetchmail-6.3.19-1-i686.pkg.tar.xz"
    Calling `file` here is, again, unnecessary. Also, filename of a package can contain ":", e.g., vi-1:050325-1-i686.pkg.tar.xz, which breaks your code.
    Don't complicate things:
    pname=$f
    spname=$(echo $pname | sed 's/-[0-9][0-9]*.*//g') #removes package version: fetchmail
    Broken for ntfs-3g-2011.4.12-1-i686.pkg.tar.xz, nvidia-173xx-utils-173.14.31-1-i686.pkg.tar.xz, etc...   Something less lousy:
    sed 's/\(-[^-]\+\)\{3\}$//' <<< "$pname"
    pver=$(echo $pname | sed 's/.*-\([0-9\-\.][0-9\-\.]*-[0-9\-\.][0-9\-\.]*\).*/\1/g') #using pacman -Qi for all files takes a lot of time.
    Although this might work for now, this would break if we had an architecture that starts with a digit, e.g. 686.  Something less lousy:
    sed 's/\(.*\)-\([^-]\+-[^-]\+\)-[^-]\+$/\2/' <<< "$pname"
    if [ $(echo $pver | grep '[^0-9\-\.\-\-]' | wc -l) != 0 ] #checks if package version is alright
    then
    pver=$(pacman -Qpi $f | grep Version | awk '{print $3}')
    fi
    Again, calling `wc` here is a waste. Anyway, why is this check necessary at all?
    newpver=$(grep -e "^$spname " $TMPFILE | awk '{ print $2 }')
    if [[ $newpver != $pver ]]
    then
    $ACTION $f
    fi
    done
    rm -f $TMPFILE
    echo "Outdated packages processed successfully!"
    exit 0
    The post is getting too long, so so much from me. If there's anything you don't understand yet, read bash(1).
    If I sound harsh or anything, don't be discouraged. Just keep reading, keep improving.
    Last edited by lolilolicon (2011-09-13 12:53:04)

  • Another Simple Code Question... Please Help!

    Hi!
    I've stumbled across another problem with my coding, and I'm hoping that someone could help me out again. I've now got two classes, one with the code to draw a button, and the other which invokes the button and does a number of other things.
    I'd like it so each button is assigned to a different sound, but I get these errors when I compile...
    D:\java\Phone.java:8: cannot resolve symbol
    symbol : class AudioClip
    location: class Phone
    private AudioClip sound1;
    D:\java\Phone.java:64: cannot resolve symbol
    symbol : variable myButton1
    location: class Phone
    if (event.getSource() == myButton1)
    Could anyone suggest as to why this is?? Here is the source code (I've trimmed it down for the sake of these pages...)
    >>>>>>>
    import java.awt.*;
    import java.applet.Applet;
    import java.awt.event.*;
    public class Phone extends Applet implements ActionListener {
    private Image image;
    private AudioClip sound1;
    public void init() {
    setLayout(null);
    image = getImage(getDocumentBase(), "phone.jpg");
    sound1 = getAudioClip(getDocumentBase(), "sound.wav");
    PhoneButton myButton1;
    myButton1 = new PhoneButton(322,180, 1);
    add(myButton1);
    myButton1.addActionListener(this);
    public void paint (Graphics g) {
    g.drawImage(image, 0, 0, 700, 530, this);
    super.paint(g);
    public void actionPerformed(ActionEvent event)
    if (event.getSource() == myButton1)
    sound1.play();
    >>>>>>>
    Again, I'm sorry about the indentation.
    Cheers in advance!

    To answer your post...instance variables mean you should put your variable declarations
    just below the class declaration like u have done with this...
    public class Phone extends Applet implements ActionListener {
    private Image image;
    private AudioClip sound1;Just add here...
    PhoneButton myButton1;
    this.
    That would make myButton1 an instance variable.
    sorry, i don't understand. And now, since you've put up dukes for answering your question...you have to reward them
    else they go waste. But only if you thought my reply was helpful to you. The choice is yours.
    cheers.

  • YET ANOTHER SIMPLE QUESTION

    Sorry i couldnt find the answer in the book, mainly because i didnt know where to look,
    im writing a if statement and if the a counter is on a multiple of 8 i want to it to do a specail operation.
    What is the symbol for a multiple of a number i thought it was & or ? but they dont work, any ideas?
    kelvin

    Perhaps you have just jumped from the sea of C ..
    But it doesn't work this way Java ... the expression to be evaluated has to give a result of boolean (true or false).
    Way to help yourself here would be in 2 ways :-
    1) Go back to some basics .. do some reading (shudn't take more than
    a hour) and would be fairly easy too.
    2) In this case, capture the output of C%8 in variable and then check the value of that variable (to be equal to 0) in the 'if' expression.
    Hope this helps ...

  • Xcode Error... Prob another simple problem again...

    I have this code
    bool IsCrouched;
    ICOMMAND(crouch, "D", {
    if(IsCrouched == -1)
    player->eyeheight = 45;
    IsCrouched = -1;
    else if
    player->eyeheight = 25;
    IsCrouched = 0;
    and i get these errors:
    expected constructor, destructor, or type converstion at end of input
    and
    unterminated argument list incoking macro "ICOPMMAND"

    Well, although I don't have the slightest idea of what you are trying to do, I believe the call to the macro is not terminated. Change it to
    ICOMMAND(crouch, "D", {
    if(IsCrouched == -1)
    player->eyeheight = 45;
    IsCrouched = -1;
    else if
    player->eyeheight = 25;
    IsCrouched = 0;
    Hope it helps.

  • Needs another simple fix ! ( Sorry guys i was stuck w/something else! )

    Hi Guys,
    What i m trying to do here is to sum all the transactions of current month from one table and get the balance of highest date of previous month from other table for a specific agent. I only want one single value. I wrote something (below) but it doesn't work. Please help me out; thnx
    Select (Sum(a.Dollar)+(c.Balance)) Outstanding
    From Sajjad.Agent_Trans a, Sajjad.Agent b, Sajjad.Agent_Payments c
    Where a.Id = b.Id
    And b.Source = c.Source
    And b.Source = 'IQ'
    And c.Pdate = (Select Max(Pdate)
    From Sajjad.Agent_Payments
    Where Source = 'IQ'
    And Pdate Between Last_Day(Add_Months(Sysdate,-2)) + 1
    And Last_Day(Add_Months(Sysdate,-1))
    Group By c.Balance
    Message was edited by:
    imatif
    Nobody dare to take this challenge ! Strange...
    Message was edited by:
    imatif
    Message was edited by:
    imatif
    Message was edited by:
    imatif
    sorry Guys i was stuck with somethng else and i thought that i have given enough intro to my problem. Anyways it was given me NO ROWS SELECTED msg. then i noticed that if i wrote pdate as To_Char(Pdate,'dd/mm/rr') = ... in all my query only than it gives result. But why i have to write like this ? As a side note i m taking input through this select statement (select sysdata into pdate from dual;) in my forms.
    Message was edited by:
    imatif
    Message was edited by:
    imatif

    <quote>
    i noticed that if i wrote pdate as To_Char(Pdate,'dd/mm/rr') = ... in all my query only than it gives result. But why i have to write like this ?
    </quote>
    Look at the constraints on your subquery:
    SELECT   (SUM (a.dollar) + (c.balance)) outstanding
        FROM sajjad.agent_trans a, sajjad.AGENT b, sajjad.agent_payments c
       WHERE a.ID = b.ID
         AND b.SOURCE = c.SOURCE
         AND b.SOURCE = 'IQ'
         AND c.pdate =
               (SELECT MAX (pdate)
                  FROM sajjad.agent_payments
                 WHERE SOURCE = 'IQ'
                   AND pdate BETWEEN LAST_DAY (ADD_MONTHS (SYSDATE, -2)) + 1
                                 AND LAST_DAY (ADD_MONTHS (SYSDATE, -1)))
    GROUP BY c.balance;Examine the values you're looking between:
    SQL> SELECT to_char(LAST_DAY (ADD_MONTHS (SYSDATE, -2)) + 1, 'yyyy-mm-dd hh24:mi:ss') AS d1,
      2         to_char(LAST_DAY (ADD_MONTHS (SYSDATE, -1)), 'yyyy-mm-dd hh24:mi:ss') AS d2
      3    FROM dual;
    D1                  D2
    2005-08-01 09:42:06 2005-08-31 09:42:06When you perform your to_char() conversion you're throwing away the hours/minutes/seconds components of the date. This may be what you're trying to do.
    SELECT   (SUM (a.dollar) + (c.balance)) outstanding
        FROM sajjad.agent_trans a, sajjad.AGENT b, sajjad.agent_payments c
       WHERE a.ID = b.ID
         AND b.SOURCE = c.SOURCE
         AND b.SOURCE = 'IQ'
         AND c.pdate =
               (SELECT MAX (pdate)
                  FROM sajjad.agent_payments
                 WHERE SOURCE = 'IQ'
                   AND pdate >= LAST_DAY (ADD_MONTHS (TRUNC(SYSDATE), -2)) + 1
                   AND pdate < LAST_DAY (ADD_MONTHS (TRUNC(SYSDATE), -1)) + 1
    GROUP BY c.balance;Oh, and it took me a bit to realized that you'd updated your initial post instead of adding a new one. I suspect that many folk look only at the newest posts instead of scrolling though all of the existing ones looking for changes that may have been made to them.

  • HELP - Another simple JMS Problem

    I'm getting:
    JNDI API lookup failed: javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
    javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
    When I try to look up a JMS ConnectionFactory I've defined in Sun App Server. I'm not sure whether the protocol is correct...the documentation says to use "jmsmq" as the protocol, but I get "unsupported protocol" when I try that.
    Here is the code:
    package com.tpc.jms.simpleProducer;
    import javax.jms.*;
    import javax.naming.*;
    import java.util.Hashtable;
    import java.util.Properties;
    public class SimpleJMSTest {
    public static final String PROVIDER_URL = "iiop://localhost:3700";
    public static final String CONTEXT_FAC = "com.sun.jndi.cosnaming.CNCtxFactory";
    public static void main (String argv[]) {
         try {
    Properties properties = new Properties();
    properties.put(Context.PROVIDER_URL, PROVIDER_URL);
    properties.put(Context.INITIAL_CONTEXT_FACTORY, CONTEXT_FAC);
    properties.put(Context.SECURITY_PRINCIPAL, "guest");
    properties.put(Context.SECURITY_CREDENTIALS, "guest");
    properties.put("server.jms-service.init-timeout-in-seconds", "60");
    properties.put("server.jms-service.type", "EMBEDDED");
    properties.put("server.jms-service.start-args", "");
    properties.put("server.jms-service.default-jms-host", "default_JMS_host");
    properties.put("server.jms-service.reconnect-interval-in-seconds",60);
    properties.put("server.jms-service.reconnect-attempts", 3);
    properties.put("server.jms-service.reconnect-enabled", true);
    properties.put("server.jms-service.addresslist-behavior", "random");
    properties.put("server.jms-service.addresslist-iterations", 3);
    properties.put("server.jms-service.mq-scheme","mq");
    properties.put("server.jms-service.mq-service","jms");
    properties.put("server.jms-service.property.instance-name", "imqbroker");
    properties.put("server.jms-service.property.instance-name-suffix", "");
    properties.put("server.jms-service.property.append-version", false);
    properties.put("server.jms-service.property.user-name", "admin");
    properties.put("server.jms-service.property.password", "admin");
    InitialContext initialCtx = new InitialContext(properties);
    ConnectionFactory connectionFactory = null;
    Destination dest = null;
    try {
    connectionFactory = (ConnectionFactory) initialCtx.lookup(
    "jms/ConnectionFactory");
    } catch (Exception e) {
    System.out.println("JNDI API lookup failed: " + e.toString());
    e.printStackTrace();
    System.exit(1);
    catch (Exception e) {
    e.printStackTrace ();
    }

    why iiop?

  • Storing 3D grids in a georaster?

    I have 3D gridded data, with 2 of the dimensions being X and Y (northing/easting, latitude/longitude, etc.) and the third dimension being either elevation or time. I am storing the third dimension as bands in the groraster. It's possible to map the X/Y dimensions to earth positions using the setModelSRID and setWorldFile methods, but what is the best way of associating the actual time or elevation dimension values with the georaster? Right now my georaster just has a bunch of bands, with no information stored indicating what (elevations or times) the bands refer to.
    Thanks
    MikeDW

    MikeDW,
    To indicate "what (elevations or times) the bands refer to", you may consider using the georaster's ID or the Object Layer's ID and/or "description". These are just string types which you can use to describe anything about the georaster. You can call the following procedures and functions:
    SDO_GEOR.setID and SDO_GEOR.getID
    SDO_GEOR.setLayerID and SDO_GEOR.getLayerID (with layer number 0 for the Object layer)
    To associate the actual time or elevation dimension values, you may consider adding a new column in the same georaster table (or any other approach) to store the association (temporal and vertical referencing, in whatever your preferred formula). To access these dimensions, you need to translate your actual time or elevation into band (or layer) numbers and then query against the georaster object, or the reverse. For your reference, another thing you can consider for time is to leverage the simple TRS in GeoRaster by setting the begin and end time:
    SDO_GEOR.setBeginDateTime and SDO_GEOR.getBeginDateTime
    SDO_GEOR.setEndDateTime and SDO_GEOR.getEndDateTime
    regards,
    Jeffrey

  • How to copy procedures and packages from one server to another?

    Hi,
    I have 439 packages and 178 procedures located in one server called MAXWELL.
    I need to copy these objects to another server called TITAN.
    The schema names is SPCBR in both servers.
    So both servers have an instance running with this schema SPCBR.
    SPCBR in TITAN server has their tables with table data which was generated by an export/import process from MAXWELL server.
    However, procedures and packages were not copied by the export/import because I used the clause 'tables'.
    Now, what can I do in order to equalize procedures and packages in both databases? I can't risk in damaging or duplicating data in my database located in TITAN server, ok?
    Thanks,

    Another simple alternative, according to AskTom (http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:454220160386)
    ---------------- getcode.sql ----------------------------
    set feedback off
    set heading off
    set termout off
    set linesize 1000
    set trimspool on
    set verify off
    spool &1..sql
    prompt set define off
    select decode( type||'-'||to_char(line,'fm99999'),
    'PACKAGE BODY-1', '/'||chr(10),
    null) ||
    decode(line,1,'create or replace ', '' ) ||
    text text
    from user_source
    where name = upper('&&1')
    order by type, line;
    prompt /
    prompt set define on
    spool off
    set feedback on
    set heading on
    set termout on
    set linesize 100
    ------------------- eof --------------------------------
    it extracts one procedure, function or package to a file. Thats it. If you
    wanted to get all of the procedures in a schema extracted to the current working
    directory, you would run a script:
    --------------- getallcode ---------------------------
    set termout off
    set heading off
    set feedback off
    set linesize 50
    spool xtmpx.sql
    select '@getcode ' || object_name
    from user_objects
    where object_type in ( 'PROCEDURE', 'FUNCTION', 'PACKAGE' )
    spool off
    spool getallcode_INSTALL.sql
    select '@' || object_name
    from user_objects
    where object_type in ( 'PROCEDURE', 'FUNCTION', 'PACKAGE' )
    spool off
    set heading on
    set feedback on
    set linesize 130
    set termout on
    @xtmpx.sql
    ---------------- eof ---------------------------------
    You can see how to filter on that one by adding to the where clause if you want.
    Just run @getallcode_INSTALL to run all of the scripts...

  • A simple Question about % in CR Chart!

    Hi, I have another simple question.
    When i use SQL to storage data and wanna Crystal Report to display the data in chart using %
    which data type should i use?
    float or string?
    and I found when i use 0.12 as 12% in database , It could not display in Crystal Report line chart normally.
    What should I do??
    Please Help!!!
    Thank you VERY MUCH!!!

    If you have the datatype as string from your database then try adding the string field as a summary field in chart and select maximum instead of count and if you have them in number format then you can directly select the percentage in chart.
    Regards,
    Raghavendra

Maybe you are looking for

  • My iphone 4 is no longer responding to swipes

    My iphone 4 is no longer responding to swipes, but it also won't receive calls or receives pings from Icloud. However it is recognized and can be synced to Itunes. I just can't access my phone anyone have any idea what the problem is? I restored it w

  • Outstanding Invoices Report based on Customers

    Hello everyone, I want to find out which customers have outstanding balances and against which invoices. Can some guide me on how to create such a report. Thanks Huzi

  • How do I write files that aren't text? Like gif, doc, pdf, jpg, etc.

    I don't know how, in java, to write files that are not pure text. I've been using the BufferedReader/Writer but it is not working. Can someone give me some sample code of how I can write file data correctly?

  • My Skype used to have surround sound and now it do...

    I was talking to my mate on skype when suddenly my computer switched off. When i turned it back on and called my mate on skype his voice wasn't surround sound anymore.  I checked everything. Everything else is surround sound but only his voice isn't,

  • Language translation of script

    Hi all,              I am working on a script in english language. I need to translate this script in to different languages. I gone through se63 but I could not understand how to translate. Can anybody help me how to convert the script into differen