MTD numbers using OLAP features of SQL

Hi
I have the following table:
Table_1
app_num,
app_Date
outcome
Table_2
app_num,
app_Status
Here's the query that I am using to get count of applications
SELECT TO_CHAR (a.app_Date, 'Mon-YYYY') AS MTH_Year,
a.outcome,
b.app_status,
COUNT (a.app_num)
FROM table_1 a, table_2 b
WHERE a.app_num = b.app_num
GROUP BY TO_CHAR (a.app_Date, 'Mon-YYYY'), a.outcome, b.app_status
This query will give me month wise count of applications split by outcome and app_status.
Now if I add from_Date, to_date parameters in the following manner:
SELECT TO_CHAR (a.app_Date, 'Mon-YYYY') AS MTH_Year,
a.outcome,
b.app_status,
COUNT (a.app_num)
FROM table_1 a, table_2 b
WHERE a.app_num = b.app_num
AND a.app_Date >= TO_DATE (:Fromdate, 'dd/MON/yyyHH:MI:SS')
AND a.app_date <= TO_DATE (:Fromdate, 'dd/MON/yyyHH:MI:SS')
GROUP BY TO_CHAR (a.app_Date, 'Mon-YYYY'), a.outcome, b.app_status
How can I get MTD numbers using any OLAP features (like partitioning etc.) from the above-mentioned query?
Thanks

Hi,
Perhaps this is what you want:
SELECT    TO_CHAR ( TRUNC (a.app_Date, 'MONTH')
              , 'Mon-YYYY'
            )                    AS MTH_Year
,       a.outcome
,       b.app_status
,       COUNT (a.app_num)               AS month_cnt
,       SUM (COUNT (a.app_num)) OVER ( PARTITION BY  a.outcome
                                        ,            b.add_status
                          ORDER BY      TRUNC (a.app_Date, 'MONTH')
                            )       AS cumm_cnt
FROM      table_1 a
,       table_2 b
WHERE        a.app_num     = b.app_num
AND        a.app_Date     >= TO_DATE (:Fromdate, 'dd/MON/yyyHH:MI:SS')
AND        a.app_date      <= TO_DATE (:Fromdate, 'dd/MON/yyyHH:MI:SS')     -- Did you want :todate here?
GROUP BY  TRUNC (a.app_Date, 'MONTH'')
,            a.outcome
,       b.app_status
--        You may want an ORDER BY clause here
;I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Explain, using specific examples, how you get those results from that data. Define any special terms you use, such as "MTD".
Always say what version of Oracle you're using.
You'll get better replies sooner if you always include this information whenever you have a question.

Similar Messages

  • I have file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Ac

    I have pdf file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Acrobat X Pro and Windows -7 platform.

    Yes, I just want to cover up all the pages for those particular area of document numbers.
    Nothing sensitive about it. I just want to show the correct document numbers on all pages in print out.
    So, I wanted to cover up by comments, but commenting on each page will be difficult. So, I wanted to comment the same on all pages.

  • Filemaker Pro 11 - some useful new features

    Just upgraded from Filemaker Pro 9 to 11. There are some useful new features listed at: http://www.filemaker.com.au/products/filemaker-pro/whats-new.html
    At last I will be able to generate charts from datasets, without needing an add-on.
    I have been using the ancient DOS software Open Access (no relation to MS Access) for charting relational SQL databases since 1987. I still use Open Access within DOSBOX for OS X for some complex data processing tasks. Tips at
    http://users.tpg.com.au/aoaug/mac_vpc.html

    I am not an expert in Filemaker But I have been playing with it quite a bit recently. It sounds like you have opened some of the ports required but not all. All IWP is a webpage that is hosted (by the sounds of it) on your local machine you will need to make sure all required ports are open like port 80 for http. I would start by setting the default host on the airport using the airport utility.
    You will want to set this as the ip for the computer that has filemaker on it.
    Airport Utility > Network > Network Options
    You may also want to make sure you reserve this ip in the DHCP reservations section.
    If the IWP page works with this set up then you can work your way backwards opening the required ports ( have a look at this http://help.filemaker.com/app/answers/detail/a_id/6427/~/filemaker-server-and-fi lemaker-server-advanced-port-numbers )
    I had lots of problems with IWP but installing the server add on sorted this. The advantage to this is that the server add on configures your airport to use the machine as a server.
    Dropbox, log me in, back to my mac are slightly different from what you are doing. They are apps which are open and communicating with their respective servers. When you want to host a web site or even just VNC into a mchine you have to have the ports set to forward accordingly, this is because an outside machine is attempting to initiate the contact. This is what the firewalls and security that comes with modern routers are designed to prevent.
    I hope I have helped, I can see your question is quite old.  I saw your topic whilst looking to solve a problem my own.

  • Enterprise feature usage: SQL Profile

    Is SQL Profile an enterprise Edition feature only?  As in, just making use of a profile that was not created in this database?
    I've got a development environment, which is licensed for everything.  I create an SQL Profile for a bad statement on that Enterprise database, then I transfer it to a standard edition database using:
    How to copy SQL Profile from one database to another one. | David Marcos&amp;#039; Blog
    When I now execute the statement, I can see that it used the profile, but the following statement returns no hits for me having used this feature:
    col name for a50
    alter session set nls_date_format='dd month yyyy';
    select '##  Enterprise Edition Feature Usage Overview:' from dual;
    Select name,version,first_usage_date,last_usage_date from dba_feature_usage_statistics where name in ('Advanced Replication','AWR Report','AWR Baseline','Automatic Workload Repository','Backup Encryption','Backup ZLIB Compression','Block Media Recovery','Database Replay: Workload Capture','Database Replay: Workload Replay','Diagnostic Pack','EM Performance Page','Flashback Database','Label Security','OLAP - Analytic Workspaces','OLAP - Cubes','Oracle Secure Backup','Parallel SQL DDL Execution','Parallel SQL DML Execution','Parallel SQL Query Execution','Partitioning (user)','Real-Time SQL Monitoring','Result Cache','SQL Monitoring and Tuning pages','SQL Plan Management','SQL Tuning Set (user)','SecureFile Encryption (user)','Spatial','Tune MView','Tuning Pack','Automatic Maintenance - SQL Tuning Advisor','SQL Profile','SQL Tuning Advisor','SQL Tuning Set (user)') and first_usage_date is not null order by first_usage_date asc;
    So my question is: if i've not created the profile in the Standard Edition database... it's just been imported from another database... Am I violating my licensing?

    Hi,
    > So my question is: if i've not created the profile in the Standard Edition database... it's just been imported from another database... Am I violating my licensing?
    You are even violating your Oracle EE license, if you do not have a valid Diagnostics + Tuning pack for it. You can reproduce this very easily as described by Kerry Osborne here: Licensing Requirements for SQL Profiles
    SQL Plan Management is included in Oracle EE as an alternative for example: Does the use of SQL Plan Management and the DBMS_SPM database package require a tuning or diagnostic pack license?
    Regards
    Stefan

  • Error using Data Miner on SQL Developer

    Dear all.
    I'm trying to use Data Miner on SQL Developer (3.1.06) with Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 -
    64bit Production, with the Partitioning, OLAP, Data Mining and Real Application Testing options.
    I created a project, a workflow, a data source, a classification model and connected them.
    I tried to show the Decision Tree generated as described in the tutorial "Using Oracle Data Miner 11g Release 2".
    But, I receive the message "It's not possible to load the data mining model because it does not exist" in a dialog box entitled "Model not found".
    It seems that something was missing either during installation or granting my user.
    Does anybody have seen this message and know what causes it?
    Any other suggestion is welcome.
    Regards,
    Duncan
    PUCRS-Brazil

    Hi Mark.
    Thank you on replying my post.
    I'm not the DBA of Oracle repository here. So, if possible, I'd like to address my issue without having to do anything in it.
    I'll try to state better what we have here.
    When I try to use latest SQL Developer version, 11.2.1.1.7.42, it got me a message stating current repository isn't compatible with this SQLDev version
    Repository version is: 11.2.1.1.3
    I don't know what type of upgrade SQL Developer wants to do...
    About your other questions.
    "Is the model not found error occurring for all models or just the DT model?" -- The error occurs for all 4 standard models: SVM, GLM, NB and DT. But, I'm able to see all other options: "show tests results", "Compare tests results".
    You did not report that the workflow failed, so you must be seeing a successful completion status for each of the nodes. -- Yes, all steps are executed and finished OK.
    Are you using a proxy user or some other connection definition other than a standard connection. -- No.
    There is currently some problems supporting proxy based connections that will be fixed in a upcoming SQL Developer release.
    So, if you can provide me some details on how your connection is defined, that will be helpful.
    How was the product installed and the user granted rights? -- I need to ask PUCRS DBA team to answer these questions.
    Was it done through the UI or by running the scripts in the dataminer/scripts directory?
    Lastly, what is your client operating system and are you using the SQL Dev 64 bit or 32 bit release? -- I tested in 2 different computers, both with Windows 7 Professional. In my notebook, it's 64 bits OS version.
    Thank you for your attention and kind reply.
    Regards,
    Duncan

  • XSQL Using bind params with sql LIKE clause

    I am unable to use a bind-param with the LIKE clause in a SELECT statement.
    eg call .../temp.xsql?name=N
    XSQL query is this:
    <xsql:query max-rows="-1" bind-params="name">
    SELECT last_name
    FROM emp
    WHERE last_name LIKE '?%'
    </xsql:query>
    I have tried a few combinations so far with no success eg:
    WHERE last_name LIKE '{@name}%'
    WHERE last_name LIKE ?||%
    Any ideas?

    I highly recommend using XSQL's real bind variable feature wherever you can. You can read about it in the XSQL Online Documentation (Search for the "Using Bind Variables" section).
    Using this feature is more performant and more secure than using textual substitution variables.
    Here's what your page looks like using textual substitution:
    <page connection="UTD4" xmlns:xsql="urn:oracle-xsql">
      <xsql:query null-indicator="yes" >
        SELECT * FROM TC_HL7_SEG WHERE SEGMENT_CODE LIKE '{@code}%'
      </xsql:query>
    </page> .
    And here's what it would look like using real bind variables:
    <page connection="UTD4" xmlns:xsql="urn:oracle-xsql">
      <xsql:query null-indicator="yes" bind-params="code">
        SELECT * FROM TC_HL7_SEG WHERE SEGMENT_CODE LIKE ?||'%'
      </xsql:query>
    </page> .
    Using real bind variables allows the database to avoid reparsing the SQL statement everytime, which improves performance.
    Steve Muench
    JDeveloper/BC4J Development Team
    Author, Building Oracle XML Applications

  • How to use parameters in oracle SQL script????

    Right now I am writing a SQL script to create a schema and build the objects of this schema....
    I use a .net winform program to run sqlplus to parse this sql script ...
    The problem is that the schema name and the tablespace's location and the sys password must be input by the user, so my SQL script should use these runtime input parameters instead of const parameters....
    So, how to use parameter in SQL script ...........
    Are there some example scripts in oracle home directory for me to refer to????

    Hi,
    UNISTD wrote:
    thanks .....
    what's the difference between variable , define, accept in sqlplus ???VARIABLE declares (but does not assign a value to) a bind variable. Unlike substitution variables, bind variables are passed to the back end to be compiled, and they can only be values in certain data types. You can not use a bind vaiable in place of an identifier, so to do something like
    CREATE USER  &1 ...a bind variable won't work.
    "DEFINE x = y" sets the substitution variable &x to have the value y. There is no user interaction (unless x or y happen to contain undefined substtiution variables).
    "DEFINE x" shiows the value of the substitution variable &x, or, if it is undefined, raises a SQL*Plus error. I use this feature below.
    ACCEPT sets a substitution variable with user interaction.
    And if the user miss some parameters in “sqlplus /nolog ssss.sql par1 par2 par5 par6”, how to use default value of the miss parameters??Don't you need a @ befiore the script name, e.g.
    sqlplus /nolog @ssss.sql par1 par2 par5 par6Sorry, I don't know of any good way to use default values.
    The foloowing works, but, as you can see, it's ugly.
    "DEFINE 1" display a message like
    DEFINE 1            = "par1" (CHAR)if &1 is defined; otherwise,it will display a SQL*Plus error message like
    SP2-035: symbol 1 is UNDEFINEDNotice that the former contains an '=' sign, but the latter does not.
    The best way I know to use default values is to run the DEFINE command, save the output to a filee, read the file, and see if it's an error message or not.
    So you can use a script like this:
    --     This is  DEFINE_DEFAULT.SQL
    SPOOL     got_define_txt.sql
    DEFINE     &dd_old
    SPOOL     OFF
    COLUMN     dd_new_col     NEW_VALUE     &dd_new
    WITH     got_define_txt     AS
         SELECT  q'[
              @got_define_txt
    ]'               AS define_txt
         FROM    dual
    SELECT     CASE
             WHEN  define_txt LIKE '%=%'
             THEN  REGEXP_REPLACE ( define_txt
                               , '.+"
    ([^"]*)
                         , '\1'
             ELSE  '&dd_default'
         END        AS dd_new_col
    FROM     got_define_txt
    {code}
    and start your real script, ssss.sql, something like this:
    {code}
    DEFINE          dd_new     = sv1
    DEFINE          dd_old     = 1
    DEFINE          dd_default     = FOO
    @DEFINE_DEFAULT
    DEFINE          dd_new     = sv2
    DEFINE          dd_old     = 2
    DEFINE          dd_default     = "Testing spaces in value"
    @DEFINE_DEFAULT
    {code}
    when this finishes running, the substitution variable &sv1 will either have the value you passed in &1 or, if you didn't pass anything, the default value you specified, that is FOO.
    Likewise, &sw2 will have the value you passed, or, if you didn't pass anything, the 23-character string 'Testing spaces in value'.
    Here's how it works:
    Define_default.sql puts the output of the "DEFINE x" command into a column, define_txt, in a query.  That query displays either the existing value of the substitution variable indicated by &dd_old or, if it is undefined, the default value you want to use, which is stored in the substitution variable &dd_default.  The substitution variable named in &dd_new is always set to something, but that something may be its existing value.
    Notice that the paramerters to define_default.sql must be passed as global varibales.
    Why didn't I just use arguments, so that we could simply say:
    {code}
    @DEFINE_DEFAULT  sv1  1  FOO
    {code}
    ?  Because that would set the substitution variables &1, &2 and &3, which are miost likely the very ones in which you're interested.
    I repeat: there must be a better way, but I'm sorry, I don't know what it is.
    I usually don't do the method above.  Instead, I always pass the required number of parameters, but I pass dummy or plce-holder values.
    For example, if I wanted to call ssss.sql, but use defulat vlaues for &1 and &3, then I would say something like:
    {code}
    @ssss  ?  par2  ?
    {code}
    and, inside ssss.sql, test to see if the values are the place holder '?', and, if so, replace them with some real default value.  The use has  to remember what the special place holder-value is, but does not need to know anything more, and only ssss.sql itself needs to change if the default values change.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • SQL Server Audit Feature for SQL Azure

    What is the status of support for SQL Server Audit features in SQL Azure?  If auditing is supported in SQL Azure, can you point me to some resources that describe best practices for using auditing in SQL Azure?

    New feature in Azure SQL Database!
    Azure SQL Database Auditing tracks database events and writes audited events to an audit log in your Azure Storage account. Auditing is available in preview for Basic, Standard, and Premium service tiers. Auditing can help you maintain regulatory compliance,
    understand database activity, and gain insight into discrepancies and anomalies that could indicate business concerns or suspected security violations.
    See Get started with SQL database auditing
    http://azure.microsoft.com/en-us/documentation/articles/sql-database-auditing-get-started/
    Rick Byham, Microsoft, SQL Server Books Online, Implies no warranty

  • Is practising on Oracle OLAP features free with Oracle 11g EE?

    Hi,
    Is practising on Oracle OLAP features free with Oracle 11g EE??
    Information found in Internet:
    - Oracle Corporation markets the Oracle Database OLAP Option as an extra-cost option to supplement the "Enterprise Edition" of its database.
    - Oracle Database OLAP is there pre-installed along with the rest of Oracle Database EE. You just need to license it for use on the DB Machine when you choose to use it.
    - Oracle OLAP is a world class multidimensional analytic engine embedded in Oracle Database 11g.
    Please confirm if I can try some OLAP features in my office where I have Oracle 11g EE installed as I have been asked to do an initial POC?
    Regards,
    Sudhir

    Hi there,
    I believe that the OLAP license falls under the developer license on OTN - http://www.oracle.com/technetwork/testcontent/standard-license-088383.html
    You should contact your local Oracle sales rep if you are still unsure
    Thanks,
    Stuart Bunby
    OLAP Blog: http://oracleOLAP.blogspot.com
    OLAP Wiki: http://wiki.oracle.com/page/Oracle+OLAP+Option
    OLAP on OTN: http://www.oracle.com/technology/products/bi/olap/index.html
    DW on OTN : http://www.oracle.com/technology/products/bi/db/11g/index.html

  • How to use the transaction STO5 (SQL Trace)

    Hi,
        I want to check the performance of program using the ST05 transaction. Please send me the step by step procedure to trace my program.
    Thanks & Regards,
    Santhosh Kumar.R

    Hi,
    following explanation clearly you abt ST05
    Hi,
    SQL trace(ST05) provides the developer with the ability to analyse database select statements. Simply execute ST05 to turn on SQL trace, then execute the statement/program you want to analyse. Now turn off SQL trace using ST05
    and click on list trace to view the details.
    You can also perform traces on other items such as authorisation objects.
    The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
    The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on the SPFLI table in our test program is mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
    The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
    To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
    Performance Tuning is useful mainly reducing load on database. It is very important aspect while writing the programs/FM etc.....
    SQL Trace
    Use
    The SQL Trace function is an on-demand log of selected SQL statements that are issued against the database through the Open SQL Engine. The SQL Trace can be switched on or off dynamically. The log format is database independent. Besides the SQL statement text, each log record contains information about the point in time when the statement was executed, its duration, its input parameters and results (where applicable) as well as context information.
    Features
    The SQL Trace is especially useful for:
    Development:
    SQL Trace can help JDO, enterprise beans, servlet and JSP developers to learn which kind of database accesses their code produces.
    &#61489;&#61486; Performance analysis
    Typically, performance issues are caused by inefficient database accesses. In this case SQL Trace can be used to show the issued SQL statements and their duration, thus helping to identify inefficient SQL statements.
    Functions
    <b>The following functions are available on the initial screen</b>:
    Select trace:
    • Select the trace mode SQL Trace, Enqueue Trace, RFC Trace, or Table Buffer Trace. You can select mutliple trace modes simultaneously.
    Select trace function:
    • Start the trace recording.
    • Stop the trace recording.
    • Branch to trace list, detailed list, or time-sorted list.
    • Branch to Explain SQL to analyze an SQL statement without an explicit trace file.
    Trace files are managed by the system. Thus they can be saved, like any other object;
    saved trace files can be displayed and deleted.
    Trace Status
    A trace can only be activated once on any application server. The Trace Status display informs you whether another user in the system has already activated a particular trace.
    Starting the Trace
    Prerequisites
    <b>You can only switch on the Performance Trace for a single instance</b>. You should already have decided the scope and targets of your performance analysis.
    Procedure
    <b>To analyze a trace file, do the following</b>:
    ... 1. Choose the menu path Test &#61614; Performance Trace in the ABAP Workbench.
    The initial screen of the test tool appears. In the lower part of the screen, the status of the Performance Trace is displayed. This provides you with information as to whether any of the Performance Traces are switched on and the users for which they are enabled. It also tells you which user has switched the trace on.
    2. Using the selection buttons provided, set which trace functions you wish to have switched on (SWL trace, enqueue trace, RFC trace, table buffer trace).
    3. If you want to switch on the trace under your user name, choose Trace on.
    If you want to pass on values for one or several filter criteria, choose Trace with Filter.
    Typical filter criteria are: the name of the user, transaction name, process name, and program name.
    4. Now run the program to be analyzed.
    You will normally analyze the performance trace file immediately. In this case, it is a good idea to use a separate session to start, stop, and analyze the Performance Trace
    If you are shown trace kernel errors on the initial screen (for example, not enough storage space available), you must first remove the errors or have them removed by your system administrator.
    The selected trace types can be changed as required during a performance trace interval (time between switching on and off the trace). The user (user group) must remain unchanged.
    Result
    The results of the trace recording are written to a trace file. If trace records are overwritten during the trace interval, the system displays a message to inform you when you analyze the trace file.
    The results of the trace recording are stored to ten trace files. Overwriting trace records, however, cannot be entirely excluded in this case either.
    The Performance Trace records all database access calls, table buffer calls, remote calls, or calls for user lock activity. These measurements can affect the performance of the application server where the trace is running. To preserve system performance, you should therefore turn off the trace as soon as you finish recording your application.
    Stopping the Trace
    Prerequisites
    You have started the trace and finished running the program that you want to analyze.
    <b>For performance reasons, you should switch off the traces as soon as you have finished recording.</b>
    Procedure
    <b>To deactivate the trace:</b>
    ... 1. Choose Test &#61614;Performance Trace in the ABAP Workbench.
    The initial screen of the test tool appears. It contains a status line displaying the traces that are active, the users for whom they are active, and the user who activated them.
    2. Select the trace functions that you want to switch off.
    3. Choose Deactivate Trace.
    If you started the trace yourself, you can now switch it off immediately. If the performance trace was started by a different user, a confirmation prompt appears before deactivation-
    Result
    The results of the trace are stored in one or more trace files. You can then analyze the performance data stored in the trace file. See also, Analyzing Performance Data.
    Look at the below link
    http://www.sapbrainsonline.com/TOOLS/SQLTRACE/SQL_TRACE.html
    <b>Reward with points if helpful.</b>
    Regards,
    Vijay

  • Using SSAS to analyze sql server performance

    Hi Folks,
    I have a database repository database where i store info about all 160 sql servers.
    Can i use ssas to analyze that data i am dba is there any sample cube which does this stuff.
    Any help highly appreciated !!
    Thanks,
    Ashwin.

    Hi Ashwin,
    According to your description, all 160 SQL servers information were stored in the repository database, now what you want is using SQL Server Analysis Services, right?
    Analysis Services is a data source that serves as the Semantic layer for all your BI clients. It’s where you can define important business entities such as product lines or service offerings in one place with all the key metrics
    supporting them. In your scenario, if you have created a multidimensional database based on this database, you can create several of KPI to analyze the servers' performance. Here are some links for you reference.
    http://www.angelsbiblog.com/2013/01/why-analysis-services.htmlhttp://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-in-SQL-Server-Analysis-Serv
    If you haven't create a SSAS database, you can refer to the link below to see how to monitor multiple servers.
    http://sqldmvstats.codeplex.com/discussions/32622
    Regards,
    Charlie Liao
    TechNet Community Support

  • Can I chart in Numbers using AppleScript

    I have just started learning AppleScript so that I can automate some business processes and save myself some time. Because of better design and ease of use I use the latest version of iWork and don't even have Office installed on my Mac, nor do I want to install it. However, one area I cannot work out is how to automate the creation of a chart in Numbers using AppleScript.
    Is this possible? If so, how, and if not, why not?

    Answering questions like : how may we do this or that, is what we are supposed to try to achieve in this forum.
    Answering questions like yours : why this or that, can't be seriously done here.
    Here you ask to end users like you. We don't belong to the teams designing the apps.
    We just may try to guess.
    To build tables and charts Pages and Numbers share the same pieces of code so there is no technical reasons able to explain the omission.
    So I guess that, as Pages is in its 4th version, designers had more time available to embed features in the AppleScript support than those working upon Numbers.
    What's funny is that there is a minimal support for charts in Pages (as well as a microscopic support for tables) but there is a correct support for tables (which may be enhanced) in Numbers but nothing for charts.
    Honestly, I really don't think that the difference is huge.
    I posted my script too fast.
    I forgot to insert the handler allowing us to bring a sheet at front which is required to apply GUIScripting.
    It's probably the main drawback of the need to use GUIScripting here.
    I don't waste time trying to apply some edit tasks to the charts.
    I just wanted to fill the gap between Pages and Numbers about scripting charts.
    Here is an enhanced version.
    --{code}
    --[SCRIPT add_charts]
    Yvan KOENIG (VALLAURIS, France)
    2011/08/27
    on run
              my activateGUIscripting()
              tell application "Numbers" to tell document 1
                        set dName to its name
                        set sName1 to name of sheet 1
                        set sName2 to name of sheet 2
    Select sheet 1 of document 1
    The doc name may be passed by a number but the sheet must be identified by its name .
    As it's just a sample, in the first call I reference the doc by its index *)
                        my selectSheet(1, sName1)
                        tell sheet sName1 to tell table 1
    Always define the selection before creating a chart *)
                                  set selection range to range (name of cell 4 of column 2 & " : " & name of cell 8 of column 3)
                                  my selectSubMenu("Numbers", 5, 4, 9) -- Scatter chart
    Always define the selection before creating a chart *)
                                  set selection range to range (name of cell 4 of column 2 & " : " & name of cell 8 of column 3)
                                  my selectSubMenu("Numbers", 5, 4, 3) -- Bars
    Always define the selection before creating a chart *)
                                  set selection range to range (name of cell 4 of column 2 & " : " & name of cell 8 of column 3)
                                  my selectSubMenu("Numbers", 5, 4, 4) -- Stacked Bars
    Always define the selection before creating a chart *)
                                  set selection range to range (name of cell 4 of column 3 & " : " & name of cell 8 of column 3)
                                  my selectSubMenu("Numbers", 5, 4, 20) -- 3D Pie
                        end tell
    Select sheet 2 of document 1
    This time, I reference the document by its name *)
                        my selectSheet(dName, sName2)
                        tell sheet sName2 to tell table 1
    Always define the selection before creating a chart *)
                                  set selection range to range (name of cell 4 of column 2 & " : " & name of cell 8 of column 3)
                                  my selectSubMenu("Numbers", 5, 4, 9) -- Scatter chart
    Always define the selection before creating a chart *)
                                  set selection range to range (name of cell 4 of column 2 & " : " & name of cell 8 of column 3)
                                  my selectSubMenu("Numbers", 5, 4, 3) -- Bars
    Always define the selection before creating a chart *)
                                  set selection range to range (name of cell 4 of column 2 & " : " & name of cell 8 of column 3)
                                  my selectSubMenu("Numbers", 5, 4, 4) -- Stacked Bars
    Always define the selection before creating a chart *)
                                  set selection range to range (name of cell 4 of column 3 & " : " & name of cell 8 of column 3)
                                  my selectSubMenu("Numbers", 5, 4, 20) -- 3D Pie
                        end tell --sheet 2…
              end tell -- Numbers…
    end run
    --=====
    on parleAnglais()
              local z
              try
                        tell application "Numbers" to set z to localized string "Cancel"
              on error
                        set z to "Cancel"
              end try
              return (z is not "Annuler")
    end parleAnglais
    --=====
    on activateGUIscripting()
      (* to be sure than GUI scripting will be active *)
              tell application "System Events"
                        if not (UI elements enabled) then set (UI elements enabled) to true
              end tell
    end activateGUIscripting
    --=====
    ==== Uses GUIscripting ====
    on selectSheet(theDoc, theSheet)
              script myScript
                        property listeObjets : {}
                        local maybe, targetSheetRow
                        tell application "Numbers"
      activate
                                  set theDoc to name of document theDoc (* useful if the passed value is a number *)
                                  tell document theDoc to set my listeObjets to name of sheets
                        end tell -- "Numbers"…
                        set maybe to theSheet is in my listeObjets
                        set my listeObjets to {} -- So it will not be saved in the script *)
                        if not maybe then
                                  if my parleAnglais() then
                                            error "The sheet “" & theSheet & "” is unavailable in the spreadsheet “" & theDoc & "” !"
                                  else
                                            error "La feuille « " & theSheet & " » n’existe pas dans le tableur « " & theDoc & " » ! "
                                  end if -- my parleAnglais
                        end if -- not maybe
                        set maybe to 5 > (system attribute "sys2")
                        tell application "System Events" to tell application process "Numbers"
                                  tell outline 1 of scroll area 1 of splitter group 1 of splitter group 1 of window theDoc
                                            if maybe then (* macOS X 10.4.x
    '(value of attributes contains 0)': '(value of attribute "AXDisclosureLevel" is 0)' sometimes works in Tiger, sometimes not.
    The only possible instances of 0 amongst the attributes are the disclosure level of a sheet row and the index of the first row, which represents a sheet anyway.
    Another possibility is '(value of attribute -1 is 0)', which makes me uneasy. *)
                                                      set targetSheetRow to first row where ((value of attributes contains 0) and (value of first static text is theSheet))
                                            else (* macOS X 10.5.x or higher *)
                                                      set targetSheetRow to first row where ((value of attribute "AXDisclosureLevel" is 0) and ((groups is {}) and (value of first static text is theSheet)) or (value of first group's first static text is theSheet))
                                            end if -- maybe…
    Handler modified to accomodate sheets requiring a lot of time to get the focus
                                            tell targetSheetRow to set value of attribute "AXSelected" to true
                                            set cnt to 0
                                            repeat (*
    Must way that Numbers becomes ready to receive the value *)
                                                      try
                                                                tell targetSheetRow to set value of attribute "AXDisclosing" to true
                                                                exit repeat
                                                      on error
                                                                set cnt to cnt + 1
      delay 0.5 -- half a second
                                                      end try
                                            end repeat
                                  end tell -- outline…
                        end tell -- "System Events"…
                        tell application "Numbers" to tell document theDoc to tell sheet theSheet to tell table 1
                                  with timeout of 20 * 60 seconds (*
    WITH this setting, the script will be able to wait 20 minutes for the asked value.
    I hope that the document will not be so huge that this delay prove to be too short. *)
                                            value of cell "A1"
                                  end timeout
                        end tell -- "Numbers"…
                        tell application "System Events" to tell application process "Numbers" (*
    Do the trick one more time to be sure that the sheet is open *)
                                  tell targetSheetRow to set value of attribute "AXDisclosing" to true
                        end tell -- "System Events"…
    End of the modified piece of code
              end script
      run myScript
    end selectSheet
    --=====
    my selectSubMenu("Pages",6, 4, 26)
    ==== Uses GUIscripting ====
    on selectSubMenu(theApp, mt, mi, ms)
              tell application theApp
      activate
                        tell application "System Events" to tell process theApp to tell menu bar 1 to ¬
                                  tell menu bar item mt to tell menu 1 to tell menu item mi to tell menu 1 to click menu item ms
              end tell -- application theApp
    end selectSubMenu
    --=====
    useful to get the indexs of the triggered item
    my select_SubMenu("Numbers", 6, 4, 3) (* Table > Chart> Bars *)
    on select_SubMenu(theApp, mt, mi, ms)
              tell application theApp
      activate
                        tell application "System Events" to tell process theApp to tell menu bar 1
                                  get name of menu bar items
    01 - "Apple",
    02 - "Numbers",
    03 - "Fichier",
    04 - "Édition",
    05 - "Insertion",
    06 - "Tableau",
    07 - "Format",
    08 - "Disposition",
    09 - "Présentation",
    10 - "Fenêtre",
    11 - "Partage",
    12 - "Aide"}
                                  get name of menu bar item mt
      -- {"Tableau"}
                                  tell menu bar item mt to tell menu 1
                                            get name of menu items
    01 - "Feuille",
    02 -  missing value,
    03 - "Tableau",
    04 - "Graphique",
    05 - "Figure",
    06 - "Zone de texte",
    07 - "Fonction",
    08 - "Ligne de connexion",
    09 - missing value,
    10 - "Remplissage",
    11 - missing value,
    12 - "Rangs copiés",
    13 - "Colonnes copiées",
    14 - missing value,
    15 - "Date et heure",
    16 - "Nom du fichier",
    17 - "Numéro de page",
    18 - "Nombre de pages",
    19 - missing value,
    20 - "Commentaire",
    21 - "Lien",
    22 - "Saut de colonne",
    23 - "Équation MathType",
    24 - missing value,
    25 - "Choisir…"}
                                            get name of menu item mi
      --> "Graphique"
                                            tell menu item mi to tell menu 1
                                                      get name of menu items
    01 - "Colonnes",
    02 - "Colonnes empilées",
    03 - "Barres",
    04 - "Barres empilées",
    05 - "Ligne",
    06 - "Couches",
    07 - "Couches empilées",
    08 - "Diagramme circulaire",
    09 - "Nuage de points",
    10 - "Mixte",
    11 - "2 axes",
    12 - missing value,
    13 - "Colonnes 3D",
    14 - "Colonnes 3D empilées",
    15 - "Barres 3D",
    16 - "Barres 3D empilées",
    17  - "Linéaire 3D",
    18 - "Couches 3D",
    19 - "Couches 3D empilées",
    20 - "Circulaire 3D"}
                                                      get name of menu item ms
      --> "Barres"
      click menu item ms
                                            end tell
                                  end tell
                        end tell
              end tell -- application theApp
    end select_SubMenu
    --=====
    --[/SCRIPT]
    --{code}
    Yvan KOENIG (VALLAURIS, France) samedi 27 août 2011 15:19:15
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How to round numbers using javascript in Adobe Acrobat Pro?

    How to round numbers using java script in Adobe Acrobat Pro?
    For example:
    1.2 becomes 1.0
    1.7 becomes 2.0
    Thank you.

    Assuming you've already set the field to a Number format category and limited it to one digit to the right of the decimal, you can use the following custom Validate script:
    // Custom Validate script
    event.value = Math.round(event.value);
    More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/roun d

  • Report using the feature of opening Excel in SAP.

    We are building a custom report using the feature of opening Excel in SAP.
    We need to do things like:
    Protect the worksheet, but leave some rows unprotected
    Freeze the windows
    Have any one ever used this feature before? Can any know how to do this?
    Thank you,
    PV

    No, no extra somewhere.  What it actually is, is that you are calling the methods of the application(sort of).  Here is an example application which does to the freeze panes.
    report zrich_0001.
    include ole2incl.
    data: e_sheet type ole2_object.
    data: e_appl  type ole2_object.
    data: e_work  type ole2_object.
    data: e_col1  type ole2_object.
    data: e_col2  type ole2_object.
    data: e_cols  type ole2_object.
    data: e_cell  type ole2_object.
    data: e_wind  type ole2_object.
    data: field_value(30) type c.
    parameters: p_file type localfile default 'C:RichTest.xls'.
    start-of-selection.
    * Start the application
      create object e_appl 'EXCEL.APPLICATION'.
      set property of e_appl 'VISIBLE' = 1.
    * Open the file
      call method of e_appl 'WORKBOOKS' = e_work.
      call method of e_work 'OPEN'
              exporting
                   #1 = p_file.
    * Write data to the excel file
      do 20 times.
    * Create the value
        field_value  = sy-index.
        shift field_value left deleting leading space.
        concatenate 'Cell' field_value into field_value separated by space.
    * Position to specific cell  in  Column 1
        call method of e_appl 'Cells' = e_cell
               exporting
                    #1 = sy-index
                    #2 = 1.
    * Set the value
        set property of e_cell 'Value' = field_value .
    * Position to specific cell  in  Column 2
        call method of e_appl 'Cells' = e_cell
               exporting
                    #1 = sy-index
                    #2 = 2.
    * Set the value
        set property of e_cell 'Value' = field_value .
    * Position to specific cell  in  Column 3
        call method of e_appl 'Cells' = e_cell
               exporting
                    #1 = sy-index
                    #2 = 3.
    * Set the value
        set property of e_cell 'Value' = field_value .
      enddo.
      call method of e_appl 'Columns' = e_col1
             exporting
                  #1 = 1.
      call method of e_appl 'Columns' = e_col2
              exporting
                  #1 = 2.
      call method of e_appl 'Range' = e_cols
              exporting
                #1 = e_col1
                #2 = e_col2.
      call method of e_cols 'Select' .
      get property of e_appl 'ActiveWindow' = e_wind.
      set property of  e_wind 'FreezePanes' = 1.
    ** Close the file
    *  call method of e_work 'close'.
    ** Quit the file
    *  call method of  e_appl  'QUIT'.
    *  free object e_appl.
    Regards,
    Rich Heilman

  • Using MapViewer from PL/SQL vs Java

    Hi group!
    The MapViewer User's Guide has this to say about using MapViewer from PL/SQL:
    "The usage model for the SDO_MVCLIENT package is almost identical to that of
    MapViewer JavaBean-based API" etc etc .. "For usage and reference information about specific functions or procedures, see the description of the associated JavaBean-Based API. methods and interfaces in Chapter 4"
    If I don't misunderstand the basic concept, in a Java Web App (using the MapViewer Bean) you create a MapViewer object for each HTTP-user-session, like so:
    MapViewer mv = new MapViewer("http://my_corp.com:8888/mapviewer/omserver");
    ... which you would then store in the user's session object, so that the MapViewer Bean conveniently holds the map's state on the user's behalf.
    To do the equivalent in PL/SQL, the User's Guide suggests:
    "connect scott/tiger
    call sdo_mvclient.createmapviewerclient(
    'http://www.mycorp.com:8888/mapviewer/omserver') ;
    The preceding example creates, in the current session, a unique MapViewer client
    handle to the MapViewer service URL"
    Does "current session" refer to the HTTP-user-session? While I've used PL/SQL before, I've not used the PL/SQL Web Toolkit. Is the session handling implicit here (and invisible?) or should the sdo_mvclient be subsequently stored in the PL/SQL equivalent of a (J2EE) HttpSession object?
    YT

    Part of the answer will depend on how you plan to deploy the application. If you have a few, local clients you could go with the traditional client/server model. If you have a lot of clients and/or they are spread out over a relatively large area (like a campus setting), a web front-end will save you a lot of hassels down the road when it comes time to upgrade.
    Regardless of the the front end, I can tell you that I have been greatly impressed with the throughput you can get by moving most of the code to PL/SQL packages. A few years ago we reworked a VB/Oracle app by moving a lot of the code out of VB and into packages, leaving the client to essentially call procedures and format the output. We had more than a 3x performance increase on the same hardware and our network utilization decreased noticably.
    I am now in the process of replacing the client code with Java servlets/JSP, primarily because of the maintenance hassles I mentioned earlier. There are some limitations with an HTML page but most of these have been cosmetic so far.
    We are still relying heavily on PL/SQL packages. The servlet code basically gets a request, calls a package to get the data, then hands the results to a JSP page. The JSP then formats the output and sends it to the client. We are little more than halfway through the re-write, but it appears performance will increase again. Not as noticably as before, but I will take what I can get. As you have seen, once something is rolled out it always ends up getting used more than you anticipated. Better to over-engineer now than have to patch it once it is live.
    HTH

Maybe you are looking for