Explanation of Query

I need the explanation of the below query:
Want to know the use of the Decode function used along with Row_Number, OVER, Partition by, order by and CASE.
DECODE (ROW_NUMBER () OVER (PARTITION BY cust_xref.source_cust_id ORDER BY
CASE
WHEN best_calling_addr_id = cust_addr.addr_id THEN 1
WHEN (best_calling_addr_id <> cust_addr.addr_id AND incentive_addr_id = cust_addr.addr_id) THEN 2
WHEN (best_calling_addr_id <> cust_addr.addr_id AND incentive_addr_id <> cust_addr.addr_id
AND best_mailing_addr_id = cust_addr.addr_id ) THEN 3
WHEN (best_calling_addr_id = best_mailing_addr_id AND best_calling_addr_id = '--') THEN 4
ELSE 5
END,
(DECODE (cust_az_addr.txn_fg, 'U', 1, 'I', 2, 3)), cust_addr.publish_dt DESC), 1, 1, 0 ) AS addr_rank

Hi,
What about reading some oracle doc. about these functions
http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions040.htm
http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions137.htm
HTH

Similar Messages

  • Very Slow Query due to Bitmap Conversion

    I have a strange problem with the performance of a spatial query. If I perform a 'SELECT non_geom_column FROM my_table WHERE complicated_join_query' the result comes back sub-second. However, when I replace the column selected with geometry and perform 'SELECT geom_column FROM my_table WHERE same_complicated_join_query' the response takes over a minute.
    The issue is that in the second case, despite the identical where clause, the explain plan is significantly different. In the 'select geom_column' query there is a BITMAP CONVERSION (TO ROWIDS) which accounts for all of the extra time, where as in the 'select other_column' query that conversion is replaced with TABLE ACCESS (BY INDEX ROWID) which is near instant.
    I have tried putting in some hints, although I do not have much experience with hints, and have also tried nesting the query in various sub-selects. Whatever I try I can not persuade the explain plan to drop the bitmap conversion when I select the geometry column. The full query and an explanation of that query are below. I have run out of things to try, so any help or suggestions at all would be much appreciated.
    Regards,
    Chris
    Explanation and query
    My application allows users to select geometries from a map image through clicking, dragging a box and various other means. The image is then refreshed - highlighting geometries based on the query with which I am having trouble. The user is then able to deselect any of those highlighted geometries, or append others with additional clicks or dragged selections.
    If there are 2 (or any even number of) clicks within the same geometry then that geometry is deselected. Alternatively the geometry could have been selected through an intersection with a dragged box, and then clicked in to deselect - again an even number of selections. Any odd number of selections (i.e. selecting, deselecting, then selecting again) would result in the geometry being selected.
    The application can not know if the multiple user clicks are in the same geometry, as it simply has an image to work with, so all it does is pass all the clicks so far to the database to deal with.
    My query therefore does each spatial point or rectangle query in turn and then appends the unique key for the rows each returned to a list. After performing all of the queries it groups the list by the key and the groups with an odd total are 'selected'. To do this logic in a single where clause I have ended up with nested select statements that are joined with union all commands.
    The query is therefore..
    SELECT
    --the below column (geometry) makes it very slow...replacing it with any non-spatial column takes less than 1/100 of the time - that is my problem!
    geometry
    FROM
    my_table
    WHERE
    primary_key IN
    SELECT primary_key FROM
    SELECT primary_key FROM my_table WHERE
    sdo_relate(geometry, mdsys.sdo_geometry(2003, 81989, NULL, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array( rectangle co-ords )), 'mask=anyinteract') = 'TRUE'
    UNION ALL SELECT primary_key FROM my_table WHERE
    sdo_relate(geometry, mdsys.sdo_geometry(2001, 81989, sdo_point_type( point co-ords , NULL), NULL, NULL), 'mask=anyinteract') = 'TRUE'
    --potentially more 'union all select...' here
    GROUP BY primary_key HAVING mod(count(*),2) = 1     
    AND
    --the below is the bounding rectangle of the whole image to be returned
    sdo_filter(geometry, mdsys.sdo_geometry(2003, 81989, NULL, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array( outer rectangle co-ords )), 'mask=anyinteract') = 'TRUE'

    Hi
    Thanks for the reply. After a lot more googling- it turns out this is a general Oracle problem and is not solely related to use of the GEOMETRY column. It seems that sometimes, the Oracle optimiser makes an arbitrary decision to do bitmap conversion. No amount of hints will get it to change its mind !
    One person reported a similarly negative change after table statistic collection had run.
    Why changing the columns being retrieved should change the execution path, I do not know.
    We have a numeric primary key which is always set to a positive value. When I added "AND primary_key_column > 0" (a pretty pointless clause) the optimiser changed the way it works and we got it working fast again.
    Chris

  • Index for "group by" statement.

    Hi,
    I have a statement directed at the GLPCP table.
    It sums op the plan number in each month.
    In ABAP it looks like this
    SELECT ryear rprctr racct kostl ps_psp_pnr rfarea
             SUM( hsl01 ) SUM( hsl02 ) SUM( hsl03 )
             SUM( hsl04 ) SUM( hsl05 ) SUM( hsl06 )
             SUM( hsl07 ) SUM( hsl08 ) SUM( hsl09 )
             SUM( hsl10 ) SUM( hsl11 ) SUM( hsl12 )
             INTO TABLE e_t_data
             FROM glpcp
             WHERE kokrs   EQ '0020'
             AND   ryear   IN l_r_year
             AND   rldnr   EQ '8A'
             AND   rrcty   EQ '1'
             AND   rvers   EQ '010'
             AND   rbukrs  EQ '0020'
             GROUP BY ryear rprctr racct kostl ps_psp_pnr rfarea.
    I have created an index on KOKRS, RYEAR, RLDNR, RRCTY, RVERS, RBUKRS. To support the where statement.
    This speeds up the process some but i believe that greater performance can be achieved.
    I ran the expression through the SQL explain routine.
    The path looks like this http://yfrog.com/jdexplainpathj
    It came out with poor performance regarding the group by sentence.
    Explanation of query block number: 1   step: 2
    Query block type is SELECT
    Performance appears to be bad
    Method:
    .          additional sorts needed
    .          for the composite table (current result table)
    .          the sorts are performed
    .          - to meet an GROUP BY
    .          unknown or no prefetch is used
    How can i build an index to support the group by sentence.
    Best Regards
    - Rasmus

    Hi Hermann,
    I can see why you are confused. It is hard to keep track with the changes.
    I will sum up:
    The abap statement.
    SELECT ryear rprctr racct kostl ps_psp_pnr
             SUM( hsl01 ) SUM( hsl02 ) SUM( hsl03 )
             SUM( hsl04 ) SUM( hsl05 ) SUM( hsl06 )
             SUM( hsl07 ) SUM( hsl08 ) SUM( hsl09 )
             SUM( hsl10 ) SUM( hsl11 ) SUM( hsl12 )
             INTO TABLE it_glpcp
             FROM glpcp
             WHERE kokrs   EQ '0020'
             AND   ryear   IN l_r_year
             AND   rldnr   EQ '8A'
             AND   rrcty   EQ '1'
             AND   rvers   EQ '010'
             AND   rbukrs  EQ '0020'
             GROUP BY rprctr racct kostl ps_psp_pnr ryear.
    The SQL statement mad from the abap:
    SELECT                                                                               
    "RYEAR" , "RPRCTR" , "RACCT" , "KOSTL" , "PS_PSP_PNR" ,"RFAREA" , SUM( "HSL01" ) , SUM( "HSL02" ) ,   
      SUM( "HSL03" ) , SUM("HSL04" ) , SUM( "HSL05" ) , SUM( "HSL06" ) , SUM( "HSL07" ) , SUM("HSL08" ) ,   
      SUM( "HSL09" ) , SUM( "HSL10" ) , SUM( "HSL11" ) , SUM("HSL12" )                                      
    FROM                                                                               
    "GLPCP"                                                                               
    WHERE                                                                               
    "RCLNT" = ? AND "KOKRS" = ? AND "RYEAR" =? AND "RLDNR" = ? AND "RRCTY" = ? AND "RVERS" = ? AND "RBUKRS"
      = ?GROUP BY "RYEAR" , "RPRCTR" , "RACCT" , "KOSTL" , "PS_PSP_PNR" ,"RFAREA" FOR FETCH ONLY WITH UR
    The index no. 9.
    http://yfrog.com/jbidx9j
    The hierarchial access path:
    http://yfrog.com/1qexplainj
    This is where I stand at the moment.
    Best Regards,
    Rasmus
    Edited by: Rasmus Stokholm on Apr 7, 2010 1:13 PM

  • Clamav not updating at expected times after update

    I am running an intel xserve macosx server 10.4.10
    my clamav was version 0.88.5
    I updated clamav this morning to 0.91.1 using the tutorial from http://osx.topicdesk.com (I am still using clamscan and haven't made the changes to use clamd)
    My clamav was set to update 8 times a day, ie every three hours.
    However as of time of writing the system still hasn't checked for new updates.
    It appears that /etc/freshclam.conf is set to 12 times a day (see below), whilst the SA GUI is still showing 8 times. Where does it get the frequency from?
    Also /var/log/freshclam.log appears to show using clamav 0.91.1,
    where clamscan --version
    ClamAV 0.88.5/4107/Wed Aug 29 17:16:42 2007
    Can someone tell me if I have made a config error. How do I get freshclam to start updating again at the required intervals?
    /etc/freshclam.conf
    ## Example config file for freshclam
    ## Please read the clamav.conf(5) manual before editing this file.
    ## This file may be optionally merged with clamav.conf.
    # You can change the default database directory here.
    #DatabaseDirectory /var/lib/clamav
    # Path to the log file (make sure it has proper permissions)
    UpdateLogFile /var/log/freshclam.log
    # Enable verbose logging.
    LogVerbose
    # By default when freshclam is started by root it drops privileges and
    # switches to the "clamav" user. You can change this behaviour here.
    #DatabaseOwner clamav
    # The main database mirror is database.clamav.net (this is a round-robin
    # DNS that points to many mirrors on the world) and in most cases you
    # SHOULD NOT change it.
    DatabaseMirror database.clamav.net
    # How many attempts to make before giving up.
    MaxAttempts 3
    # How often check for a new database. We suggest checking for it every
    # two hours.
    Checks 12
    # Proxy settings
    #HTTPProxyServer myproxy.com
    #HTTPProxyPort 1234
    #HTTPProxyUsername myusername
    #HTTPProxyPassword mypass
    # Send the RELOAD command to clamd.
    #NotifyClamd [/optional/config/file/path]
    # Run command after database update.
    #OnUpdateExecute command
    # Run command if database update failed.
    #OnErrorExecute command
    tail /var/log/freshclam.log
    Received signal: wake up
    ClamAV update process started at Thu Aug 30 06:16:01 2007
    SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES
    See the FAQ at http://www.clamav.net/faq.html for an explanation.
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Local version: 0.88.5 Recommended version: 0.91.2
    DON'T PANIC! Read http://www.clamav.net/faq.html
    main.cvd is up to date (version: 44, sigs: 133163, f-level: 20, builder: sven)
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Current functionality level = 9, recommended = 20
    DON'T PANIC! Read http://www.clamav.net/faq.html
    daily.cvd is up to date (version: 4107, sigs: 16433, f-level: 21, builder: ccordes)
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Current functionality level = 9, recommended = 21
    DON'T PANIC! Read http://www.clamav.net/faq.html
    Current working dir is /var/clamav
    freshclam daemon 0.91.1 (OS: darwin8.10.1, ARCH: i386, CPU: i386)
    Max retries == 3
    ClamAV update process started at Thu Aug 30 08:00:01 2007
    SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES
    See the FAQ at http://www.clamav.net/support/faq for an explanation.
    Querying current.cvd.clamav.net
    TTL: 300
    Software version from DNS: 0.91.2
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Local version: 0.91.1 Recommended version: 0.91.2
    DON'T PANIC! Read http://www.clamav.net/support/faq
    main.cvd version from DNS: 44
    main.cvd is up to date (version: 44, sigs: 133163, f-level: 20, builder: sven)
    daily.cvd version from DNS: 4107
    daily.cvd is up to date (version: 4107, sigs: 16433, f-level: 21, builder: ccordes)
    Current working dir is /var/clamav
    freshclam daemon 0.91.1 (OS: darwin8.10.1, ARCH: i386, CPU: i386)
    Max retries == 3
    ClamAV update process started at Thu Aug 30 08:05:37 2007
    SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES
    See the FAQ at http://www.clamav.net/support/faq for an explanation.
    Querying current.cvd.clamav.net
    WARNING: Can't query current.cvd.clamav.net
    WARNING: Invalid DNS reply. Falling back to HTTP mode.
    Waiting to lock database directory: /var/clamav
    Waiting to lock database directory: /var/clamav
    Waiting to lock database directory: /var/clamav
    Waiting to lock database directory: /var/clamav
    Waiting to lock database directory: /var/clamav
    If-Modified-Since: Fri, 20 Jul 2007 23:19:58 GMT
    Reading CVD header (main.cvd): ERROR: Can't get information about database.clamav.net: Host not found
    WARNING: Can't read main.cvd header from database.clamav.net (IP: )
    Trying again in 5 secs...
    ClamAV update process started at Thu Aug 30 08:06:07 2007
    SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES
    See the FAQ at http://www.clamav.net/support/faq for an explanation.
    Querying current.cvd.clamav.net
    WARNING: Can't query current.cvd.clamav.net
    WARNING: Invalid DNS reply. Falling back to HTTP mode.
    If-Modified-Since: Fri, 20 Jul 2007 23:19:58 GMT
    Reading CVD header (main.cvd): ERROR: Can't get information about database.clamav.net: Host not found
    WARNING: Can't read main.cvd header from database.clamav.net (IP: )
    Trying again in 5 secs...
    ClamAV update process started at Thu Aug 30 08:06:12 2007
    SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES
    See the FAQ at http://www.clamav.net/support/faq for an explanation.
    Querying current.cvd.clamav.net
    TTL: 300
    Software version from DNS: 0.91.2
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Local version: 0.91.1 Recommended version: 0.91.2
    DON'T PANIC! Read http://www.clamav.net/support/faq
    main.cvd version from DNS: 44
    main.cvd is up to date (version: 44, sigs: 133163, f-level: 20, builder: sven)
    daily.cvd version from DNS: 4107
    daily.cvd is up to date (version: 4107, sigs: 16433, f-level: 21, builder: ccordes)
    cat clamav.log
    Thu Aug 30 08:05:36 2007 -> + Started at Thu Aug 30 08:05:36 2007
    Thu Aug 30 08:05:36 2007 -> clamd daemon 0.91.1 (OS: darwin8.10.1, ARCH: i386, CPU: i386)
    Thu Aug 30 08:05:36 2007 -> Log file size limited to 1048576 bytes.
    Thu Aug 30 08:05:36 2007 -> Reading databases from /var/clamav
    Thu Aug 30 08:06:02 2007 -> Loaded 149596 signatures.
    Thu Aug 30 08:06:02 2007 -> Unix socket file /tmp/clamd
    Thu Aug 30 08:06:02 2007 -> Setting connection queue length to 15
    Thu Aug 30 08:06:02 2007 -> Archive: Archived file size limit set to 15728640 bytes.
    Thu Aug 30 08:06:02 2007 -> Archive: Recursion level limit set to 10.
    Thu Aug 30 08:06:02 2007 -> Archive: Files limit set to 1500.
    Thu Aug 30 08:06:02 2007 -> Archive: Compression ratio limit set to 300.
    Thu Aug 30 08:06:02 2007 -> Archive support enabled.
    Thu Aug 30 08:06:02 2007 -> Algorithmic detection enabled.
    Thu Aug 30 08:06:02 2007 -> Portable Executable support enabled.
    Thu Aug 30 08:06:02 2007 -> ELF support enabled.
    Thu Aug 30 08:06:02 2007 -> Detection of broken executables enabled.
    Thu Aug 30 08:06:02 2007 -> Mail files support enabled.
    Thu Aug 30 08:06:02 2007 -> Mail: Recursion level limit set to 128.
    Thu Aug 30 08:06:02 2007 -> OLE2 support enabled.
    Thu Aug 30 08:06:02 2007 -> PDF support disabled.
    Thu Aug 30 08:06:02 2007 -> HTML support enabled.
    Thu Aug 30 08:06:02 2007 -> Self checking every 1800 seconds.
    Thu Aug 30 08:06:02 2007 -> Set stacksize to 1048576
    TIA for any assistance

    If you followed my tutorial and used the support files referenced by it, then freshclam is set to update 3 times a day (which is more than enough).
    If you are not happy with that, edit:
    /System/Library/LaunchDaemons/net.clamav.freshclam.plist
    and change the value below "-c".
    When done issue:
    sudo launchctl unload /System/Library/LaunchDaemons/net.clamav.freshclam.plist
    sudo launchctl load /System/Library/LaunchDaemons/net.clamav.freshclam.plist

  • Clamav end of life issue

    Like a few others, my mail server stopped working yesterday afternoon and I think it's due to the clamav issue. I've turned off virus checking in SA for the moment and the mail is flowing again.
    My problem is with the clamav update instructions from topicdesk as follows:
    Everything seemed to go smoothly until ./configure (it looks okay to me until the final "checking" line showing a gcc bug):
    bash-3.2# ./configure --prefix=/usr/local --mandir=/usr/local/share/man --sysconfdir=/private/etc/spam/clamav/new --enable-bigstack --with-user=_clamav --enable-static --with-group=_clamav --with-dbdir=/var/clamav --datadir=/var/clamav
    checking build system type... i386-apple-darwin9.5.0
    checking host system type... i386-apple-darwin9.5.0
    checking target system type... i386-apple-darwin9.5.0
    creating target.h - canonical system defines
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... config/install-sh -c -d
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking how to create a ustar tar archive... gnutar
    checking for gawk... (cached) awk
    checking whether ln -s works... yes
    checking whether make sets $(MAKE)... (cached) yes
    checking for style of include used by make... GNU
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking dependency style of gcc... gcc3
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by gcc... /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld
    checking if the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) is GNU ld... no
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -p
    checking the name lister (/usr/bin/nm -p) interface... BSD nm
    checking the maximum length of command line arguments... 196608
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking for /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld option to reload object files... -r
    checking for objdump... no
    checking how to recognize dependent libraries... pass_all
    checking for ar... ar
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -p output from gcc object... ok
    checking for dsymutil... dsymutil
    checking for nmedit... nmedit
    checking for lipo... lipo
    checking for otool... otool
    checking for otool64... no
    checking for -single_module linker flag... yes
    checking for -exportedsymbolslist linker flag... yes
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fno-common -DPIC
    checking if gcc PIC flag -fno-common -DPIC works... yes
    checking if gcc static flag -static works... no
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared libraries... yes
    checking dynamic linker characteristics... darwin9.5.0 dyld
    checking how to hardcode library paths into programs... immediate
    checking for dlopen in -ldl... yes
    checking whether a program can dlopen itself... yes
    checking whether a statically linked program can dlopen itself... yes
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking which extension is used for runtime loadable modules... .so
    checking which variable specifies run-time module search path... DYLDLIBRARYPATH
    checking for the default library search path... /usr/local/lib /lib /usr/lib
    checking for library containing dlopen... none required
    checking for dlerror... yes
    checking for shl_load... no
    checking for shl_load in -ldld... no
    checking for dld_link in -ldld... no
    checking for _ prefix in compiled symbols... yes
    checking whether we have to add an underscore for dlsym... no
    checking whether deplibs are loaded by dlopen... yes
    checking for argz.h... no
    checking for error_t... no
    checking for argz_add... no
    checking for argz_append... no
    checking for argz_count... no
    checking for argzcreatesep... no
    checking for argz_insert... no
    checking for argz_next... no
    checking for argz_stringify... no
    checking whether libtool supports -dlopen/-dlpreopen... yes
    checking for ltdl.h... yes
    checking whether ltdlinterfaceregister is declared... no
    checking where to find libltdl headers... -I${top_srcdir}/libltdl
    checking where to find libltdl library... ${topbuildprefix}libltdl/libltdlc.la
    checking for unistd.h... (cached) yes
    checking for dl.h... no
    checking for sys/dl.h... no
    checking for dld.h... no
    checking for mach-o/dyld.h... yes
    checking for dirent.h... yes
    checking for closedir... yes
    checking for opendir... yes
    checking for readdir... yes
    checking for strlcat... yes
    checking for strlcpy... yes
    checking for multiarch libdir... ${exec_prefix}/lib
    checking for ANSI C header files... (cached) yes
    checking for C/C++ restrict keyword... __restrict
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking whether FPU byte ordering is bigendian... no
    checking whether byte ordering is bigendian... no
    checking for a supported version of gcc... ok (4.0.1)
    checking for gcc bug PR27603... ok, bug not present
    checking for gcc bug PR26763-2... ok, bug not present
    checking for valid code generation of CLI_ISCONTAINED... ok, bug not present
    checking for gcc bug PR28045... configure: error: your compiler has gcc PR28045 bug, use a different compiler, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28045
    bash-3.2# make
    make: * No targets specified and no makefile found. Stop.
    bash-3.2# make install
    make: Nothing to be done for `install'.
    bash-3.2#
    Being clueless, I tried it again:
    bash-3.2# ./configure --prefix=/usr/local --mandir=/usr/local/ share/man --sysconfdir=/private/etc/spam/clamav/new -- enable-bigstack --with-user=_clamav --enable-static -- with-group=_clamav --with-dbdir=/var/clamav --datadir=/ var/clamav
    configure: WARNING: you should use --build, --host, --target
    configure: WARNING: invalid host type: share/man
    configure: WARNING: you should use --build, --host, --target
    configure: error: invalid variable name: `--with-user'
    So, will installing Xcode 3.1.4 give me the right gcc compiler and make things work? If so, do I need to delete the clamav-0.96 directory and start over? For what it's worth, the gcc file on my server is Developer/usr/bin/gcc-4.0.
    I'm also wondering if updating to 10.5.8 would install an acceptable version of clamav. I'm a little hesitant to do that because everything has been running perfectly for quite a while now and I don't want to break it.
    Any suggestions are greatly appreciated.
    Thanks.
    Keith

    Okay, just updated to 10.5.8 successfully but still have the same clamav issue. Here's the latest freshclam log entry:
    Current working dir is /var/clamav
    freshclam daemon 0.94.2 (OS: darwin9.0, ARCH: i386, CPU: i386)
    Max retries == 3
    ClamAV update process started at Sun Apr 18 09:25:31 2010
    Using IPv6 aware code
    SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES
    See the FAQ at http://www.clamav.net/support/faq for an explanation.
    Querying current.cvd.clamav.net
    TTL: 900
    Software version from DNS: 0.96
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Local version: 0.94.2 Recommended version: 0.96
    DON'T PANIC! Read http://www.clamav.net/support/faq
    main.cvd version from DNS: 52
    main.cld is up to date (version: 52, sigs: 704727, f-level: 44, builder: sven)
    daily.cvd version from DNS: 10756
    daily.cld is up to date (version: 10756, sigs: 52433, f-level: 51, builder: guitar)
    Should I go ahead with the separate clamav update? If so, is the topicdesk tutorial compatible with 10.5.8?
    Another thing I've noticed is the log file problem with clamav. I've been getting this in the log for a couple of days:
    Log size = 1048620, max = 1048576
    LOGGING DISABLED (Maximal log file size exceeded).
    Any fix for that. I've seen some solutions on other sites involving editing some files but it seems like there should be an easier way.
    Thanks for your help.
    Keith

  • Default; File Fault On in Yosemite?

    I run a free Mac consultation service and recently I have had a few clients with Hard Drive issues on brand new MBA's.  On investigation I found they had File Vault switched on. They were completely unaware of this and denied switching it on themselves.  The issue here is that many people cant even remember their Admin Password much less a Recovery Key.  It unnecessarily complicates repair, restore and login issues and causes problems with backups using third party Apps such as Carbon Copy Cloner and SuperDuper.  I know everyone is a little paranoid these days but unless you are a spy or carrying top secret files internationally what the heck are you worried about.
    I personally use a small encrypted .dmg Folder for the few details I would not want accessed. Otherwise who cares?  I can always erase my laptop from Find My computer.
    Why would Apple do this and if it's not Apple then it's the dealers and they have even less right to make those sorts of decisions for a user without proper explanation and query.

    Got it!  Now I understand; "But what's new in OS X Yosemite, is that more users are likely to enable FileVault than ever before—as at installation you have to consciously opt-out of having your hard drive encrypted, rather than opt-in."
    Taken from this site (all credit to them)http://www.intego.com/mac-security-blog/yosemite-filevault/
    So it would appear that you are correct.  File Vault will be enabled unless you choose not to. 
    I can only say if I was given the option at my recent upgrades I must have pressed "no".
    Can't say I remember that so it may be an inclusion of the most recent version 10.10.2 that behaves this way.
    My guess is a lot of people would opt for this without thinking much about the possible complications.  After all everybody wants security, right?
    Setting it this way Apple seems to be saying, this is what we advise but the choice is up to you.  I'd call that enticement.
    As for devices bought already set up with Yosemite by a dealer for a purchaser my guess is they would advise enabling File Vault.
    I love the heading "Take that FBI !!"  Wow, emotive stuff for the paranoid among us.;)

  • How to determine estimated cost of dynamic SQL queries before execution?

    Hi Performance Gurus,
    Does anybody need know of a function module or program which can give me an estimated cost for a given SQL query. SQL query is a dynamic query and we need to know the estimated cost before we execute it.
    Cheers
    Jiby
    Moderator message: subject corrected, in the future please use one that describes your problem better.
    Edited by: Thomas Zloch on Aug 24, 2010 12:56 PM

    Hi,
    The mentioned function module does not give you the cost but the plan.
    On DB2 e.g.
    U Explanation of query block number: 1   step: 1
    D Query block type is SELECT
    S Performance appears to be bad
    S No index is used. Sequential tablespace scan
    E Method:
    D           access new table.
    D           data pages are read in advance
    D           pure sequential prefetch is used
    D           new table:
    D                       SAPD8M.DD02L
    D                       table space locked in mode:  N
    D           Accesstype: sequential tablespace scan.
    I think there is some information that could be used as well (cost figure transformed to text)
    S Performance appears to be bad
    S No index is used. Sequential tablespace scan
    But as already said: the whole requirement is quite strange...
    I'm not aware of any other options, sorry.
    Kind regards,
    Hermann

  • Callconnector database goes down every hour

    We have been running callconnector with no problems for the past 1 year, as of last week the database goes down pretty much hourly. The only change we made around the same time as this started was we changed admin passwords on all our servers / routers / switches due to a senior admin being let go from the company. Any help anyone can give would be great as we are a small non-profit company.
    Our versions that we are running are CM Version 2.0.0.40 - Server Version 2.01.010
    To get it back running I just have to click the database server button within configuration manager and it will work for another hour. The windows services don't seem to be affected only the services within the configuration manager. We are running this on a 2008 R2 VM environment.

    I remembered it used to say 0.91, but now says 88.5, so I typed the following two lines in Terminal:
    sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/org.clamav.freshclam.plist
    sudo /bin/launchctl load -w /System/Library/LaunchDaemons/net.clamav.freshclam.plist
    Then I rebooted once more.
    When it came back up, I checked the Server Admin Virus Update log and it now says:
    Current working dir is /var/clamav
    freshclam daemon 0.91.2 (OS: darwin8.10.0, ARCH: ppc, CPU: powerpc)
    Max retries == 3
    ClamAV update process started at Mon Dec 3 13:53:30 2007
    SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES
    See the FAQ at http://www.clamav.net/support/faq for an explanation.
    Querying current.cvd.clamav.net
    TTL: 271
    Software version from DNS: 0.91.2
    main.cvd version from DNS: 44
    main.cvd is up to date (version: 44, sigs: 133163, f-level: 20, builder: sven)
    daily.cvd version from DNS: 4984
    I assume this is what it is supposed to say now. ClamD (as of right now) is not taking up any resources, so maybe it will be better now. I will keep this topic posted of any changes.
    Is there any recommended commercial products for OS X Server regarding anti-virus and anti-spam instead of using clamav? Also what command in Terminal will force a restart of clamd? I also saw a reference to a "rebuild of ClamAV" in another topic. How do you "rebuild" ClamAV?
    Thanks for the help so far,
    G

  • HKONG: 품목에 대한 serial 정의를 Check하는 방법

    PURPOSE
    품목에 대한 serial 정의를 Check하는 방법을 기술함.
    Explanation
    다음의 3가지의 query문을 사용하여 serial정보를 수집할 수 있습니다.
    Query 1. data query by org
    SQL>Select
    ORGANIZATION_ID "ORG_ID" ,
    ORGANIZATION_CODE "ORG Code",
    decode (SERIAL_NUMBER_TYPE , 1,'1 = uniq in item',
    2,'2 = uniq in org',
              3,'3 = uniq across org',
              null, 'NULL') "Serial Number Type",
    decode (SERIAL_NUMBER_GENERATION , 1 , ' 1 = At org lev',
                   2 , '2 = At Item lev',
                   null , 'Null') "Serial Generation",          nvl (AUTO_SERIAL_ALPHA_PREFIX, 'NULL') "Alpha Prefix",
    nvl (START_AUTO_SERIAL_NUMBER, 'NULL') "Org Serial"
    From MTL_PARAMETERS
    Order by ORGANIZATION_ID;
    Query 2. Supply the Item name when prompted.
    SQL>Select
    INVENTORY_ITEM_ID,
    ORGANIZATION_ID,
    SEGMENT1,
    decode (SERIAL_NUMBER_CONTROL_CODE, 1, '1 = No Serial Control',
    2, '2 = Predefined serial Number',
         5, '5 = Dynamic entry at INV RCPT',
              6, '6 = Dynamic entry at Sale order issue ',
              NULL, 'Null' ) "Serial Ctrl CODE" ,
    START_AUTO_SERIAL_NUMBER,
    AUTO_SERIAL_ALPHA_PREFIX
    From MTL_SYSTEM_ITEMS_B
    Where SEGMENT1 = '&item_name'
    Query 3. Supply the Item name and Serial Number when prompted.
    SQL>Select
    MSI.SEGMENT1,
    MSI.INVENTORY_ITEM_ID,
    MSN.CURRENT_ORGANIZATION_ID ,
    MSN.CURRENT_SUBINVENTORY_CODE,
    MSN.CURRENT_LOCATOR_ID ,
    MSN.SERIAL_NUMBER,
    MSN.PARENT_ITEM_ID ,
    MSN.PARENT_SERIAL_NUMBER ,
    decode (MSN.CURRENT_STATUS, 1 , ' 1 = Defined but not used',
    3 , '3 = Resides in stores',
                   4 , '4 = Issued out of stores',
                   5 , '5 = Resides in intransit',
                   6, '6 = Pending ',
                   null, 'Null' ) "Current Status" ,
    MSN.REVISION ,
    NVL(msn.LOT_NUMBER,-9999) "Lot" ,
    NVL(msn.GROUP_MARK_ID,-9999) "GROUP_MARK_ID" ,
    NVL(MSN.LINE_MARK_ID, -9999) "LINE_MARK_ID",
    NVL(MSN.LOT_LINE_MARK_ID, -9999) "LOT_LINE_MARK_ID" ,
    NVl(MSN.COST_GROUP_ID, -9999) "COST_GROUP_ID"
    From MTL_SYSTEM_ITEMS_B MSI , MTL_SERIAL_NUMBERS MSN
    Where MSI.SEGMENT1 = '&item_name'
    and MSN.SERIAL_NUMBER = '&serial_number'
    and MSI.organization_ID = MSN.current_organization_ID
    and MSI.INVENTORY_ITEM_ID = MSN.INVENTORY_ITEM_ID;
    Reference Documents
    -------------------

  • Mail logs not updating

    Hi,
    I have updated amavisd-new, ClamAV, and SpamAssassin as per OSX.TopicDesk's instructions but my logs in Server Admin and Console do not appear to be updating although mail is still working.
    freshclam.log shows;
    Received signal: wake up
    Max retries == 3
    ClamAV update process started at Fri Jul 25 10:02:03 2008
    SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES
    See the FAQ at http://www.clamav.net/support/faq for an explanation.
    Querying current.cvd.clamav.net
    TTL: 1610
    Software version from DNS: 0.93.3
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Local version: 0.92 Recommended version: 0.93.3
    DON'T PANIC! Read http://www.clamav.net/support/faq
    main.cvd version from DNS: 47
    main.inc is up to date (version: 47, sigs: 312304, f-level: 31, builder: sven)
    daily.cvd version from DNS: 7824
    Retrieving http://database.clamav.net/daily-7822.cdiff
    Trying to download http://database.clamav.net/daily-7822.cdiff (IP: 81.91.101.77)
    Downloading daily-7822.cdiff [100%]
    cdiff_apply: Parsed 7 lines and executed 7 commands
    Retrieving http://database.clamav.net/daily-7823.cdiff
    Trying to download http://database.clamav.net/daily-7823.cdiff (IP: 81.91.101.77)
    Downloading daily-7823.cdiff [100%]
    cdiff_apply: Parsed 122 lines and executed 122 commands
    Retrieving http://database.clamav.net/daily-7824.cdiff
    Trying to download http://database.clamav.net/daily-7824.cdiff (IP: 81.91.101.77)
    Downloading daily-7824.cdiff [100%]
    cdiff_apply: Parsed 12 lines and executed 12 commands
    Removing backup directory ./clamav-509787fd7e305c069b24e20ef560c936
    daily.inc updated (version: 7824, sigs: 59418, f-level: 33, builder: ccordes)
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Current functionality level = 25, recommended = 33
    DON'T PANIC! Read http://www.clamav.net/support/faq
    Database updated (371722 signatures) from database.clamav.net (IP: 81.91.101.77)
    Yet issuing clamconf tells me my version is 0.94.2;
    /private/etc/spam/clamav/clamd.conf: freshclam directives
    LogFileMaxSize = 0
    LogTime = yes
    LogVerbose = no
    LogSyslog = no
    LogFacility = "LOG_LOCAL6"
    PidFile = "/var/clamav/clamd.pid"
    DatabaseDirectory = "/var/clamav"
    Foreground = yes
    Debug = no
    AllowSupplementaryGroups = yes
    DatabaseOwner = "clamav"
    Checks = 12
    UpdateLogFile not set
    DNSDatabaseInfo = "current.cvd.clamav.net"
    DatabaseMirror not set
    MaxAttempts = 3
    ScriptedUpdates = yes
    CompressLocalDatabase = no
    HTTPProxyServer not set
    HTTPProxyPort not set
    HTTPProxyUsername not set
    HTTPProxyPassword not set
    HTTPUserAgent not set
    NotifyClamd not set
    OnUpdateExecute not set
    OnErrorExecute not set
    OnOutdatedExecute not set
    LocalIPAddress not set
    ConnectTimeout = 30
    ReceiveTimeout = 30
    SubmitDetectionStats not set
    DetectionStatsCountry not set
    /private/etc/spam/clamav/freshclam.conf: freshclam directives
    LogFileMaxSize = 0
    LogTime = no
    LogVerbose = yes
    LogSyslog = no
    LogFacility = "LOG_LOCAL6"
    PidFile = "/var/clamav/freshclam.pid"
    DatabaseDirectory = "/var/clamav"
    Foreground = yes
    Debug = no
    AllowSupplementaryGroups = no
    DatabaseOwner = "clamav"
    Checks = 12
    UpdateLogFile = "/var/log/freshclam.log"
    DNSDatabaseInfo = "current.cvd.clamav.net"
    DatabaseMirror = "database.clamav.net"
    MaxAttempts = 3
    ScriptedUpdates = yes
    CompressLocalDatabase = no
    HTTPProxyServer not set
    HTTPProxyPort not set
    HTTPProxyUsername not set
    HTTPProxyPassword not set
    HTTPUserAgent not set
    NotifyClamd not set
    OnUpdateExecute not set
    OnErrorExecute not set
    OnOutdatedExecute not set
    LocalIPAddress not set
    ConnectTimeout = 30
    ReceiveTimeout = 30
    SubmitDetectionStats not set
    DetectionStatsCountry not set
    Engine and signature databases
    Engine version: 0.94.2
    Database directory: /private/var/clamav
    main db: Format: .cvd, Version: 49, Build time: Wed Oct 22 23:03:26 2008
    daily db: Format: .cvd, Version: 8683, Build time: Wed Nov 26 06:58:25 2008
    The last few entries in clamav.log are;
    Thu Jul 24 09:40:32 2008 -> ERROR: accept() failed: Too many open files
    Log size = 1048632, max = 1048576
    LOGGING DISABLED (Maximal log file size exceeded).
    Log size = 1048717, max = 1048576
    LOGGING DISABLED (Maximal log file size exceeded).
    Log size = 1048802, max = 1048576
    LOGGING DISABLED (Maximal log file size exceeded).
    Log size = 1048887, max = 1048576
    LOGGING DISABLED (Maximal log file size exceeded).
    amavis.log does not appear to have updated since Feb 1st
    I am not that good with command line stuff so please does anybody know what the **** is going on here!!!
    Thanks,
    John
    Message was edited by: Mark Davies
    Message was edited by: Mark Davies (didn't know h e l l was a swear word!!!)

    Hi Alex,
    Thanks for all your help it's just unfortunate where that linebreak fell in the tutorial!
    missing space:
    ... --mandir=/usr/share/man--sysconfdir=/private/etc/spam/clamav/new ...
    should be:
    ... --mandir=/usr/share/man --sysconfdir=/private/etc/spam/clamav/new ...
    Issuing the previously mentioned commands now gives;
    sudo ps U clamav
    PID TT STAT TIME COMMAND
    49 ?? SNs 0:12.46 clamd
    50 ?? SNs 0:00.07 freshclam -d -p /var/clamav/freshclam.pid -c 3
    51 ?? Ss 0:04.25 amavisd (master)
    9805 ?? S 0:02.98 amavisd (ch7-avail)
    10183 ?? S 0:01.33 amavisd (ch4-avail)
    sudo /usr/local/bin/freshclam -V
    ClamAV 0.94.2/9002/Wed Feb 18 11:16:50 2009
    sudo /usr/bin/amavisd -V
    amavisd-new-2.6.2 (20081215)
    sudo launchctl list | grep clam
    net.clamav.clamd
    net.clamav.freshclam
    Freshclam.log is now showing the correct version but clamav.log and amavis.log still haven't changed.
    You mentioned something about amavisd.conf is this why they logs are not updating and if so how do amavisd to log in the right place?
    Thanks,
    John

  • Mail virus update

    Sorry if this has been answered but I can't figure out how to search the forum.
    (with the maintenance recently, have they removed the search field or is that just me?)
    In Server Admin > Settings > Filters
    The update virus database will not remain checked to run and as a result has not updated since February.
    Ideas?
    LOG:
    ERROR: getfile: daily-4016.cdiff not found on remote server (IP: 64.246.44.108)
    ERROR: getpatch: Can't download daily-4016.cdiff from database.clamav.net
    WARNING: Incremental update failed, trying to download daily.cvd
    Retrieving http://database.clamav.net/daily.cvd
    Trying to download http://database.clamav.net/daily.cvd (IP: 64.246.44.108)
    Downloading daily.cvd [99%]
    Removing incremental directory daily.inc
    daily.cvd updated (version: 5970, sigs: 49031, f-level: 26, builder: ccordes)
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Current functionality level = 21, recommended = 26
    DON'T PANIC! Read http://www.clamav.net/support/faq
    Database updated (218707 signatures) from database.clamav.net (IP: 64.246.44.108)
    Message was edited by: Erich Wetzel

    matching log
    however it shows the last update process in February, and I'm still not able to get SA to actually keep the box checked to update the database.
    What to do now?
    Current working dir is /var/clamav
    freshclam daemon 0.91.2 (OS: darwin9.0, ARCH: i386, CPU: i386)
    Max retries == 3
    ClamAV update process started at Sun Feb 24 13:43:44 2008
    SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES
    See the FAQ at http://www.clamav.net/support/faq for an explanation.
    Querying current.cvd.clamav.net
    TTL: 135
    Software version from DNS: 0.92.1
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Local version: 0.91.2 Recommended version: 0.92.1
    DON'T PANIC! Read http://www.clamav.net/support/faq
    main.cvd version from DNS: 45
    Retrieving http://database.clamav.net/main-45.cdiff
    Trying to download http://database.clamav.net/main-45.cdiff (IP: 64.246.44.108)
    Downloading main-45.cdiff [100%]
    cdiff_apply: Parsed 36567 lines and executed 36567 commands
    main.cvd updated (version: 45, sigs: 169676, f-level: 21, builder: sven)
    daily.cvd version from DNS: 5969
    Retrieving http://database.clamav.net/daily-4016.cdiff
    Trying to download http://database.clamav.net/daily-4016.cdiff (IP: 64.246.44.108)
    ERROR: getfile: daily-4016.cdiff not found on remote server (IP: 64.246.44.108)
    ERROR: getpatch: Can't download daily-4016.cdiff from database.clamav.net
    Retrieving http://database.clamav.net/daily-4016.cdiff
    Trying to download http://database.clamav.net/daily-4016.cdiff (IP: 64.246.44.108)
    ERROR: getfile: daily-4016.cdiff not found on remote server (IP: 64.246.44.108)
    ERROR: getpatch: Can't download daily-4016.cdiff from database.clamav.net
    Retrieving http://database.clamav.net/daily-4016.cdiff
    Trying to download http://database.clamav.net/daily-4016.cdiff (IP: 64.246.44.108)
    ERROR: getfile: daily-4016.cdiff not found on remote server (IP: 64.246.44.108)
    ERROR: getpatch: Can't download daily-4016.cdiff from database.clamav.net
    WARNING: Incremental update failed, trying to download daily.cvd
    Retrieving http://database.clamav.net/daily.cvd
    Trying to download http://database.clamav.net/daily.cvd (IP: 64.246.44.108)
    Downloading daily.cvd [99%]
    Removing incremental directory daily.inc
    daily.cvd updated (version: 5970, sigs: 49031, f-level: 26, builder: ccordes)
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Current functionality level = 21, recommended = 26
    DON'T PANIC! Read http://www.clamav.net/support/faq
    Database updated (218707 signatures) from database.clamav.net (IP: 64.246.44.108)

  • Any Explanations y this query is not ordering ?

    SELECT dept_id, salary, job_id
    FROM employees
    ORDER BY
    ( SELECT dept_id
    FROM departments
    WHERE last_name='Abel');
    Assumptions:
    1. The inner subquery gives a value of 10 only.
    2. There is no 10th column in the Table Employees.
    3. There is only 1 employee in the department 10.
    Output it gives :
    It gives all that is there in the employees table(projected cols), However the first record is always from dept_id= 10, then it just displays without ordering.

    yes you are partially correct. The subquery will return only 10 and not 1 or 5 or any other value.
    I have an explanation to this query bt I'm not sure about it.
    Oracle checks for semantics and syntax at compile time. So if everything is correct then only it submits the query for execution. Now when a subquery executes only then oracle knows there is no 10th col in the database so it is a runtime error.

  • Query Correction and Please Explan

    Dear Experts
    I have created a query to Sales Order ORDR and its Data from RDR1 and RDR1 and Connected it to Delievery ODLN. I want all the Sales Order irrespective of the Delievery is made or not. I some documents I am getting cartesian product. Please check the query and if can correct the mistake and Please do explain the your joining statement as the problem lies their.
    Please find the query is below:
    SELECT *  FROM
    ORDR T0  INNER JOIN RDR1 T1 ON T0.DocNum = T1.DocEntry
    LEFT JOIN RDR2 T2 ON T0.DocEntry = T2.DocEntry
    LEFT JOIN ODLN T3 ON T0.DocNum = T3.DocNum AND
    T1.LineNum=T2.LineNum
    Ill be grateful.
    Faisal

    Hi Faisal.......
    Try this.....
    SELECT * FROM
    ODLN T0 LEFT JOIN RDR1 T1 ON T0.DocEntry = T1.TrgetEntry
    LEFT JOIN RDR2 T2 ON T1.DocEntry = T2.DocEntry
    Hope this will help you.....
    Regards,
    Rahul
    Edited by: RAHUL MOUNDEKAR on Nov 26, 2010 2:03 PM

  • Explanation For the query

    Hi All,
    Could anybody please explain me the following query.
    How to display number value in words?
    SQL> select sal, (to_char(to_date(sal,'j'), 'jsp')) from emp;
    i know that j indicates Julion day.
    i am unable to understand how to_date converts sal into date
    Pls explain me in detail.
    thanks in advance.
    rampa

    You've a decent instructor. The example is based on the SCOTT/TIGER sample schema.
    Here's your code:
    select sal, (to_char(to_date(sal,'j'), 'jsp')) from emp;Start inside the most nested parentheses:
    SELECT TO_DATE(sal, 'J') FROM emp;Then convert that date to a string.
    SELECT to_char(to_date(sal,'j'), 'jsp') FROM emp;Then add sal to the SELECT statement.
    To understand each specific piece
    TO_CHAR, TO_DATE, 'J', and 'JSP'go to the Oracle docs at http://tahiti.oracle.com and look them up.

  • I need a detailed explanation about this query!

    Hey Guys,
    I'm doing a course on distributed databases at uni. I have got this query but I am not 100% sure what is being executed first, the queries between brackets or outter ones.
    What is the difference between semi-join and join queries?
    what's meant by "WHERE EXISTS" clause?
    what's the union do with the results?
    SELECT C.COUNTRYNAME, C.CODE FROM "USER_HP_FULL"."COUNTRY" C
    WHERE EXISTS(
    SELECT 1 FROM (SELECT * FROM "USER1_HP_FULL"."ATHLETE1_REPLICA1"
    UNION SELECT * FROM "USER2_HP_FULL"."ATHLETE2_REPLICA1"
    UNION SELECT * FROM "USER3_HP_FULL"."ATHLETE3_REPLICA1") A
    WHERE A.CCODE = C.CODE)
    ORDER BY C.COUNTRYNAME;
    Thank you!

    >
    I'm doing a course on distributed databases at uni. I have got this query but I am not 100% sure what is being executed first, the queries between brackets or outter ones.
    >
    Then you should
    1. open a sql*plus command window
    2. log on as a user with the correct privileges
    3. set serveroutput on
    4. set autotrace traceonly
    5. execute the query
    Examine the execution plan - it will show you what is being executed first. If you have questions post the plan using \ tags.
    {quote}
    What is the difference between semi-join and join queries?
    {quote}
    The documentation is your friend.
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/queries006.htm
    {quote}
    what's meant by "WHERE EXISTS" clause?
    {quote}
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/conditions012.htm#sthref2960
    {quote}
    EXISTS Condition An EXISTS condition tests for existence of rows in a subquery.
    {quote}
    {quote}
    what's the union do with the results?
    {quote}
    Eliminates duplicates in multiple query results
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/queries004.htm
    See 'The UNION [ALL], INTERSECT, MINUS Operators' in the SQL Language doc
    {quote}
    UNION Example The following statement combines the results of two queries with the UNION operator, which eliminates duplicate selected rows.
    {quote}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Diff b/w BAPI and Function Module.

    What is the difference between BAPI and Function Module.... By Interface programming do we mean posting data thru  BAPI,BDC....

  • Can't acess a particular business partner

    Hi, I have a issue,I am not able to acess a particular business partner number in CRM 7.0 web UI,I am tryinh wityh some other Id its working but when i am trying to open its giving me  atime out dump.How's that possible?I have checked authorization p

  • Auto generated service PR from maint, order

    Dear Experts, As you know while processing external services using control key PM03, a service PR will be generated for the service selected from the agreement or contract & from there we will create PO. Here in my case while creating PO from auto ge

  • When I try to open oracle Reports 6i its hanging..

    Hello.. I'm on Windows XP Sp3. As above, when I try to open oracle Reports 6i its hanging.. How can I check to see if the Reports Server is up or down? If its not that, has anybody got any thoughts on why its not opening? On double-clicking either th

  • Why is photoshop cc changing dimensions of illustrator vectors?

    How and why is photoshop cc changing the dimensions of vector images from illustrator cc? Copy and paste has been a regular part of my workflow for years, going back since CS2. Now I cant copy a vector from illustrator and paste into photoshop with o