SQL Tools

I have a question about SQL development tools(i.e. Toad/SQL Programmer/etc.). Which, in your opinion, are best? Does Oracle offer similar products? We are currently running 8.0.5, and I haven't found any tool like this (other than SQLPlus). As you can guess, I'm new to Oracle.
Thanks.
Bill

Oracle has Enterprise Manager. Which is geared more towards a DBA function.
For development I use TOAD (which also includes a lot of DBA functions in Version 7.x).
You can get the Free version at http://www.toadsoft.com
The full paid version (which is what I use) can be had at http://www.quest.com/toad/
I have used SQL*Navigator and did not care to much for it.
TOAD 7.x has just about everything you need.

Similar Messages

  • Error msg like :ORACLE not started when login through SQL Tool

    Hi All,
    When i login through SQL TOOL (either sysdba/system/scott... any user) the error msg like ORACLE not started ....
    so i check the services from controlpanel->administraive tools->services ->Oralceservice<dbname> service ... so in this service is in manual & starting but not started.....
    This happen becoz i stated in manual first time & now i change it then it display as strating not started.....
    pls. if u have any solution related to this service infrom me...
    Thx

    Make your instance service in the windows services as auto start. However, if it show starting not started, just stop and start again. Otherwsie, shutdown your windows and start it again.
    Jaffar

  • Sql tool kit + base multi-table

    Bonjour,
    Je cherche à attaquer une base contenant plusieurs table avec le SQL tool kit.
    Seulement, je voudrais écrire une fonction générique qui me permette de trouver le nom des tables présentes dans la base (qui par définition du besoin doit être dynamique).
    En effet, par la suite, mon soft pourra créer de nouvelles tables, suivant les attentes des utilisateurs.
    Mon problème est donc que je ne connais pas encore les noms des tables qui seront créées.
    J'aurais juste besoin au lancement de mon soft, une routine qui attaque la base de données et me retourne le nom de toutes les tables présentes dans cette dernière.
    Quelqu'un aurait-il une solution?
    Merci
    Résolu !
    Accéder à la solution.

    Je commence à désespérer.
    J'ai essayer les fonctions data sources informations et rien ne fais.
    Je pensais pourtant que la fonction DBTables servait à ça.
    J'ai beau la triturer dans tous les sens, elle me donne que des renseignements sur la database.
    Je n'arrive pas à récupérer les noms de toutes les tables présentes dans la base. Même aucun nom d'ailleurs.
    si quelqu'un à une solution ou des indications à me donner, je suis preneur ;-)
    Cdlt,

  • Sql Tool yes4sql

    Hi all,
    can someone explain me how these SQL Tool "yes4sql" is to be set up. I was able to activate the
    programm, but how do i set up the screen which ist provided with the tool/programm.
    I don't know nothing about screens.
    Thanks in advance.
    Regards,
    Ali

    Hi Kiran many thanks for your answer.
    But when i try to upload the *.txt file which suppose to conzain the screen, i get the message
    "File does not Contain a Dynpro"
    This is the content of the screen file :
      SCREEN 100
    %_DYNPRO
    YES4SQL
    0100
    620
                    40
    %_HEADER
    YES4SQL                                 0100 0100      1 54192 36  0  0 27120  0G E                              20040930020857
    %_DESCRIPTION
    ScreenYes4SQL
    %_FIELDS
    %#AUTOTEXT001   0   CHAR      9 00  00  00  30  00    1   3       0   0   0       0                   0   0                             Row Count                                                                                X
    ROWS    X   INT4      6 80  00  80  00  00    1  13       0   0   0       0                   0   0                             ______
    %#AUTOTEXT002   0   CHAR      8 00  00  00  30  00    1  22       0   0   0       0                   0   0                             Open SQL
    ISOPEN  C   CHAR      1 80  00  80  00  00    1  31       0   0   0       0 C                 0   0 101
    %#AUTOTEXT003   0   CHAR     20 00  00  00  30  00    1  36       0   0   0       0                   0   0                             Untick if Native SQL
    MYEDIT           74 00  00  00  30  00    2   3       0   0   0      20 U                 1   1 102
    G_OK_CODE       CHAR     20 80  10  00  00  00  255   1 O     0   0   0       0                   0   0                             ____________________
    %_FLOWLOGIC
    PROCESS BEFORE OUTPUT.
    MODULE PBO.
    PROCESS AFTER INPUT.
    MODULE PAI.
    can you help please ?
    Regrads,
    Ali

  • Testing procedure in SQL tools

    Coming from an ms sql background, I'm trying to figure out how to test my procedure using SQL Tools. I have the following procedure:
    CREATE OR REPLACE PACKAGE AuditInformation
    AS
    TYPE t_cursor IS REF CURSOR;
    PROCEDURE ro_getAuditTitles(outResultsRefCursor out t_cursor);
    PROCEDURE ro_getAuditYears(outResultsRefCursor out t_cursor);
    END AuditInformation;
    CREATE OR REPLACE PACKAGE BODY AuditInformation
    AS
    PROCEDURE ro_getAuditYears(outResultsRefCursor out t_cursor)
    AS
    BEGIN
    OPEN outResultsRefCursor FOR
    SELECT TO_CHAR(YrStart, 'YYYY'), TO_CHAR(YrEnd, 'YYYY') FROM tbl_audit_year;
    END ro_getAuditYears;
    PROCEDURE ro_getAuditTitles(outResultsRefCursor out t_cursor)
    AS
    BEGIN
    OPEN outResultsRefCursor FOR
    SELECT auditTitle FROM tbl_audit;
    END ro_getAuditTitles;
    END AuditInformation;
    I'm wanting to test the procedure like so:
    execute AuditInformation.ro_getAuditTitles();
    Not sure what the format is to do this. Any help appreciated.
    Ryan

    http://www.google.lv/search?num=100&hl=lv&q=test+ref+cursor+oracle&meta=
    First link will give you an example
    Gints Plivna
    http://www.gplivna.eu

  • What's the best MS SQL tool(s) for managing (creation, updating, deletion, pausing, starting, etc) a bunch of replicated databases?

    I'm looking for recommendations on how best to program (scripts, procedures, anything else) managing a set of databases across multiple datacenters. The tasks I would like to be able to do database by database is...
    copy a specified database from one server to another ("import") without the user access rights
    add replication to the "imported" database objects based on an extended property
    update the replicating "imported" database, including changes to the data values, and changes in schema, without bringing down the database (rolling updates across the various datacenters is permitted)
    adding/modifying a standard set of maintenance plans for each Database
    removing replication from a selected database
    I'm familiar with the standard SQL product but have no exposure to the other SQL components like SSIS. I have to date several SQL batch scripts that do parts of the above but it seems there must be a better way. Assume that there is one Enterprise Edition
    SQL instance at each datacenter. Replication is transactional Peer 2 Peer. We are also considering if we want to add DB mirroring but have decided not to do so at this time.
    BTW I'm one of those people that can't get the "copy database" menu option in SSMS to work. I'm not a DBA but it looks like I'm going to need how to act like one.
    Developer Frog Haven Enterprises

    I would recommend you to get involve DBA for any such tasks. The task which are listed it's not going to be simple thing. If you don't have prior experience in High availability configuration, it's really difficulty to manage even if you've any third party.
    But you can rely on backup and restore for any third party tools.
    To manage database ,configure  and maintain HA you need to have SQL Server HA knowledge.
    My testing so far seems to show that it's quite easy to break the replication with changes
    to the databases. Using SSMS "canned" wizards and procedures to delete and recreate replication leaves many vestiges behind cluttering up the database instance.
     You can create a script to cleanup the replication and re-create it from the scratch
    http://www.mssqltips.com/sqlservertip/1808/sql-server-replication-scripts-to-get-replication-configuration-information/
    http://support.microsoft.com/default.aspx?scid=kb;en-us;324401
    --Prashanth

  • Automatically logged out from SQL tool on update queries

    This is a local instance configuration issue. Our current setup has the unfortunate feature that whenever you attempt to run an "update" statement in the SQL query tool, you get automatically logged out. I was guessing that it's a permissions issue , but the DBA says it's not. Has anyone else seen this behavior and know what causes it?
    thanks
    [email protected]

    PLSQL_GATEWAY = WebDb
    GATEWAY_IVERSION = 3
    SERVER_SOFTWARE = Oracle-Application-Server-10g/9.0.4.0.0 Oracle-HTTP-Server
    GATEWAY_INTERFACE = CGI/1.1
    SERVER_PORT = 7777
    SERVER_NAME = irt-lab-01
    REQUEST_METHOD = GET
    QUERY_STRING = p=106:3:17582993408477916936
    PATH_INFO = /f
    SCRIPT_NAME = /pls/htmldb
    REMOTE_ADDR = 171.65.65.151
    SERVER_PROTOCOL = HTTP/1.1
    REQUEST_PROTOCOL = HTTP
    REMOTE_USER = HTMLDB_PUBLIC_USER
    HTTP_USER_AGENT = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
    HTTP_HOST = irt-htmldb:7777
    HTTP_ACCEPT = text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    HTTP_ACCEPT_ENCODING = gzip,deflate
    HTTP_ACCEPT_LANGUAGE = en-us,en;q=0.5
    HTTP_ACCEPT_CHARSET = ISO-8859-1,utf-8;q=0.7,*;q=0.7
    HTTP_REFERER = http://htmldb.stanford.edu/pls/htmldb/wwv_flow.accept
    HTTP_ORACLE_ECID = 1100647738:171.65.64.22:4707:0:27727,0
    WEB_AUTHENT_PREFIX =
    DAD_NAME = htmldb
    DOC_ACCESS_PATH = docs
    DOCUMENT_TABLE = wwv_flow_file_objects$
    PATH_ALIAS =
    REQUEST_CHARSET = WE8ISO8859P1
    REQUEST_IANA_CHARSET = ISO-8859-1
    SCRIPT_PREFIX = /pls
    HTTP_COOKIE = LOGIN_USERNAME_COOKIE=sweber; ORACLE_PLATFORM_REMEMBER_UN=SWEBER:Obstet_Anes; WWV_FLOW_USER2=52D2AD1E7A3F75FB; SUNetCookieBrowser=TRUE; WebloginTestCookie=True%40%40; WWV_CUSTOM-F_1059203611149176_106=5A0AE6B864E55BC3

  • PL/SQL tool

    Hi
    I have to create PL/SQL code. Whot tool is the best for developing PL/SQL code?
    Thanks
    Zu
    null

    Personally I use TOAD. I have the full version (paid for it).
    They have a free version at www.toadsoft.com. The full is available from www.quest.com/toad/
    I have used SQL*Navigator too, but it lacks the functionallity of the full version of TOAD v7.*

  • SQL TOOL

    Is there any tool in SAP, where we can write plain SQL (open or native) against any transparant tables, without having to write ABAP code? Just for read-only, analysis/debugging purposes. Thanks.

    here's a simple abap which may do the trick for you. It will dynamically run any abap statements you want but I usually use it to test out sql. The first parameter is expecting table names the others just raw abap.
    It's fine for a few lines of code but the messaging isn't perfect so any complexity would mean you're better off writing a new abap.
    Neil Woodruff
    REPORT ZNRW_sql_tool               MESSAGE-ID Z1.
    PARAMETERS: P_TABLE LIKE DD02L-TABNAME.
    PARAMETERS: P_CODE1(200) LOWER CASE.
    PARAMETERS: P_CODE2(200) LOWER CASE.
    PARAMETERS: P_CODE3(200) LOWER CASE.
    PARAMETERS: P_CODE4(200) LOWER CASE.
    PARAMETERS: P_CODE5(200) LOWER CASE.
    PARAMETERS: P_CODE6(200) LOWER CASE.
    PARAMETERS: P_CODE7(200) LOWER CASE.
    PARAMETERS: P_CODE8(200) LOWER CASE.
    PARAMETERS: P_CODE9(200) LOWER CASE.
    PARAMETERS: P_CODE10(200) LOWER CASE.
    PARAMETERS: P_CODE11(200) LOWER CASE.
    PARAMETERS: P_CODE12(200) LOWER CASE.
    PARAMETERS: P_CODE13(200) LOWER CASE.
    PARAMETERS: P_CODE14(200) LOWER CASE.
    PARAMETERS: P_CODE15(200) LOWER CASE.
    PARAMETERS: P_CODE16(200) LOWER CASE.
    PARAMETERS: P_CODE17(200) LOWER CASE.
    PARAMETERS: P_CODE18(200) LOWER CASE.
    PARAMETERS: P_CODE19(200) LOWER CASE.
    PARAMETERS: P_CODE20(200) LOWER CASE.
    PARAMETERS: P_CODE21(200) LOWER CASE.
    PARAMETERS: P_CODE22(200) LOWER CASE.
    PARAMETERS: P_CODE23(200) LOWER CASE.
    PARAMETERS: P_CODE24(200) LOWER CASE.
    PARAMETERS: P_CODE25(200) LOWER CASE.
    PARAMETERS: P_CODE26(200) LOWER CASE.
    PARAMETERS: P_CODE27(200) LOWER CASE.
    PARAMETERS: P_CODE28(200) LOWER CASE.
    PARAMETERS: P_CODE29(200) LOWER CASE.
    PARAMETERS: P_CODE30(200) LOWER CASE.
    PARAMETERS: P_CODE31(200) LOWER CASE.
    DATA T_SOURCE_TAB(72) OCCURS 0 WITH HEADER LINE.
    DATA G_PROGRAM_NAME LIKE SY-REPID.
    DATA G_SYNTAX_MESSAGE(128).
    DATA G_LINE_NO TYPE I.
    AT SELECTION-SCREEN.
    PERFORM CHECK_DYNAMIC_ABAP.
    START-OF-SELECTION.
    PERFORM DO_THE_BUSINESS IN PROGRAM (G_PROGRAM_NAME).
    FORM CHECK_DYNAMIC_ABAP.
    DATA  T_ABAP(80) OCCURS 0 WITH HEADER LINE.
    *set up a dynamic program
       REFRESH T_SOURCE_TAB.
       APPEND 'REPORT'                            TO T_SOURCE_TAB.
       APPEND SY-REPID                            TO T_SOURCE_TAB.
       APPEND '.'                                 TO T_SOURCE_TAB.
        APPEND 'tables:'                           TO T_SOURCE_TAB.
        APPEND P_TABLE                             TO T_SOURCE_TAB.
        APPEND '.'                                 TO T_SOURCE_TAB.
       APPEND 'DATA: begin of common part a,'             TO T_SOURCE_TAB.
       APPEND 'V_IN(5000),'            TO T_SOURCE_TAB.
       APPEND 'END OF COMMON PART.'     TO T_SOURCE_TAB.
       APPEND 'FORM do_the_business.'   TO T_SOURCE_TAB.
    *macro to separate line's contents into table
    DEFINE UNRAVEL.
       SPLIT &1 AT ' ' INTO TABLE T_ABAP.
       LOOP AT T_ABAP.
         SHIFT T_ABAP RIGHT BY 1 PLACES.
         APPEND T_ABAP TO T_SOURCE_TAB.
       ENDLOOP.
    END-OF-DEFINITION.
    FIELD-SYMBOLS <CODE>.
    DATA L_ABAP LIKE P_CODE1.
    DATA L_FIELD_NAME(30).
    DATA L_CHAR_INDEX(2).
    DO.
       L_CHAR_INDEX = SY-INDEX.
       CONCATENATE 'P_code' L_CHAR_INDEX INTO L_FIELD_NAME.
       ASSIGN (L_FIELD_NAME) TO <CODE>.
       IF SY-SUBRC <> 0.
         EXIT.
       ENDIF.
       UNRAVEL <CODE>.
    ENDDO.
       APPEND '.' TO T_SOURCE_TAB.
       APPEND 'ENDFORM.'                          TO T_SOURCE_TAB.
    *Generate the dynamic program so that the form can be used subsequently.
       GENERATE SUBROUTINE POOL T_SOURCE_TAB NAME G_PROGRAM_NAME
                MESSAGE G_SYNTAX_MESSAGE LINE G_LINE_NO.
       IF SY-SUBRC <> 0.
        MESSAGE E999 WITH G_SYNTAX_MESSAGE.
       ENDIF.
    ENDFORM.                         .

  • Erd to sql tool

    I am using java. I need an erd tool in which you would enter an erd diagram and it would create sql preferably for sybase. ANSI sql qould do fine too.

    If you use Eclipse, there's a plugin that can do this.

  • SQL Tool to insert/update/delete non english data

    I have a requirement to insert/update non English data using command line.
    I know that Sql*Plus cannot be used for this. I have tried Sql*Loader and that works fine for inserts.
    Question is can SQL*loader be used for updates and deletes too.
    Also which utility is the best one to be used in this scenario.

    In another forum I found out that SQL*Plus can actually be used for inserting unicode data.
    Re: Sql script not able to insert unicode data in table

  • Error occurred while processing SAP SQL Tools for SQLServer (Database Copy)

    Hello,
    We are currently running ERP 6 EP4 support stacks 6. Two weeks ago we
    refreshed our sandbox from QAS system and installed support stack 9 for
    testing. Kernel was also upgraded from sp69 to sp137 as a part of the
    support pack installation.
    This week, I was asked to do another refresh of sandbox from the QAS system. As the
    kernel was upgraded before to sp139, I copied back the previous kernel
    file sp69 to the kernel folder and started refresh process as usual.
    When I was running SAP for SQL, it ran successfully thorugh all the
    steps but failed in the final steps with the following error logs:
    =======================================================================
    An error occurred while processing option SAP Toools for MS SQL Server
    > Database Copy Completion( Last error reported by the step: System
    call failed. Error 2 (The system cannot find the file specified. ) in
    execution of system call 'CreateProcessAsUser' with parameter ( ,
    NULL, Program Files/sapinst_instdir/MSS/CPY, &StartupInfo,
    &ProcessInfo), line (631) in file (synxcchapp.cpp), stack trace:
    iaxxejsctl.cpp: 272: EJS_ControllerImpl::executeScript()
    d:\depot\bas\710_rel\bc_710-3_rel\gen\optu\ntamd64
    \ins\sapinst\impl\src\ejs\iaxxejsbas.hpp: 450:
    EJS_Base::dispatchFunctionCall() iaxxejsexp.cpp: 178:
    EJS_Installer::invokeModuleCall() synxcchapp.cpp: 228:
    CSyChildApplicationImpl::start(false) synxcchapp.cpp: 252:
    CSyChildApplicationImpl::doStart() .). You can now:
    Choose Retry to repeat the current step.
    Choose View Log to get more information about the error.
    Stop the option and continue with it later.
    Log files are written to C:\Program Files/sapinst_instdir/MSS/CPY.

    I looked at the logs, very similar error to the one that I already posted:
    ERROR      2011-07-08 09:29:49.861
               CJSlibModule::writeError_impl()
    MUT-03025  Caught ESyException in Modulecall: At line 631 file synxcchapp.cpp
    Call stack:
    iaxxejsctl.cpp: 272: EJS_ControllerImpl::executeScript()
    d:\depot\bas\710_rel\bc_710-3_rel\gen\optu\ntamd64\ins\sapinst\impl\src\ejs\iaxxejsbas.hpp: 450: EJS_Base::dispatchFunctionCall()
    iaxxejsexp.cpp: 178: EJS_Installer::invokeModuleCall()
    synxcchapp.cpp: 228: CSyChildApplicationImpl::start(false)
    synxcchapp.cpp: 252: CSyChildApplicationImpl::doStart()
    System call failed. Error 2 (The system cannot find the file specified.
    ) in execution of system call 'CreateProcessAsUser' with parameter (<token>, NULL, <command line for executable saplicense.exe, NULL, NULL, TRUE, 0x420, NULL, C:/Program Files/sapinst_instdir/MSS/CPY, &StartupInfo, &ProcessInfo), line (631) in file (synxcchapp.cpp), stack trace: iaxxejsctl.cpp: 272: EJS_ControllerImpl::executeScript()
    d:\depot\bas\710_rel\bc_710-3_rel\gen\optu\ntamd64\ins\sapinst\impl\src\ejs\iaxxejsbas.hpp: 450: EJS_Base::dispatchFunctionCall()
    iaxxejsexp.cpp: 178: EJS_Installer::invokeModuleCall()
    synxcchapp.cpp: 228: CSyChildApplicationImpl::start(false)
    synxcchapp.cpp: 252: CSyChildApplicationImpl::doStart()
    TRACE      2011-07-08 09:29:49.861 [iaxxejsbas.hpp:488]
               EJS_Base::dispatchFunctionCall()
    JS Callback has thrown unknown exception. Rethrowing.
    ERROR      2011-07-08 09:29:49.875 [sixxcstepexecute.cpp:971]
    FCO-00011  The step doLI with step key |SAPMSSTOOLS|ind|ind|ind|ind|0|0|MssSysLI|ind|ind|ind|ind|7|0|doLI was executed with status ERROR ( Last error reported by the step: System call failed. Error 2 (The system cannot find the file specified.
    ) in execution of system call 'CreateProcessAsUser' with parameter (<token>, NULL, <command line for executable saplicense.exe, NULL, NULL, TRUE, 0x420, NULL, C:/Program Files/sapinst_instdir/MSS/CPY, &StartupInfo, &ProcessInfo), line (631) in file (synxcchapp.cpp), stack trace: iaxxejsctl.cpp: 272: EJS_ControllerImpl::executeScript()
    d:\depot\bas\710_rel\bc_710-3_rel\gen\optu\ntamd64\ins\sapinst\impl\src\ejs\iaxxejsbas.hpp: 450: EJS_Base::dispatchFunctionCall()
    iaxxejsexp.cpp: 178: EJS_Installer::invokeModuleCall()
    synxcchapp.cpp: 228: CSyChildApplicationImpl::start(false)
    synxcchapp.cpp: 252: CSyChildApplicationImpl::doStart()
    TRACE      2011-07-08 09:29:49.886
      Call block:CallBackInCaseOfAnErrorDuringStepExecution
        function:CallTheLogInquirer
    is validator: true

  • SQL Tools compatibility

    Can regular SQL applications such as SQL Navigator, TOAD, SQL PLUS query XMLType data in a tubular view (tables and columns)?
    e.g. can we use regular SQL queries to retrieve/update/insert data that are mapped to XMLType using regular SQL applications?

    Sorry, i don't have the answer, but this is just to enphasize that this is an important question. Please, Oracle Gurus, shed some light to us..!
    --jlb                                                                                                                                                                                                                                                                                                                   

  • SQL executing error differences with different tools, need help!!

    Hi everyone,
    I'm getting trouble with executing SQL query using SQLdevelopper.
    but it returns the error about bind value parameter in & out doesn't set.
    I also try to same SQL with other tools but only one tool could succeed
    executing which is Osqledit.
    SQL*Developper--------No
    Object Browser--------No
    Sql*Plus-------No
    Osqledit-----Yes
    does anybody know why some sql tools couldn't succeed executing
    same sql such as Osqledit?
    and also in this case often to cause or not?
    thank you for reading and helping me.

    thanks SHUBH I think so too.
    To Colin and others,
    here is my SQL query which wasn't written in English so
    it took me for a while to translate.
    and it very long SQL which my co-worker made it.
    sorry for it unable to read easily tho I need your help.
    in additon, we use bind-values on this SQL.
    select
         shopcode,
         JAN,
         h.lowestestprice,
         h.highestprice,
         h.amount,
         h.totalsales,
         h.retailprice,
         h.aprice,
         h.normalamount,
         h.normaltotalsales,
         h.normalretailprice,
         h.normalaprice,
         h.discountamount,
         h.discounttotalsales,
         h.discountretailprice,
         h.discountaprice,
         h.memberamount,
         h.memberretailprice,
         h.memberretailprice,
         h.memberaprice,
         h.normalreserveamount,
         h.discountreserveamount
    from
              select
              shopcode,
                   JANcode JAN,
                   min(lowestestprice) lowestestprice,
                   max(highestprice) highestprice,
                   sum(amount) amount,
                   sum(totalsales) totalsales,
                   sum(retailprice) retailprice,
                   sum(aprice) aprice,
                   sum(normalamount) normalamount,
                   sum(normaltotalsales) normaltotalsales,
                   sum(normalretailprice) normalretailprice,
                   sum(normalaprice) normalaprice,
                   sum(discountamount) discountamount,
                   sum(discounttotalsales) discounttotalsales,
                   sum(discountretailprice) discountretailprice,
                   sum(discountaprice) discountaprice,
                   sum(memberamount) memberamount,
                   sum(membertotalsales) membertotalsales,
                   sum(memberretailprice) memberretailprice,
                   sum(memberaprice) memberaprice,
                   sum(normalreserveamount)
    normalreserveamount,
                   sum(discountreserveamount)
    discountreserveamount
              from
                   testsalesfact
              where
                   salesdate between :begindate and :enddate
              group by
                   shopcode,
                   JANcode
         ) h
         full outer join
              select
                   shopcode,
                   JANcode,
    min(lowestestprice) lowestestprice,
                   max(highestprice) highestprice,
                   sum(amount) amount,
                   sum(totalsales) totalsales,
                   sum(retailprice) retailprice,
                   sum(aprice) aprice,
                   sum(normalamount) normalamount,
                   sum(normaltotalsales) normaltotalsales,
                   sum(normalretailprice) normalretailprice,
                   sum(normalaprice) normalaprice,
                   sum(discountamount) discountamount,
                   sum(discounttotalsales) discounttotalsales,
                   sum(discountretailprice) discountretailprice,
                   sum(discountaprice) discountaprice,
                   sum(memberamount) memberamount,
                   sum(membertotalsales) membertotalsales,
                   sum(memberretailprice) memberretailprice,
                   sum(memberaprice) memberaprice,
                   sum(normalreserveamount)
    normalreserveamount,
                   sum(discountreserveamount)
    discountreserveamount
              from
                   shopweeksaleswk
              where
                   salesdate between :begindate and :enddate
              group by shopcode, JAN
              union all
              select
                   a.shopcode,
                   a.JAN,
                   min(a.pricewiotax) lowestestprice,
              -     max(a.pricewiotax) highestprice,
                   sum(a.amount) amount,
                   sum(a.totalsales) totalsales,
                   sum(a.retailprice) retailprice,
                   sum(a.aprice) aprice,
                   sum(a.normalamount) normalamount,
                   sum(a.normaltotalsales) normaltotalsales,
                   sum(a.normalretailprice) normalretailprice,
                   sum(a.normalaprice) normalaprice,
                   sum(a.discountamount) discountamount,
                   sum(a.discounttotalsales) discounttotalsales,
                   sum(a.discountretailprice) discountretailprice,
                   sum(a.discountaprice) discountaprice,
                   sum(a.memberamount) memberamount,
                   sum(a.membertotalsales) membertotalsales,
                   sum(a.memberretailprice) memberretailprice,
                   sum(a.memberaprice) memberaprice,
                   sum(a.normalreserveamount)
    normalreserveamount,
                   sum(a.discountreserveamount)
    discountreserveamount
              from (
                   select
                        p.shopcode,
                        substr(p.makedate, 1, 8) salesdate,
                        p.JAN,
                        p.pricewiotax,
                        p.amount amount,
                        trunc(p.amount * p.pricewiotax)
    totalsales,
                        trunc(p.amount * decode
    (p.discountcode, '000000',
                        p.retailprice, p.discountretailprice))
    retailprice,
                        decode(decode
    (p.discountcode, '000000',
    p.retailprice,
                        p.discountretailprice), 0, 0,
                        trunc(p.amount * p.pricewiotax) -
                        trunc(p.amount * decode
    (p.discountcode, '000000',
                        p.retailprice, p.discountretailprice)))
    aprice,               
                        decode(p.discountcode, '000000',
    p.amount, 0) normalamount,
                        decode(p.discountcode, '000000',
                        trunc(p.amount * p.pricewiotax), 0)
    normaltotalsales,
                        decode(p.discountcode, '000000',
                        trunc(p.amount * p.totalsales), 0)
    normalretailprice,
                        decode(p.totalsales, 0, 0, decode
    (p.discountcode, '000000',
                        trunc(p.amount * p.pricewiotax) -
                        trunc(p.amount * p.retailprice), 0))
    normalaprice,
                        decode(p.discountcode, '000000', 0,
    p.amount) discountamount,
                        decode(p.discountcode, '000000', 0,
                        trunc(p.amount * p.pricewiotax))
    discounttotalsales,
                        decode(p.discountcode, '000000', 0,
                        trunc(p.amount *
    p.discountretailprice))
    discountretailprice,
                        decode(p.discountretailprice, 0, 0,
                   decode(p.discountcode, '000000', 0,
                   trunc(p.amount * p.pricewiotax)
                        trunc(p.amount *
    p.discountretailprice))) discountaprice,
                        case when substr(p.cardnumber,
    1, 7) in
    ('4986428', '4986429', '4986554')
                        then p.amount else 0 end
    memberamount,
                        case when substr(p.cardnumber,
    1, 7) in
    ('4986428', '4986429', '4986554')
                        then trunc(p.amount * p.pricewiotax)
    else 0 end membertotalsales,
                        case when substr(p.cardnumber,
    1, 7) in
    ('4986428', '4986429', '4986554') then
                        trunc(p.amount * decode
    (p.discountcode, '000000',
    p.retailprice,
                        p.discountretailprice)) else 0 end
    memberretailprice,
                        case when substr(p.cardnumber,
    1, 7) in
    ('4986428', '4986429', '4986554') then
                        decode(decode
    (p.discountcode, '000000',
    p.retailprice, p.discountretailprice),
    0, 0,
                        trunc(p.amount * p.pricewiotax) -
                        trunc(p.amount * decode
    (p.discountcode,'000000',
                        p.retailprice, p.discountretailprice)))
    else 0 end memberaprice,
                        decode(p.discountcode, '000000',
                   decode(p.discountsec, '07',
    p.amount, 0), 0)
    normalreserveamount,
                        decode(p.discountcode, '000000', 0,
                        decode(p.discountsec, '07',
    p.amount, 0)) discountreserveamount
                   from shopweeksaleswk p
                   where p.salesdate between :begindate
    and :enddate
                   and p.makedate not between
                   :begindate|| '000000 '
    and :enddate|| '000000 '
                   ) a
              group by a.shopcode, a.JAN
              union all     
              select
                   a.shopcode,
                   a.JAN,
                   min(a.pricewiotax) lowestestprice,
                   max(a.pricewiotax) highestprice,
                   sum(a.amount) amount,
                   sum(a.totalsales) totalsales,
                   sum(a.retailprice) retailprice,
                   sum(a.aprice) aprice,
                   sum(a.normalamount) normalamount,
                   sum(a.normaltotalsales) normaltotalsales,
                   sum(a.normalretailprice) normalretailprice,
                   sum(a.normalaprice) normalaprice,
                   sum(a.discountamount) discountamount,
                   sum(a.discounttotalsales) discounttotalsales,
                   sum(a.discountretailprice) discountretailprice,
                   sum(a.discountaprice) discountaprice,
                   sum(a.memberamount) memberamount,
                   sum(a.membertotalsales) membertotalsales,
                   sum(a.memberretailprice) memberretailprice,
                   sum(a.memberaprice) memberaprice,
                   sum(a.normalreserveamount)
    normalreserveamount,
                   sum(a.discountreserveamount)
    discountreserveamount
              from (
                   select
                        p.shopcode,
                        substr(p.makedate, 1, 8) salesdate,
                        p.JAN,
                        p.pricewiotax,
                        p.amount *- 1 amount,
                        trunc(p.amount * p.pricewiotax) *- 1
    totalsales,
                        trunc(p.amount * decode
    (p.discountcode, '000000',
                        p.retailprice, p.discountretailprice)) *-
    1 retailprice,
                        decode(decode
    (p.discountcode, '000000',
                        p.retailprice, p.discountretailprice),
    0, 0,
                        trunc(p.amount * p.pricewiotax) -
                        trunc(p.amount * decode
    (p.discountcode, '000000',
                        p.retailprice, p.discountretailprice))) *-
    1 aprice,
                        decode(p.discountcode, '000000',
    p.amount, 0) *- 1 normalamount,
                        decode(p.discountcode, '000000',
    trunc(p.amount * p.pricewiotax), 0) *
                        - 1 normaltotalsales,
                        decode(p.discountcode, '000000',
    trunc(p.amount * p.retailprice), 0) *
                        - 1 normalretailprice,
                        decode(p.retailprice, 0, 0, decode
    (p.discountcode, '000000',
                        trunc(p.amount * p.pricewiotax) -
                        trunc(p.amount * p.retailprice), 0)) *- 1
    normalaprice,
                        decode(p.discountcode, '000000', 0,
    p.amount) *- 1 discountamount,
                        decode(p.discountcode, '000000', 0,
    trunc(p.amount * p.pricewiotax)) *
                        - 1 discounttotalsales,
                        decode(p.discountcode, '000000', 0,
                        trunc(p.amount *
    p.discountretailprice)) *- 1
    discountretailprice,
                        decode(p.discountretailprice, 0, 0,
    decode(p.discountcode, '000000', 0,
                        trunc(p.amount * p.pricewiotax) -
                        trunc(p.amount *
    p.discountretailprice))) *- 1
    discountaprice,
                        case when substr(p.cardnumber,
    1, 7) in
    ('4986428', '4986429', '4986554')
                        then p.amount *- 1 else 0 end
    memberamount,
                        case when substr(p.cardnumber,
    1, 7) in
    ('4986428', '4986429', '4986554')
                        then trunc(p.amount * p.pricewiotax) *-                                                                1 else 0 end membertotalsales,
                        case when substr(p.cardnumber,
    1, 7) in
    ('4986428', '4986429', '4986554')
                        then trunc(p.amount * decode
    (p.discountcode, '000000',
                        p.retailprice, p.discountretailprice)) *-
    1 else 0 end memberretailprice,
                        case when substr(p.cardnumber,
    1, 7) in
    ('4986428', '4986429', '4986554')
                        then decode(decode
    (p.discountcode, '000000',
    p.retailprice,
    p.discountretailprice), 0, 0,
                        trunc(p.amount * p.pricewiotax) -
    trunc(p.amount *
                        decode(p.discountcode,'000000',
    p.retailprice, p.discountretailprice))) *
                        - 1 else 0 end memberamount,
                        decode(p.discountcode, '000000',
    decode(p.discountsec, '07',
    p.amount, 0), 0)*
                        -1 normalreserveamount,
                        decode(p.discountcode, '000000', 0,
    decode(p.discountsec, '07',
    p.amount, 0))*
                        -1 discountreserveamount
                   from shopweeksaleswk p
                   where p.salesdate not between :begindate
    and :enddate
                   and p.makedate
    between :begindate|| '000000 '
    and :enddate|| '000000 '
                   ) a
              group by a.shopcode, a.JAN
         ) m
         using (shopcode,JAN)
    where
         and h.lowestestprice != m.lowestestprice
         or h.highestprice != m.highestprice
         (h.amount != m.amount
         or h.totalsales != m.totalsales
         or h.aprice != m.aprice
         or h.normalamount != m.normalamount
         or h.normaltotalsales != m.normaltotalsales
         or h.normalretailprice != m.normalretailprice
         or h.normalaprice != m.normalaprice
         or h.discountamount != m.discountamount
         or h.discounttotalsales != m.discounttotalsales
         or h.discountretailprice != m.discountretailprice
         or h.discountaprice != m.discountaprice
         or h.memberamount != m.memberamount
         or h.membertotalsales != m.membertotalsales
         or h.memberretailprice != m.memberretailprice
         or h.memberaprice != m.memberaprice
         or h.normalreserveamount != m.normalreserveamount
         or h.discountreserveamount != m.discountreserveamount)
    order by shopcode, JAN ;

  • Can we use SQL developer tool to READ/WRITE BerkeleyDB by any means

    We use Berkeley Db as a persistent database, which holds data less frequently changed data. Can is it possible to use SQL Developer tool or any other front end tool that can connect and communicate to Berkeley db file for INSERT, UPDATE, DELETE records.

    I assume you're referring to Berkeley DB SQL (BDB SQL API).
    SQL Developer is not certified to work with BDB SQL; see the SQL Developer Certifications page.
    Something similar was asked some time ago, about connecting JDeveloper to BDB SQL; see this Re: How connect Oracle JDeveloper 11g to Berkeley DB 11g. The SQL tools in JDeveloper and SQL Developer are similar and built on the same components, so my answer there can be extended to SQL Developer as well. While you can probably have SQL Developer properly connect to a BDB SQL database, I am afraid you won't be able to do more than just viewing the data; likely any attempt to generate DDL or DML statements, export data, or run DML statements against the database will fail.
    If you migrated to BDB SQL from SQLite and were using a front-end tool for SQLite, it should be possible to use that with BDB SQL as well.
    Regards,
    Andrei

Maybe you are looking for

  • How do I add a printer connected to another iMac on the network to my printer list?

    How do I add an Epson printer connected to an iMac on the network to the printer list on my MacBook Pro? I cannot get it to show up in the list for printers to add.

  • In RG23D  Register is it possible to update general sales

    HI, Experteese, My Client is a Trading Industry  and they will do most of the times imports and becz nature of business he will pass excise benefit to some particular excisable customers, *here is the issue  In SAP we can  make entry of vendor excise

  • 1:N mappimg

    hi all,       Can any one suggest me, how to use 1: n mapping . I did mapping sourse msg(1) with target msg (N) .   On testing in msg mapping and interface mapping it shows successfully done. while sxmb_moni i found the error   <SAP:Category>XIServer

  • How to import RAW+JPG?

    I recently acquired a Canon 30D and am now able to save my images in RAW+JPG format, which gives me the normal RAW (CR2) file and a JPEG file for each capture. This is handy for using the picture styles where the RAW is the normal full capture of col

  • HTML-LITE format?

    Can we use this type of email? please help... dave....