Common queries

hello guys
can any real time experienced guys give five examples of queries/reports in following areas...
1.bank
2.IT Company
3.Manufacturing company(which makes cement,tarmac)
4.Chemicals/Medicines compnay
BR,
nr
Edited by: new rider on Feb 6, 2009 8:43 AM

Hi
help.sap.com would be the best source to see this.
Banking
http://help.sap.com/saphelp_nw70/helpdata/EN/19/027ae476b04166840793f0402703d7/frameset.htm
IT Company
http://help.sap.com/saphelp_nw70/helpdata/EN/e0/740ea205824793a62d9223be0ac78f/frameset.htm
others search for Industry Specifc

Similar Messages

  • Welcome to the SQL Server Disaster Recovery and Availability Forum

    (Edited 8/14/2009 to correct links - Paul)
    Hello everyone and welcome to the SQL Server Disaster Recovery and Availability forum. The goal of this Forum is to offer a gathering place for SQL Server users to discuss:
    Using backup and restore
    Using DBCC, including interpreting output from CHECKDB and related commands
    Diagnosing and recovering from hardware issues
    Planning/executing a disaster recovery and/or high-availability strategy, including choosing technologies to use
    The forum will have Microsoft experts in all these areas and so we should be able to answer any question. Hopefully everyone on the forum will contribute not only questions, but opinions and answers as well. I’m looking forward to seeing this becoming a vibrant forum.
    This post has information to help you understand what questions to post here, and where to post questions about other technologies as well as some tips to help you find answers to your questions more quickly and how to ask a good question. See you in the group!
    Paul Randal
    Lead Program Manager, SQL Storage Engine and SQL Express
    Be a good citizen of the Forum
    When an answer resolves your problem, please mark the thread as Answered. This makes it easier for others to find the solution to this problem when they search for it later. If you find a post particularly helpful, click the link indicating that it was helpful
    What to post in this forum
    It seems obvious, but this forum is for discussion and questions around disaster recovery and availability using SQL Server. When you want to discuss something that is specific to those areas, this is the place to be. There are several other forums related to specific technologies you may be interested in, so if your question falls into one of these areas where there is a better batch of experts to answer your question, we’ll just move your post to that Forum so those experts can answer. Any alerts you set up will move with the post, so you’ll still get notification. Here are a few of the other forums that you might find interesting:
    SQL Server Setup & Upgrade – This is where to ask all your setup and upgrade related questions. (http://social.msdn.microsoft.com/Forums/en-US/sqlsetupandupgrade/threads)
    Database Mirroring – This is the best place to ask Database Mirroring how-to questions. (http://social.msdn.microsoft.com/Forums/en-US/sqldatabasemirroring/threads)
    SQL Server Replication – If you’ve already decided to use Replication, check out this forum. (http://social.msdn.microsoft.com/Forums/en-US/sqlreplication/threads)
    SQL Server Database Engine – Great forum for general information about engine issues such as performance, FTS, etc. (http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/threads)
    How to find your answer faster
    There is a wealth of information already available to help you answer your questions. Finding an answer via a few quick searches is much quicker than posting a question and waiting for an answer. Here are some great places to start your research:
    SQL Server 2005 Books Onlinne
    Search it online at http://msdn2.microsoft.com
    Download the full version of the BOL from here
    Microsoft Support Knowledge Base:
    Search it online at http://support.microsoft.com
    Search the SQL Storage Engine PM Team Blog:
    The blog is located at https://blogs.msdn.com/sqlserverstorageengine/default.aspx
    Search other SQL Forums and Web Sites:
    MSN Search: http://www.bing.com/
    Or use your favorite search engine
    How to ask a good question
    Make sure to give all the pertinent information that people will need to answer your question. Questions like “I got an IO error, any ideas?” or “What’s the best technology for me to use?” will likely go unanswered, or at best just result in a request for more information. Here are some ideas of what to include:
    For the “I got an IO error, any ideas?” scenario:
    The exact error message. (The SQL Errorlog and Windows Event Logs can be a rich source of information. See the section on error logs below.)
    What were you doing when you got the error message?
    When did this start happening?
    Any troubleshooting you’ve already done. (e.g. “I’ve already checked all the firmware and it’s up-to-date” or "I've run SQLIOStress and everything looks OK" or "I ran DBCC CHECKDB and the output is <blah>")
    Any unusual occurrences before the error occurred (e.g. someone tripped the power switch, a disk in a RAID5 array died)
    If relevant, the output from ‘DBCC CHECKDB (yourdbname) WITH ALL_ERRORMSGS, NO_INFOMSGS’
    The SQL Server version and service pack level
    For the “What’s the best technology for me to use?” scenario:
    What exactly are you trying to do? Enable local hardware redundancy? Geo-clustering? Instance-level failover? Minimize downtime during recovery from IO errors with a single-system?
    What are the SLAs (Service Level Agreements) you must meet? (e.g. an uptime percentage requirement, a minimum data-loss in the event of a disaster requirement, a maximum downtime in the event of a disaster requirement)
    What hardware restrictions do you have? (e.g. “I’m limited to a single system” or “I have several worldwide mirror sites but the size of the pipe between them is limited to X Mbps”)
    What kind of workload does you application have? (or is it a mixture of applications consolidated on a single server, each with different SLAs) How much transaction log volume is generated?
    What kind of regular maintenance does your workload demand that you perform (e.g. “the update pattern of my main table is such that fragmentation increases in the clustered index, slowing down the most common queries so there’s a need to perform some fragmentation removal regularly”)
    Finding the Logs
    You will often find more information about an error by looking in the Error and Event logs. There are two sets of logs that are interesting:
    SQL Error Log: default location: C:\Program Files\Microsoft SQL Server\MSSQL.#\MSSQL\LOG (Note: The # changes depending on the ID number for the installed Instance. This is 1 for the first installation of SQL Server, but if you have mulitple instances, you will need to determine the ID number you’re working with. See the BOL for more information about Instance ID numbers.)
    Windows Event Log: Go to the Event Viewer in the Administrative Tools section of the Start Menu. The System event log will show details of IO subsystem problems. The Application event log will show details of SQL Server problems.

    hi,I have a question on sql database high availability. I have tried using database mirroring, where I am using sql standard edition, in this database mirroring of synchronous mode is the only option available, and it is giving problem, like sql time out errors on my applicatons since i had put in the database mirroring, as asynchronous is only available on enterprise version, is there any suggestions on this. thanks ---vijay

  • What's the best out-of-the-box web interface for a SQL DB?

    I'm developing a Java web application that will be backed by an Oracle database. Users would like a simple web interface that allows them to accomplish what they could with SQL queries without knowing SQL. The basic operations would be:
    * displaying a database table in a table format
    * downloading the table as a text or Excel file
    * customizing the columns in a table display
    * displaying a query result set in a table format
    * constructing a query using drop-down menus
    I'd probably want to program in a simplified UI for a few common queries.
    This really looks like functionality someone should have invented before me. Question: what is the right tool for me to be using? I'm surprised I haven't found something by searching.
    It looks like I could just directly write JSP, but I think something else might be simpler. I think related functionality exists in Spring, but I didn't find exactly what I'm looking for, and Spring brings a lot of other stuff also. Nothing in my application is more complicated than this, so I'd be happy to keep things simple.
    How would you write this?
    Edited by: 1010007 on Jun 5, 2013 7:22 AM

    Welcome to the forum!
    >
    I'm developing a Java web application that will be backed by an Oracle database. Users would like a simple web interface that allows them to accomplish what they could with SQL queries without knowing SQL. The basic operations would be:
    * displaying a database table in a table format
    * downloading the table as a text or Excel file
    * customizing the columns in a table display
    * displaying a query result set in a table format
    * constructing a query using drop-down menus
    I'd probably want to program in a simplified UI for a few common queries.
    This really looks like functionality someone should have invented before me. Question: what is the right tool for me to be using? I'm surprised I haven't found something by searching.
    It looks like I could just directly write JSP, but I think something else might be simpler. I think related functionality exists in Spring, but I didn't find exactly what I'm looking for, and Spring brings a lot of other stuff also. Nothing in my application is more complicated than this, so I'd be happy to keep things simple.
    How would you write this?
    >
    I wouldn't write it. I would just use Oracle's FREE Apex application which does all of that and more and is fully supported even on Oracle's FREE Express edition data database.
    http://www.oracle.com/technetwork/developer-tools/apex/overview/index.html
    >
    About Application Express
    Oracle Application Express (Oracle APEX), formerly called HTML DB, is a fully supported "no-cost" option of the Oracle Database. Oracle Application Express is certified against all editions of the Oracle Database 10.2.0.3 and above, including Oracle Database 10g Express Edition (Oracle XE).
    Oracle Application Express installs as part of the seed database installation with Oracle Database 11g.
    >
    The feature page (http://apex.oracle.com/pls/otn/f?p=4600:6:0) describes some of the major features of Apex
    >
    Browser Based
    Using only a Web browser and limited programming experience you can develop data centric applications in minutes. Browser-based development enables you to develop applications on most computers using only a modern Web browser.
    Rapid Application Development (RAD)
    Use simple wizards and declarative programming to create powerful reporting and data entry applications. You can create applications from spreadsheet uploads, or on existing database tables and views. Oracle Application Express includes SQL Workshop to create and manage the database objects that support your application.
    Application Express Components
    Application Builder - Database Applications
    Application developers use wizards to declaratively assemble applications organized in pages. Page content is organized into regions. Regions can contain text, custom PL/SQL, reports, charts, maps, calendars, web service references or forms. Forms are made up of fields (called items) which can be selected from the multitude of built-in types (such as text fields, text areas, radio groups, select lists, check boxes, date pickers, and popup list of values) or a developer can create their own types using plug-in support. Table update functionality is built-in and PL/SQL can be used to process data. Session state (or application context) is transparently managed and the user interface presentation is separated from the application logic so that the look and feel of an application can be changed simply by selected a different theme.
    Application Builder - Websheets
    Using Websheet Applications, end users can manage structured and unstructured data without developer assistance. Page sections contain unstructured data and are edited using a WYSIWYG editor. Reports provide access to database data by writing SQL. Data Grids can manage structured data without writing SQL. Adding columns, renaming column, and validations are defined using runtime dialogs. Each page and row of data grid data can be annotated with files, tags, notes, and links. Pages can contain sections as well as reports and data grids and all can be linked together providing navigation. All information is searchable and completely controlled by the end-user.
    SQL Workshop
    The SQL Workshop provides tools that enable you to view and manage database objects. Object Browser enables you to use a tree control to view object properties and create new objects. The SQL Command tool enables you to enter ad-hoc SQL. Query Builder enables you to create join queries using drag and drop. SQL Scripts enables you to store and run scripts. The Data Workshop enables you to load and unload text, DML, and spreadsheet data.
    RESTful Services
    RESTful Services allow for the declarative specification of RESTful services mapped to SQL and PL/SQL.
    Team Development
    Team Development helps manage the life-cycle of an application's development. It provides tracking and management of application features, to do entries, bugs, and end user feedback. Team Development is tightly integrated with the Oracle Application Express Application Builder. For example, edit page lists open feedback, bugs, and to do's.
    Administration
    Each Oracle Application Express workspace is a separate application development environment that is fully insulated from other workspaces. The administration component provides workspace management, including services (available schemas, space requests, and preferences), users (both developers and end-users), and workspace activity (page views, login attempts, and developer activity). Access is limited to Oracle Application Express developers who have workspace administration privileges.

  • Flash Player wont run!

    I have been trying for 2 weeks now to get this to work and am at my end.  I have tried everything that is suggested to troubleshoot this and I cant figure it out.  It started when I tried to play on a video poker web site.  I had played just the evening before and when I logged on it said that I needed to download the flash player  It shows that I have downloaded it but it doesnt install and run.  Help!

    Hello, follow sufferers:
    I decided to start a Case with Adobe Support.  I have not tried this yet, because I do not have another 2 hours to kill at the moment, but even if it ultimately doesn't work for me, it may work for you, so I'm posting the response anyway:
    Thank you for contacting Adobe Support. I am responding in reference to
    the Web Request posted on 14th October 2009 regarding, "Adobe Flash
    Player".
    As I understand that you are not able to watch videos and are getting
    the errors regarding the Flash Player. I understand your concern and
    assure you that we will both find a resolution for that together.
    [Awwwww, isn't that sweet?  So nice to be understood!  I suddenly feel so confident that we'll work together towards a resolution!! ~ HS]
    As you said that you have already tried to uninstall and then reinstall
    the Flash Player. Sometimes what happens is that after the uninstall
    some components are left in the system and when reinstalled it will
    create the same errors. So, I would suggest to follow the link given
    below and download and run the utility to remove the Flash Player and
    ActiveX control:
    http://go.adobe.com/kb/ts_tn_14157_en-us
    Please download and run the utility for MAC. After you have done that
    please download and install the Flash Player 10 from the link given
    below:
    http://get.adobe.com/flashplayer/?promoid=BUIGP
    This should resolve all the issues you are facing, however, if doesn't
    get resolved, please follow the link below to troubleshoot the error:
    http://go.adobe.com/kb/ts_tn_19166_en-us
    I hope this information is helpful and if in case you face any issues or
    need any clarification you can contact us we will be more than happy to
    help you.
    For future reference please use TS Case Number : 181226540 at Web
    Support Portal : http://www.adobe.com/go/supportportal
    For future references on common queries and their responses, kindly
    visit our online forums by visiting the link mentioned below:
    www.forums.adobe.com
    Also, you can visit our Knowledge Base for any queries:
    http://www.adobe.com/cfusion/search/index.cfm?cat=support
    <(>&<)>loc=en_us
    It was nice interacting with you and your suggestion will certainly help
    Adobe grow in the future. [They really do care! ~HS]
    Warm Regards,
    Devendra Singh,
    Adobe Support.
    Also, I received a response from Firefox, but the link to it is bad and it will take me awhile to find it.  Will report back later.

  • View Column info not displaying in Columns Tab

    Running XP SP2 and SQL Developer 1.5.1 5440
    When looking at views that are using tables from another schema. I don't see any of the columns information. I have DBA role
    In rel 1.1.2.25 2579 I see them just fine. (Both loaded on machine right now)
    Is this a bug or do I have a setting problem?

    Barry,
    As a "disclaimer", the points below are based on my usage of SQL Developer and things that bug me about how it works or doesn't work - I know that there are more important things to fix than a number of these.
    On to the basics ... and the most basic of the basics for a tool like SQL Developer:
    1) Problems with data dictionary queries in navigator or object tabs:
    - Triggers not listed in Table tab if trigger owned by different schema to table owner
    - Index columns not listed in Table tab if index owned by different schema to table owner
    - View columns not listed in View tab if view owned by different schema to current user
    - Dependencies not listed in Table/View tab if other object owned by different schema to object owner
    - Performance of Table Node (outer join added in 1.5.1)
    - there are a lot of other posts about the supplied data dictionary queries not producing the right results and I often find that I am querying the data dictionary directly in a SQL Worksheet for information that should be correct in the navigator/object tabs
    Basic things that I expect to work in a tool like SQL Developer (or to work given that they have been included):
    1) Popup Describe problems
    - schema name is case sensitive, so doesn't find owner.object
    - synonym overrides schema name (OWNER.OBJECT will describe local OBJECT synonym instead of OWNER's object)
    - position based object name selection includes punctuation
    2) Bind variables that work properly in PL/SQL (both Execute Statement and Run Script)
    3) Package decomposition in object navigator doesn't report variables or constants of custom types and lists object.column%type constants as "constant"
    4) Exporting query results re-executes query to display Export dialog - this presents as SQL Developer freezing after selecting the Export menu option for queries that take a long time for first record to appear
    I would use SQL Developer more (or more of SQL Developer) if:
    1) More integrated file based development - I still do the bulk of my object creation (largely PL/SQL and views) editing in Wordpad and running via SQL*Plus largely because I get better error reporting.
    - display the compile message tab when using the compile button for a file
    - show errors doesn't work for views
    2) Running Reports hang SQL Developer - I still have my SQL scripts for my common queries, which I can run through SQL Worksheet in a much friendlier fashion (I can cancel them and they don't hang SQL Dev) than I can run reports
    Problems that detract from the "polish" of SQL Developer, but don't really have a big impact on usage but discourage me from trying to "convert" non-techie TOAD using colleagues:
    1) Multiple TNSNAMES files read - generates multiple entries
    2) Export of long string literals causes ORA-972 error
    3) "Statement Processed" feedback is extremely sensitive to spaces ("create Statement Processed" where two spaces between the create and view keywords) and assumes simple statements ("create unique Statement Processed" or "create or replace force Statement Processed" as examples)
    I think that makes 10 basics to fix (although some as just issues that make the tool look unpolished), however, it does seem as though testing in the following areas could be significantly better:
    1) Regression testing - a number of bugs seem to crop up again after being fixed in earlier versions
    2) Navigator/object tab queries - especially with multi-schema applications (ie Oracle eBusiness Suite) and just generally objects owned by other schemas
    3) Performance with large DBs in terms of object count (ie Oracle eBusiness Suite)
    As a final note, it is my impression that SQL Developer development has been unbalanced in focusing too much on including new functionality (which is good) and not enough on getting existing functionality right (which is better).
    I hope this helps (and wasn't too long) ...
    theFurryOne

  • Help for management software for datacenter

    Hi,
    I'm working on open -source hobby project for managing datacenter. Shortly explained administrators enter information about the devices (servers, network equipment end etc.) and create file for every server. There are also billing scheduled task and etc.
    The interface is written in PHP and the database will be Oracle XE.
    I'm not experienced Oracle administrator. I'm Linux administrator. Would help me optimizing the database structure. I'll be glad if someone optimize the database structure. Here is the database structure.
    http://rs866tl.rapidshare.com/cgi-bin/upload.cgi?rsuploadid=12969973362014196
    and here
    http://www.4shared.com/file/uZWPcuf7/table_structuretxt.html
    Edited by: user10484841 on Sep 1, 2010 2:04 AM

    It does not make a lot of sense to optimize a physical schema if you don't know how the schema is going to be used:
    Please read Principles of Application Design and Tuning in http://download.oracle.com/docs/cd/E11882_01/server.112/e10713/cncptdev.htm#CHDEHHIJ
    >
    Design the data model with the goal of good performance
    Typically, attempts to use generic data models result in poor performance. A well-designed data model answer the most common queries as efficiently as possible. For example, the data model should use the type of indexes that provide the best performance. Tuning after deployment is undesirable because changes to logic and physical structures may be difficult or impossible.

  • Very Slow Query with CTE inner join

    I have 2 tables (heavily simplified here to show relevant columns):
    CREATE TABLE tblCharge
    (ChargeID int NOT NULL,
    ParentChargeID int NULL,
    ChargeName varchar(200) NULL)
    CREATE TABLE tblChargeShare
    (ChargeShareID int NOT NULL,
    ChargeID int NOT NULL,
    TotalAmount money NOT NULL,
    TaxAmount money NULL,
    DiscountAmount money NULL,
    CustomerID int NOT NULL,
    ChargeShareStatusID int NOT NULL)
    I have a very basic View to Join them:
    CREATE VIEW vwBASEChargeShareRelation as
    Select c.ChargeID, ParentChargeID, s.CustomerID, s.TotalAmount, isnull(s.TaxAmount, 0) as TaxAmount, isnull(s.DiscountAmount, 0) as DiscountAmount
    from tblCharge c inner join tblChargeShare s
    on c.ChargeID = s.ChargeID Where s.ChargeShareStatusID < 3
    GO
    I then have a view containing a CTE to get the children of the Parent Charge:
    ALTER VIEW [vwChargeShareSubCharges] AS
    WITH RCTE AS
    SELECT ParentChargeId, ChargeID, 1 AS Lvl, ISNULL(TotalAmount, 0) as TotalAmount, ISNULL(TaxAmount, 0) as TaxAmount,
    ISNULL(DiscountAmount, 0) as DiscountAmount, CustomerID, ChargeID as MasterChargeID
    FROM vwBASEChargeShareRelation Where ParentChargeID is NULL
    UNION ALL
    SELECT rh.ParentChargeID, rh.ChargeID, Lvl+1 AS Lvl, ISNULL(rh.TotalAmount, 0), ISNULL(rh.TaxAmount, 0), ISNULL(rh.DiscountAmount, 0) , rh.CustomerID
    , rc.MasterChargeID
    FROM vwBASEChargeShareRelation rh
    INNER JOIN RCTE rc ON rh.PArentChargeID = rc.ChargeID and rh.CustomerID = rc.CustomerID
    Select MasterChargeID as ChargeID, CustomerID, Sum(TotalAmount) as TotalCharged, Sum(TaxAmount) as TotalTax, Sum(DiscountAmount) as TotalDiscount
    from RCTE
    Group by MasterChargeID, CustomerID
    GO
    So far so good, I can query this view and get the total cost for a line item including all children.
    The problem occurs when I join this table. The query:
    Select t.* from vwChargeShareSubCharges t
    inner join
    tblChargeShare s
    on t.CustomerID = s.CustomerID
    and t.MasterChargeID = s.ChargeID
    Where s.ChargeID = 1291094
    Takes around 30 ms to return a result (tblCharge and Charge Share have around 3.5 million records).
    But the query:
    Select t.* from vwChargeShareSubCharges t
    inner join
    tblChargeShare s
    on t.CustomerID = s.CustomerID
    and t.MasterChargeID = s.ChargeID
    Where InvoiceID = 1045854
    Takes around 2 minutes to return a result - even though the only charge with that InvoiceID is the same charge as the one used in the previous query.
    The same thing occurs if I do the join in the same query that the CTE is defined in.
    I ran the execution plan for each query. The first (fast) query looks like this:
    The second(slow) query looks like this:
    I am at a loss, and my skills at decoding execution plans to resolve this are lacking.
    I have separate indexes on tblCharge.ChargeID, tblCharge.ParentChargeID, tblChargeShare.ChargeID, tblChargeShare.InvoiceID, tblChargeShare.ChargeShareStatusID
    Any ideas? Tested on SQL 2008R2 and SQL 2012

    >> The database is linked [sic] to an established app and the column and table names can't be changed. <<
    Link? That is a term from pointer chains and network databases, not SQL. I will guess that means the app came back in the old pre-RDBMS days and you are screwed. 
    >> I am not too worried about the money field [sic], this is used for money and money based calculations so the precision and rounding are acceptable at this level. <<
    Field is a COBOL concept; columns are totally different. MONEY is how Sybase mimics the PICTURE clause that puts currency signs, commas, period, etc in a COBOL money field. 
    Using more than one operation (multiplication or division) on money columns will produce severe rounding errors. A simple way to visualize money arithmetic is to place a ROUND() function calls after 
    every operation. For example,
    Amount = (Portion / total_amt) * gross_amt
    can be rewritten using money arithmetic as:
    Amount = ROUND(ROUND(Portion/total_amt, 4) * 
    gross_amt, 4)
    Rounding to four decimal places might not seem an 
    issue, until the numbers you are using are greater 
    than 10,000. 
    BEGIN
    DECLARE @gross_amt MONEY,
     @total_amt MONEY,
     @my_part MONEY,
     @money_result MONEY,
     @float_result FLOAT,
     @all_floats FLOAT;
     SET @gross_amt = 55294.72;
     SET @total_amt = 7328.75;
     SET @my_part = 1793.33;
     SET @money_result = (@my_part / @total_amt) * 
    @gross_amt;
     SET @float_result = (@my_part / @total_amt) * 
    @gross_amt;
     SET @Retult3 = (CAST(@my_part AS FLOAT)
     / CAST( @total_amt AS FLOAT))
     * CAST(FLOAT, @gross_amt AS FLOAT);
     SELECT @money_result, @float_result, @all_floats;
    END;
    @money_result = 13525.09 -- incorrect
    @float_result = 13525.0885 -- incorrect
    @all_floats = 13530.5038673171 -- correct, with a -
    5.42 error 
    >> The keys are ChargeID(int, identity) and ChargeShareID(int, identity). <<
    Sorry, but IDENTITY is not relational and cannot be a key by definition. But it sure works just like a record number in your old COBOL file system. 
    >> .. these need to be int so that they are assigned by the database and unique. <<
    No, the data type of a key is not determined by physical storage, but by logical design. IDENTITY is the number of a parking space in a garage; a VIN is how you identify the automobile. 
    >> What would you recommend I use as keys? <<
    I do not know. I have no specs and without that, I cannot pull a Kabbalah number from the hardware. Your magic numbers can identify Squids, Automobile or Lady Gaga! I would ask the accounting department how they identify a charge. 
    >> Charge_Share_Status_ID links [sic] to another table which contains the name, formatting [sic] and other information [sic] or a charge share's status, so it is both an Id and a status. <<
    More pointer chains! Formatting? Unh? In RDBMS, we use a tiered architecture. That means display formatting is in a presentation layer. A properly created table has cohesion – it does one and only one data element. A status is a state of being that applies
    to an entity over a period time (think employment, marriage, etc. status if that is too abstract). 
    An identifier is based on the Law of Identity from formal logic “To be is to be something in particular” or “A is A” informally. There is no entity here! The Charge_Share_Status table should have the encoded values for a status and perhaps a description if
    they are unclear. If the list of values is clear, short and static, then use a CHECK() constraint. 
    On a scale from 1 to 10, what color is your favorite letter of the alphabet? Yes, this is literally that silly and wrong. 
    >> I understand what a CTE is; is there a better way to sum all children for a parent hierarchy? <<
    There are many ways to represent a tree or hierarchy in SQL.  This is called an adjacency list model and it looks like this:
    CREATE TABLE OrgChart 
    (emp_name CHAR(10) NOT NULL PRIMARY KEY, 
     boss_emp_name CHAR(10) REFERENCES OrgChart(emp_name), 
     salary_amt DECIMAL(6,2) DEFAULT 100.00 NOT NULL,
     << horrible cycle constraints >>);
    OrgChart 
    emp_name  boss_emp_name  salary_amt 
    ==============================
    'Albert'    NULL    1000.00
    'Bert'    'Albert'   900.00
    'Chuck'   'Albert'   900.00
    'Donna'   'Chuck'    800.00
    'Eddie'   'Chuck'    700.00
    'Fred'    'Chuck'    600.00
    This approach will wind up with really ugly code -- CTEs hiding recursive procedures, horrible cycle prevention code, etc.  The root of your problem is not knowing that rows are not records, that SQL uses sets and trying to fake pointer chains with some
    vague, magical non-relational "id".  
    This matches the way we did it in old file systems with pointer chains.  Non-RDBMS programmers are comfortable with it because it looks familiar -- it looks like records and not rows.  
    Another way of representing trees is to show them as nested sets. 
    Since SQL is a set oriented language, this is a better model than the usual adjacency list approach you see in most text books. Let us define a simple OrgChart table like this.
    CREATE TABLE OrgChart 
    (emp_name CHAR(10) NOT NULL PRIMARY KEY, 
     lft INTEGER NOT NULL UNIQUE CHECK (lft > 0), 
     rgt INTEGER NOT NULL UNIQUE CHECK (rgt > 1),
      CONSTRAINT order_okay CHECK (lft < rgt));
    OrgChart 
    emp_name         lft rgt 
    ======================
    'Albert'      1   12 
    'Bert'        2    3 
    'Chuck'       4   11 
    'Donna'       5    6 
    'Eddie'       7    8 
    'Fred'        9   10 
    The (lft, rgt) pairs are like tags in a mark-up language, or parens in algebra, BEGIN-END blocks in Algol-family programming languages, etc. -- they bracket a sub-set.  This is a set-oriented approach to trees in a set-oriented language. 
    The organizational chart would look like this as a directed graph:
                Albert (1, 12)
        Bert (2, 3)    Chuck (4, 11)
                       /    |   \
                     /      |     \
                   /        |       \
                 /          |         \
            Donna (5, 6) Eddie (7, 8) Fred (9, 10)
    The adjacency list table is denormalized in several ways. We are modeling both the Personnel and the Organizational chart in one table. But for the sake of saving space, pretend that the names are job titles and that we have another table which describes the
    Personnel that hold those positions.
    Another problem with the adjacency list model is that the boss_emp_name and employee columns are the same kind of thing (i.e. identifiers of personnel), and therefore should be shown in only one column in a normalized table.  To prove that this is not
    normalized, assume that "Chuck" changes his name to "Charles"; you have to change his name in both columns and several places. The defining characteristic of a normalized table is that you have one fact, one place, one time.
    The final problem is that the adjacency list model does not model subordination. Authority flows downhill in a hierarchy, but If I fire Chuck, I disconnect all of his subordinates from Albert. There are situations (i.e. water pipes) where this is true, but
    that is not the expected situation in this case.
    To show a tree as nested sets, replace the nodes with ovals, and then nest subordinate ovals inside each other. The root will be the largest oval and will contain every other node.  The leaf nodes will be the innermost ovals with nothing else inside them
    and the nesting will show the hierarchical relationship. The (lft, rgt) columns (I cannot use the reserved words LEFT and RIGHT in SQL) are what show the nesting. This is like XML, HTML or parentheses. 
    At this point, the boss_emp_name column is both redundant and denormalized, so it can be dropped. Also, note that the tree structure can be kept in one table and all the information about a node can be put in a second table and they can be joined on employee
    number for queries.
    To convert the graph into a nested sets model think of a little worm crawling along the tree. The worm starts at the top, the root, makes a complete trip around the tree. When he comes to a node, he puts a number in the cell on the side that he is visiting
    and increments his counter.  Each node will get two numbers, one of the right side and one for the left. Computer Science majors will recognize this as a modified preorder tree traversal algorithm. Finally, drop the unneeded OrgChart.boss_emp_name column
    which used to represent the edges of a graph.
    This has some predictable results that we can use for building queries.  The root is always (left = 1, right = 2 * (SELECT COUNT(*) FROM TreeTable)); leaf nodes always have (left + 1 = right); subtrees are defined by the BETWEEN predicate; etc. Here are
    two common queries which can be used to build others:
    1. An employee and all their Supervisors, no matter how deep the tree.
     SELECT O2.*
       FROM OrgChart AS O1, OrgChart AS O2
      WHERE O1.lft BETWEEN O2.lft AND O2.rgt
        AND O1.emp_name = :in_emp_name;
    2. The employee and all their subordinates. There is a nice symmetry here.
     SELECT O1.*
       FROM OrgChart AS O1, OrgChart AS O2
      WHERE O1.lft BETWEEN O2.lft AND O2.rgt
        AND O2.emp_name = :in_emp_name;
    3. Add a GROUP BY and aggregate functions to these basic queries and you have hierarchical reports. For example, the total salaries which each employee controls:
     SELECT O2.emp_name, SUM(S1.salary_amt)
       FROM OrgChart AS O1, OrgChart AS O2,
            Salaries AS S1
      WHERE O1.lft BETWEEN O2.lft AND O2.rgt
        AND S1.emp_name = O2.emp_name 
       GROUP BY O2.emp_name;
    4. To find the level and the size of the subtree rooted at each emp_name, so you can print the tree as an indented listing. 
    SELECT O1.emp_name, 
       SUM(CASE WHEN O2.lft BETWEEN O1.lft AND O1.rgt 
       THEN O2.sale_amt ELSE 0.00 END) AS sale_amt_tot,
       SUM(CASE WHEN O2.lft BETWEEN O1.lft AND O1.rgt 
       THEN 1 ELSE 0 END) AS subtree_size,
       SUM(CASE WHEN O1.lft BETWEEN O2.lft AND O2.rgt
       THEN 1 ELSE 0 END) AS lvl
      FROM OrgChart AS O1, OrgChart AS O2
     GROUP BY O1.emp_name;
    5. The nested set model has an implied ordering of siblings which the adjacency list model does not. To insert a new node, G1, under part G.  We can insert one node at a time like this:
    BEGIN ATOMIC
    DECLARE rightmost_spread INTEGER;
    SET rightmost_spread 
        = (SELECT rgt 
             FROM Frammis 
            WHERE part = 'G');
    UPDATE Frammis
       SET lft = CASE WHEN lft > rightmost_spread
                      THEN lft + 2
                      ELSE lft END,
           rgt = CASE WHEN rgt >= rightmost_spread
                      THEN rgt + 2
                      ELSE rgt END
     WHERE rgt >= rightmost_spread;
     INSERT INTO Frammis (part, lft, rgt)
     VALUES ('G1', rightmost_spread, (rightmost_spread + 1));
     COMMIT WORK;
    END;
    The idea is to spread the (lft, rgt) numbers after the youngest child of the parent, G in this case, over by two to make room for the new addition, G1.  This procedure will add the new node to the rightmost child position, which helps to preserve the idea
    of an age order among the siblings.
    6. To convert a nested sets model into an adjacency list model:
    SELECT B.emp_name AS boss_emp_name, E.emp_name
      FROM OrgChart AS E
           LEFT OUTER JOIN
           OrgChart AS B
           ON B.lft
              = (SELECT MAX(lft)
                   FROM OrgChart AS S
                  WHERE E.lft > S.lft
                    AND E.lft < S.rgt);
    7. To find the immediate parent of a node: 
    SELECT MAX(P2.lft), MIN(P2.rgt)
      FROM Personnel AS P1, Personnel AS P2
     WHERE P1.lft BETWEEN P2.lft AND P2.rgt 
       AND P1.emp_name = @my_emp_name;
    I have a book on TREES & HIERARCHIES IN SQL which you can get at Amazon.com right now. It has a lot of other programming idioms for nested sets, like levels, structural comparisons, re-arrangement procedures, etc. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Importing Statistics - Oracle 11g upgrade

    Hi,
    We are in the middle for planning for migration of oracle 9.2.0.8 database hosted in HP-UX to oracle 11gR2 to Linix. The database size is 1 TB ( 400GB of table data & 600GB of index data).
    Please let us know whether we can use the option of import/export the statistics from the Oraclr 9i to oradle 11g database. The database is highly OLTP/Batch. Will it be any Query performance problem due to the statistics import from oracle 9i to oracle 11g.
    Any suggestion are welcome and let me know if you need any more information.
    thanks,
    Mahesh

    Hello,
    Please let us know whether we can use the option of import/export the statistics from the Oraclr 9i to oradle 11g databaseIf I were you, when the data are imported to the 11g Database I would refresh the Statistics by using the dbms_stats Package.
    Then, you can test the most common queries on the new Database. If some perfomance troubles appear, you can use classical tools (Statspack, Explain Plan, TKPROF,...) or some useful tools you have in 11g as SQL Tuning Advisor or SQL Access Advisor :
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/sql_tune.htm#PFGRF028
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/advisor.htm#PFGRF008
    Hope this help.
    Best regards,
    Jean-Valentin

  • OO Design--do ABAP Persistent Classes make sense for ALV reports in NW2004?

    Hello experts,
    At our company, we started using ABAP OO in the last year.
    I am on NW-2004 .  We just acquired a business that is on 4.6C.
    We have a lot of customization to bring into our system. There are a lot of reports with common queries that span multiple tables.
    I would like to follow the best practice for OO design and create global classes for the data access layer  the business logic layer and the UI layer.  For the UI layer, I will be utilizing the SALV class, since NW2004 doesn't have ABAP WebDynpro (we don't have a java stack available for development and software change management).
    For the data access layer,  I would like to use the persistent classes,  but without the query manager, it just doesn't make sense.
    Thomas Jung said in a blog that he sometimes used SQL to get the keys and then used persistent classes to retrieve the remaining data.  But for straight ALV reporting, that just seems inefficient.  But it could be that I am just not familiar enough with the technology.
    I am looking for suggestions on how to design the data access layer for these intense  and commonly used queries.
    (Ironically, we will upgrade to NW2004s after this migration -- ouch!)
    All ideas are appreciated.
    Thanks.

    Hi Kimberly,
    the main advantage of persistent objects is that their state can be saved in the database. If a persistent object changes in your program, these changes can be reflected in the corresponding database field(s). Thus, persistent objects are very useful when doing CRUD (create, read, update and delete) operations with business objects.
    However, if you just want to read data (for simple reporting) but do not plan to implement any of the other CRUD operations, I doubt if a persistency layer is necessary since this causes extra effort during design time and runtime. In that case, simple SELECT statements seem to be more appropriate.
    Regards,
    David

  • Stored Procedure- Multil level employee hierarchy in the same row

    I have an employee table where I have employee details  which includes the following properties:
    EmployeeID, EmployeeName, ManagerID, DesignationCode.
    ManagerID maps to EmployeeID in the Emp table. DesignationCode is to identify the employee designation.
    The topmost person of the organization could be identified by : whose DesignationCode is 'XX' and ManagerID=EmplyeeID.
    Here, 'XX' is fixed and will not change.
    Also, we know there could be a maximum of 10 level for each hierarchy.
    Example: Employee1 reports to Manager1 who reports to Manager2 who reports to Manager 3 ..... who reports to ManagerN.
    I need to pull a hierarchy in the below format:
    EmpName  MgrName0   MagrName1   MgrName2 ..........MgrName7  MgrName8 
    MgrName9
    SAMRAT                                                                      
                                XXX                XXX
    SUDHAKAR                                                                   
      XXX                 XXX                XXX
    SATESWAR                                                                   
                              XXX                XXX
    SRINI               XXX                  XXX                      
              XXX                 XXX                XXX
    IMPORTANT POINT: We need to identify the reporting hierarchy level for each employee's manager and then place the manager names accordingly based on the columns.
    Example:
    If an employee's manager has only 1 reporting manager(who is at top level), then he would be placed at the column "ManagerName8" and ManageName9 would be the topmost employee of the organization
    In short, we need to identify the reporting level at which the employees manager belongs and then start filling the columns values for that row ( employee details)
    I am stuck and unable to do the same. Please help.
    Thank you.

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    >> I have an employee table where I have employee details <<
    An SQL programmer would have a Personnel table instead. What you have said is that you have only one employee! 
    >> which includes the following properties:
    emp_id, emp_name, manager_emp_id, designation_code.<<
    Why do you think that a manager is an attribute of an employee? This is absurd! They have a relationship; where is the table that models that relationship? It is missing from this non-normalized, improperly designed table. 
    There are many ways to represent a tree or hierarchy in SQL. YOU are trying to use an adjacency list model. This approach will wind up with really ugly code -- CTEs hiding recursive procedures, horrible cycle prevention code, etc.  
    Another way of representing trees is to show them as nested sets. 
    Since SQL is a set oriented language, this is a better model than the usual adjacency list approach you see in most text books. Let us define a simple OrgChart table like this.
    CREATE TABLE OrgChart 
    (emp_name CHAR(10) NOT NULL PRIMARY KEY, 
     lft INTEGER NOT NULL UNIQUE CHECK (lft > 0), 
     rgt INTEGER NOT NULL UNIQUE CHECK (rgt > 1),
      CONSTRAINT order_okay CHECK (lft < rgt));
    OrgChart 
    emp_name         lft rgt 
    ======================
    'Albert'      1   12 
    'Bert'        2    3 
    'Chuck'       4   11 
    'Donna'       5    6 
    'Eddie'       7    8 
    'Fred'        9   10 
    The (lft, rgt) pairs are like tags in a mark-up language, or parens in algebra, BEGIN-END blocks in Algol-family programming languages, etc. -- they bracket a sub-set.  This is a set-oriented approach to trees in a set-oriented language. 
    The organizational chart would look like this as a directed graph:
                Albert (1, 12)
        Bert (2, 3)    Chuck (4, 11)
                       /    |   \
                     /      |     \
                   /        |       \
                 /          |         \
            Donna (5, 6) Eddie (7, 8) Fred (9, 10)
    The adjacency list table is denormalized in several ways. We are modeling both the Personnel and the Organizational chart in one table. But for the sake of saving space, pretend that the names are job titles and that we have another table which describes the
    Personnel that hold those positions.
    Another problem with the adjacency list model is that the boss_emp_name and employee columns are the same kind of thing (i.e. identifiers of personnel), and therefore should be shown in only one column in a normalized table.  To prove that this is not
    normalized, assume that "Chuck" changes his name to "Charles"; you have to change his name in both columns and several places. The defining characteristic of a normalized table is that you have one fact, one place, one time.
    The final problem is that the adjacency list model does not model subordination. Authority flows downhill in a hierarchy, but If I fire Chuck, I disconnect all of his subordinates from Albert. There are situations (i.e. water pipes) where this is true, but
    that is not the expected situation in this case.
    To show a tree as nested sets, replace the nodes with ovals, and then nest subordinate ovals inside each other. The root will be the largest oval and will contain every other node.  The leaf nodes will be the innermost ovals with nothing else inside them
    and the nesting will show the hierarchical relationship. The (lft, rgt) columns (I cannot use the reserved words LEFT and RIGHT in SQL) are what show the nesting. This is like XML, HTML or parentheses. 
    At this point, the boss_emp_name column is both redundant and denormalized, so it can be dropped. Also, note that the tree structure can be kept in one table and all the information about a node can be put in a second table and they can be joined on employee
    number for queries.
    To convert the graph into a nested sets model think of a little worm crawling along the tree. The worm starts at the top, the root, makes a complete trip around the tree. When he comes to a node, he puts a number in the cell on the side that he is visiting
    and increments his counter.  Each node will get two numbers, one of the right side and one for the left. Computer Science majors will recognize this as a modified preorder tree traversal algorithm. Finally, drop the unneeded OrgChart.boss_emp_name column
    which used to represent the edges of a graph.
    This has some predictable results that we can use for building queries.  The root is always (left = 1, right = 2 * (SELECT COUNT(*) FROM TreeTable)); leaf nodes always have (left + 1 = right); subtrees are defined by the BETWEEN predicate; etc. Here are
    two common queries which can be used to build others:
    1. An employee and all their Supervisors, no matter how deep the tree.
     SELECT O2.*
       FROM OrgChart AS O1, OrgChart AS O2
      WHERE O1.lft BETWEEN O2.lft AND O2.rgt
        AND O1.emp_name = :in_emp_name;
    2. The employee and all their subordinates. There is a nice symmetry here.
     SELECT O1.*
       FROM OrgChart AS O1, OrgChart AS O2
      WHERE O1.lft BETWEEN O2.lft AND O2.rgt
        AND O2.emp_name = :in_emp_name;
    3. Add a GROUP BY and aggregate functions to these basic queries and you have hierarchical reports. For example, the total salaries which each employee controls:
     SELECT O2.emp_name, SUM(S1.salary_amt)
       FROM OrgChart AS O1, OrgChart AS O2,
            Salaries AS S1
      WHERE O1.lft BETWEEN O2.lft AND O2.rgt
        AND S1.emp_name = O2.emp_name 
       GROUP BY O2.emp_name;
    4. To find the level and the size of the subtree rooted at each emp_name, so you can print the tree as an indented listing. 
    SELECT O1.emp_name, 
       SUM(CASE WHEN O2.lft BETWEEN O1.lft AND O1.rgt 
       THEN O2.sale_amt ELSE 0.00 END) AS sale_amt_tot,
       SUM(CASE WHEN O2.lft BETWEEN O1.lft AND O1.rgt 
       THEN 1 ELSE 0 END) AS subtree_size,
       SUM(CASE WHEN O1.lft BETWEEN O2.lft AND O2.rgt
       THEN 1 ELSE 0 END) AS lvl
      FROM OrgChart AS O1, OrgChart AS O2
     GROUP BY O1.emp_name;
    5. The nested set model has an implied ordering of siblings which the adjacency list model does not. To insert a new node, G1, under part G.  We can insert one node at a time like this:
    BEGIN ATOMIC
    DECLARE rightmost_spread INTEGER;
    SET rightmost_spread 
        = (SELECT rgt 
             FROM Frammis 
            WHERE part = 'G');
    UPDATE Frammis
       SET lft = CASE WHEN lft > rightmost_spread
                      THEN lft + 2
                      ELSE lft END,
           rgt = CASE WHEN rgt >= rightmost_spread
                      THEN rgt + 2
                      ELSE rgt END
     WHERE rgt >= rightmost_spread;
     INSERT INTO Frammis (part, lft, rgt)
     VALUES ('G1', rightmost_spread, (rightmost_spread + 1));
     COMMIT WORK;
    END;
    The idea is to spread the (lft, rgt) numbers after the youngest child of the parent, G in this case, over by two to make room for the new addition, G1.  This procedure will add the new node to the rightmost child position, which helps to preserve the idea
    of an age order among the siblings.
    6. To convert a nested sets model into an adjacency list model:
    SELECT B.emp_name AS boss_emp_name, E.emp_name
      FROM OrgChart AS E
           LEFT OUTER JOIN
           OrgChart AS B
           ON B.lft
              = (SELECT MAX(lft)
                   FROM OrgChart AS S
                  WHERE E.lft > S.lft
                    AND E.lft < S.rgt);
    7. To find the immediate parent of a node: 
    SELECT MAX(P2.lft), MIN(P2.rgt)
      FROM Personnel AS P1, Personnel AS P2
     WHERE P1.lft BETWEEN P2.lft AND P2.rgt 
       AND P1.emp_name = @my_emp_name;
    I have a book on TREES & HIERARCHIES IN SQL which you can get at Amazon.com right now. It has a lot of other programming idioms for nested sets, like levels, structural comparisons, re-arrangement procedures, etc. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Query Extensions: in Enterprise Edition only?

    Hi,
    I want to try to clarify something in the docs. Section 7.4 of the Kodo
    2.4.2 docs states this:
    "Kodo JDO Enterprise Edition allows developers to optimize and customize
    their datastore queries by adding new custom operations to JDOQL. In
    addition, Kodo provides some built-in extensions to simplify some common
    queries outside the JDOQL specification."
    Does the "Kodo" in the second sentence mean Kodo EE, or Kodo standard?
    I read this to mean the EE version allows the additon od new queries,
    which "Kodo", the standard version, comes with these few additional
    queries (ext:stringContains etc) out of the box. But some
    experimentation seems to suggest all query extensions are limited to EE.
    Is this correct, or are my experiments misguided?
    Thanks,
    Mike.

    Yes, that is correct. The whole extension functinality is a single
    module that can be enabled via our Enterprise Edition or by licensing
    that component individually.
    Mike Hogan wrote:
    Hi,
    I want to try to clarify something in the docs. Section 7.4 of the Kodo
    2.4.2 docs states this:
    "Kodo JDO Enterprise Edition allows developers to optimize and customize
    their datastore queries by adding new custom operations to JDOQL. In
    addition, Kodo provides some built-in extensions to simplify some common
    queries outside the JDOQL specification."
    Does the "Kodo" in the second sentence mean Kodo EE, or Kodo standard? I
    read this to mean the EE version allows the additon od new queries,
    which "Kodo", the standard version, comes with these few additional
    queries (ext:stringContains etc) out of the box. But some
    experimentation seems to suggest all query extensions are limited to EE.
    Is this correct, or are my experiments misguided?
    Thanks,
    Mike.
    Stephen Kim
    [email protected]
    SolarMetric, Inc.
    http://www.solarmetric.com

  • SAP Project Tools

    Hi There
    Recently my manager requested me to download the below SAP tools from Service Marketplace. Question is, are these tools not intergrated with Solution Manager because most of them reference to ASAP which from my understanding has been phased out. IS this worth the effort to download them? If yes, then where and how can I download them.
    u2022     The Project Estimator, an internal SAP tool which enables SAP consultants to accurately gauge the required resources, the costs and the time frame of implementation. The Project Estimator takes into account the project scope and several project and risk factors.
    u2022     The Concept Check Tool, a tool enabling you to carry out quality checks on the project preparation, technical infrastructure and R/3 configuration settings. This is done mainly during the first two implementation phases of the R/3 project. In this way you are alerted to potential data volume and configuration conflicts that could lead to performance issues if not addressed.
    u2022     The Implementation Assistant: The ASAP navigation tool that accompanies you through the five phases of implementation down to the task level. It includes a description and a detailed "how-to" for each task in the Roadmap. Along with that, many tools, templates and documents are hyperlinked to the task. The Implementation Assistant contains the following elements:
    u2022     ASAP Implementation Roadmap and Project Plan. The Roadmap contains the five phases, from which you can drill down into work packages, activities and tasks. The Project Plan contains three components, a budget plan, a resource plan and a work plan
    Regards,
    Prince

    Dear Prince,
    From a tool perspective, the SAP Solution Manager implementation function is the successor to the ValueSAP tools, covering implementation aspects. This means that all major ValueSAP/AcceleratedSAP tools such as the Implementation Assistant, Q&Adb, and the Master Lists are replaced by SAP Solution Manager functionality.
    I would recommend you to kindly visit the URL :
    http://service.sap.com/solutionmanager
    There is a FAQ Section built here which addresses most of the common queries on Solution Manager.
    Hope that this addresses your query.
    Regards
    Amit

  • Trying to Import data from Microsoft Access in POWERPIVOT

    Hello,
    I am trying to import data from Microsoft Access into Powerpivot. In my Access database I have several query's.
    When I go to the Table Import Wizard in powerpivot, I only see one source table. Why can't I see the other query's?
    Thanks in advance for your help.
    Soraya

    Hello Soraya,
    Which Version of MS Excel / Power Pivot are you using? Do you try to Import from a MDB or from the new Format ACCDB? Are these common queries in MS Access or pass-through queries?
    In common it should work, if I Import from a MDB I can see & select both, tables & views (queries):
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Needed help to add columns from one table to another table

    Hi,
    I have emp and dept tables. I think most of all might know what columns it's contain. Now I want to create table emp_dept with all emp and dept table columns.
    I have wrote the below query it's worked too. But I think there should be some more other queries to get accomplish the same task. Plz let me know.
    create table emp_dept as select a.*, b.dname, b.loc from emp a full outer join dept b on a.deptno = b.deptno where 1=2
    Thanks for your time..

    Hi,
    1004909 wrote:
    Hi,
    I have emp and dept tables. I think most of all might know what columns it's contain. Now I want to create table emp_dept with all emp and dept table columns.
    I have wrote the below query it's worked too. But I think there should be some more other queries to get accomplish the same task. Why do you think that?
    Plz let me know.
    create table emp_dept as select a.*, b.dname, b.loc from emp a full outer join dept b on a.deptno = b.deptno where 1=2"WHERE 1 = 2" means you want to create the table, but not put any rows in it. In that case, theere's no need for a full outer join; a simple inner join would do just as well.
    There is no single "right" or "best" table. (Most of us would have differerent jobs if there were.)
    It does, however, make sense to talk about the "right" or "best" table for some specific purpose .
    The emp and dept tables in the scott schema are great for transaction processing, where rows are frequenctly INSERTed, UPDATEd and/or DELETEd. For example, if department 10 moves from New York to Pune, you only have to find and UPDATE 1 row, and that one UPDATE will affect all employees in departemnt 10, regardess of how many there are.
    What purpose will the emp_dept table have? Why is the table design used in the scott schema not best for you?
    One possibility is that you need a tale that is very fast to query, even though it may be very inefficient for transactions. For example, you might want a data warehouse that is only refreshed once a day, and were you can run several common queries quickly, without joining the emp and dept tales.
    Another possibility is that your data model (that is, what are the entities and the attributes) is different. For example, you may have a model where employees King and Miller both work in department 10, but King's location is New York, but Miller's is Pune.
    In either of these situations, the table you posted migt be the best design. Why are you asking the question? What is the problem with the emp_dept table you posted?

  • Efficient Transaction System

    Hello
    I need to design a wallet system for a product of ours. Basically it will manage a large number of "wallets" for the users registered with the product. Obviously it requires transaction logs and support rollbacks and all that jazz.
    My question to those people that have worked on systems like these or have an educated insight on it is to please share some information or pointers to information with me.
    For example, i see the transaction log tables becoming way to large to do common queries on such as extracting the transaction log of a specific user, so i assume i have to keep said personal transaction logs up to date with every transaction that occurs.
    I'm sure there are quite a few bottlenecks here and there and i'd much appreciate any input you guys can give me. thanks!
    Remon

    By wallet do you mean money?
    And what do you mean by 'log'? Typically that can either refer to debug information or it can refer to requirements logging. For example it is the difference between logging 'Entered method x now' and 'User A withdrew $20'.
    If requirements logging then you must keep it.
    As for large you first need to size it. What is the actual size of a record? How many average transactions will occur for a given day? What is the peak rate? How will both of those grow over time?
    Additionally you can not just allow any query. You must define acceptable queries now and only allow for those. If you really have large volumes then just managing the indexes can become a problem.

Maybe you are looking for