ALL sql operator

How to use ALL operator in SQL query. I need something like students who have passed in both maths and science. Please help.
Thanks.

SQL> CREATE TABLE STUDENT
2 (
3 SNAME VARCHAR2(6),
4 SNO CHAR(2)
5 );
Table created.
SQL> ALTER TABLE STUDENT ADD (
2 CONSTRAINT SNO_PK PRIMARY KEY (SNO));
Table altered.
SQL> INSERT INTO STUDENT(SNAME,SNO) VALUES('L Tree','S1')
2 ;
1 row created.
SQL> INSERT INTO STUDENT(SNAME,SNO) VALUES('D Pond','S2');
1 row created.
SQL> INSERT INTO STUDENT(SNAME,SNO) VALUES('M Lake','S3');
1 row created.
SQL> INSERT INTO STUDENT(SNAME,SNO) VALUES('J Bond','S4');
1 row created.
SQL> INSERT INTO STUDENT(SNAME,SNO) VALUES('S Bark', 'S5');
1 row created.
SQL> INSERT INTO STUDENT(SNAME,SNO) VALUES('L Leaf','S6');
1 row created.
SQL> CREATE TABLE COURSE
2 (
3 CNAME VARCHAR2(6),
4 CNO CHAR(2)
5 );
Table created.
SQL> ALTER TABLE COURSE ADD (
2 CONSTRAINT CNO_PK PRIMARY KEY (CNO));
Table altered.
SQL> INSERT INTO COURSE(CNAME,CNO) VALUES('Comp 1','C1')
2 ;
1 row created.
SQL> INSERT INTO COURSE(CNAME,CNO) VALUES('Math 2','C2');
1 row created.
SQL> INSERT INTO COURSE(CNAME,CNO) VALUES('Phys 3','C3');
1 row created.
SQL> INSERT INTO COURSE(CNAME,CNO) VALUES('Comp 3','C4');
1 row created.
SQL> CREATE TABLE RESULT
2 (
3 SNO CHAR(2),
4 CNO CHAR(2),
5 MARK INTEGER
6 );
Table created.
SQL> ALTER TABLE RESULT ADD (
2 CONSTRAINT CNO_FK FOREIGN KEY (CNO)
3 REFERENCES COURSE (CNO));
Table altered.
SQL> ALTER TABLE RESULT ADD (
2 CONSTRAINT SNO_FK FOREIGN KEY (SNO)
3 REFERENCES STUDENT (SNO));
Table altered.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S1','C1',77)
2 ;
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S1','C2',80);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S2','C2',93);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S2','C3',88);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S2','C4',91);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S3','C2',74);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S3','C3',89);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S4','C2',75);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S4','C3',85);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S4','C4',55);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S5','C1',50);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S5','C4',61);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S6','C2',77);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S6','C3',88);
1 row created.
SQL> INSERT INTO RESULT(SNO,CNO,MARK) VALUES('S6','C4',54);
1 row created.
SQL> commit;
Commit complete.With the above, I need to find
1. Names of students who have passed ALL courses that J Bond passed (this should give students who have passed both in C2 and C3)
2. Names of students who have got better mark than J Bond in ALL courses that J Bond recevied marks
3. Passmark is >= 60
BTW how do i post sql codes in different text
Thanks.

Similar Messages

  • Calling all SQL Server users! May TechNet Gurus announced!

    The results for May's
    TechNet Guru competition have been posted!
    http://blogs.technet.com/b/wikininjas/archive/2014/01/16/technet-guru-awards-december-2013.aspx
    Congratulations to all our new Gurus for May!
    We will be interviewing some of the winners and highlighting their achievements, as the month unfolds.
    Post your JUNE contributions here:
    http://social.technet.microsoft.com/wiki/contents/articles/24692.technet-guru-contributions-for-june-2014.aspx
    Read all about June's competition, hopefully in a stickied post, at the top of this forum.
    Below is a summary of the medal winners for May. The last column being a few of the comments from the judges.
    Unfortunately, runners up and their judge feedback comments had to be trimmed from THIS post, to fit into the forum's 60,000 character limit, however
    the full version is available on TechNet Wiki.
    Some articles only just missed out, so we may be returning to discuss those too, in future blogs.
     BizTalk Technical Guru - May 2014  
    Peter Lindgren
    BizTalk 2010: Call SSO from Orchestration
    TGN: "I bet a few people will love you for this, I often see this question at the forums, and you answered it well. Good work!"
    Mandi Ohlinger: "Great topic and great explanation. It also makes SSO seem less scary :)"
    Sandro Pereira: "Very useful sample, well explained with all the necessary code "
    boatseller
    BizTalk: Using an Orchestration Sync or Async
    Sandro Pereira: "Good sample provide by boatseller and well explained."
    TGN: "Hey, great work man! This is a well done article and I love it!"
    Steef-Jan Wiggers
    Exposing data through BizTalk Service Hybrid Connections
    Sandro Pereira: "Nice article with a good overview about BizTalk Service Hybrid Connections and how you can configure them."
    TGN: "Good article, well explained and good pictures. Again Steef-Jan, you know what you're doing!"
    Mandi Ohlinger: "Nice set-up overview. "
     Forefront Identity Manager Technical Guru - May 2014  
    Sheldon.Jaquay
    Forefront Identity Manager - RCDC - Regular Expression
    AM: "Great contribution! Option C is clever, and the other examples are also a useful reference. Thanks for sharing your work with the community."
    Ed Price: "Nice short article. Great topic, and great blend of code, color, and images!"
    Søren Granfeldt: "Nice with a little focus on RegEx with FIM and good help for people wanting to have the portal be just a little more company specific"
    GO: "Thanks for the article, but the images weren't clear enough."
    Scott Eastin
    Installing Oracle MA for FIM R2 on Windows 2012
    GO: "EX-CE-LL-EN-T article!"
    AM: "Very nice article with clear step-by-step instructions - thanks for putting this together. "
    Ed Price: "I love the sections with numbered bullets at the end. They're very clear and easy to read!"
     Microsoft Azure Technical Guru - May 2014  
    João Sousa
    Microsoft Azure - Remote Debbuging How To?
    GO: "Clever. Well Explained and written. Thanks! You absolutely deserve the GOLD medal."
    Ed Price: "Fantastic topic and great use of images!"
    Alex Mang
    The Move to the New Azure SQL Database Tiers
    Ed Price: "Great depth and descriptions! Very timely topic! Lots of collaboration on this article from community members!"
    GO: "great article but images are missing"
    Alex Mang
    Separating Insights Data In Visual Studio Online
    Application Insights For Production And Staging Cloud Services
    Ed Price: "Good descriptions and clarity!"
    GO: "great article but images are missing"
     Microsoft Visio Technical Guru - May 2014  
    Mr X
    How to export your Orchestrator Runbooks to Visio and Word
    Ed Price: "A basic tip, but very helpful. Good job!"
    GO: "Thanks for that!"
    SR: "Nice "How To" article explaining the basic steps."
    AH: "This article is to the point takes a simple tasks and describes it accurately.
     SharePoint 2010 / 2013 Technical Guru - May 2014  
    Dan Christian
    Build a loop workflow using SharePoint 2010
    Jinchun Chen: "Excellent article. Personally speaking, the biggest challenge is SharePoint Designer workflow is “while-loop”. Many customers had the same scene as this article set. I am sure they are like this article.
    Benoît Jester: "An AWESOME, huge, detailed article by Dan. Did I mention the videos? Thanks Dan!"
    GO: "Great article Dan! Thanks!"
    Margriet Bruggeman: "Detailed explanation which I admire, but wouldn't be using a vs workflow be more logical in this case?"
    Geetanjali Arora
    Export User Profile Properties using CSOM
    Benoît Jester: "Great article on this new SharePoint 2013 development capability. I appreciate the code explanations."
    GO: "This is a great article. Love the way how you explain it."
    Margriet Bruggeman: "I will use this piece of code in the future!"
    Jinchun Chen: "Nice. How about customized properties? It would be nice more, if a CSOM script version can be attached. "
    Inderjeet Singh
    Unable
    to restore site collection issue
    GO: "Simple. Good Written. Clear and Clever. Great article."
    Margriet Bruggeman: "Quite handy reference for this particular problem"
    Benoît Jester: "Good explanation on the site collection deletion process."
     Small Basic Technical Guru - May 2014  
    Philip Conrod
    Programming Home Projects with Microsoft Small Basic: Chapter
    1: Writing Programs Using Small Basic
    RZ: "Very systematic introduction."
    Ed Price: "Good overview article that covers all the basics!"
    Michiel Van Hoorn: "Nice introduction into the history of Basic. Needs to be updated to reflect current support for Windows version (Windows NT? LOL )"
    Philip Conrod
    Programming Home Projects with Microsoft Small Basic: Chapter 6: Flash
    Card Math Quiz Project
    Michiel Van Hoorn: "This article (or book chapter) is excellent material to learn how to envision, design and build your program. The actual example program is also very usable."
    Ed Price: "I love how this tutorial keeps building on itself as it goes!"
    Nonki Takahashi
    Small Basic: Variable
    RZ: "Very nice explanation of the concept of variables!"
    Michiel Van Hoorn: "Clear explanation and not frills"
    Ed Price: "Great article with fantastic formatting!"
     SQL BI and Power BI Technical Guru - May 2014  
    Durval Ramos
    SSIS - Event Handling with "OnError" ou "OnTaskFailed"
    Ed Price: "The images are very helpful! Could use a grammar pass. Great descriptions!"
    GO: "This article has everything. A conclusion, reference, see also, other languages section. everybody should write actually like this."
    NN: "An interesting topic and article but unfortunately a bit hard to understand due to grammar problems"
    PT: "This is a good article on a useful topic. Please have your article reviewed and edited for proper language."
    S Kamath
    Expansion of Time dimension in Analysis Service
    PT: "Your article is concise and to the point, and contains useful information. It would be good to conclude with a short summary and perhaps compare this technique to others, discussing best practices."
    Ed Price: "Good details on Time Dimension. The images help us understand as we go."
    GO: "I like this one, but something is missing. Do not know what, but I had a blast reading the other two's. Does not mean that this one is bad, but there is something missing, maybe my knowledge..."
    NN: "Good article, but seems to be missing conclusion. It will also benefit from adding See Also section"
    Sherry Li
    SSAS – Ignore unrelated dimension or not
    NN: "Good and interesting article based on the blog"
    GO: "Wonderful article!"
    PT: "This is an important topic and contains helpful information but this is a simple topic that can be explained in fewer words. I found this article to be overly detailed and hard to read. I suggest having it reviewed and edited for
    proper language."
    Ed Price: "Good descriptions. Could be shorter. Good use of images!"
     SQL Server General and Database Engine Technical Guru - May 2014  
    Shanky
    Curious Case Of Logging In Online and Offline Index Rebuild In Full Recovery
    Model
    Jinchun Chen: "Good article. Thank you!"
    GO: "One of the best Wiki Articles ever! Thanks buddy!"
    DRC: "-- This is a great article which provides in-depth information on internals of Online & Offline rebuild index and Transaction logging. -- The following statement need to be re-written for more clarity. “The less logging can be
    attributed to the fact that no information about page allocation is logged information about de-allocation is logged please see below figure 13. Also if you compare amount of record returned in this case we had output containing just 64 rows while offline
    index rebuild had ____ rows.” -- Overall, a great article, thoroughly enjoyed reading it."
    NN: "Very interesting article, another great contribution by Shanky"
    Ed Price: "Thorough descriptions and great solution! Good article!"
    Uwe Ricken
    SQL Server: Be aware of the correct data type for predicates in queries
    Ed Price: "Incredibly well formatted! Great breakdown of sections!"
    GO: "Whoo, this is a wonderful article!"
    DRC: "-- This article explains the Query execution behaviour when the Query is not optimally written which could cause increased execution time. Great article. -- This topic is clearly explained and documented using a simple example and
    sample output which is easy is understand. -- Simple, very well written and great article to read. "
    NN: "Very good, easy to understand article and important information to know to all SQL Server developers"
     System Center Technical Guru - May 2014  
    Mr X
    Central Management of DSRM password on Domain Controllers using Orchestrator
    Ed Price: "The images really carry you through this article. Great execution!"
    GO: "Great article. I like your article Mr X! Thanks for your passion!"
    Kevin Holman: "Nice to see real world examples of Orchestrator in action solving problems that all customers have. This was very simple, but provides an excellent solution."
    W P Chomak
    System Center Operations Manager 2012 R2 - Customizing E-Mail Notifications
    AB: "Easy reading info that can help many"
    Ed Price: "Short and sweet. An incredibly valuable topic and needed addition to the Wiki!"
    GO: "Clever and well written. Thanks"
    Christoffer S
    System Center Configuration Manager 2012 R2 - Install applications in a task sequence based on AD-Groups
    Ed Price: "Good mix of code, images, and information. Could use more in-depth descriptions. Great article!"
    GO: "Clear and simple! Thank you!"
     Transact-SQL Technical Guru - May 2014  
    Naomi N
    T-SQL: Random Equal Distribution
    Jinchun Chen: "Nice."
    JS: "The crucial thing about such a procedure is to check the data before the randomization and afterwards. You might encounter situations where "John Smith" and "John Meyers" might have exchanged their First names
    which is technically correct, but logically and obviously wrong. So make sure that there is one additional check afterwards that makes sure that eventual privicy concerns will not survive the random process. Normally this would not happen, but I have already
    checked this is one of my older blog entries, where we exactly had that problem obfuscating data to make that operational and live data will not be recognized afterwards. http://blogs.msdn.com/b/jenss/archive/2009/04/08/when-is-random-random-enough.aspx In
    addition to this some attributes are sticky to each other like gender and First Name. You also have to make sure that your distribution might change statistically in relation to other attributes."
    Richard Mueller: "Very instructive. Perhaps the See Also section should have more links."
    Ed Price: "Great formatting and topic! Could benefit from more descriptions. Great article!"
    GO: "Naomi, your article is nice. Simple to understand the 'problem' and execute the 'solution""
    Manoj Pandey: "Nice article with a different way to resolve a given problem. I think this can also be done by using NTILE() function. I've added the code in comments section."
    Rogge H
    Extending SYS.Geometry to Utilize Temporal Data
    GO: "Great article, I enjoyed reading it. Thank you"
    Manoj Pandey: "I like the idea, but it took me some more time to understand the overall logic as I'm new to Geo datatypes, Thanks."
    JS: "For me not using this sort of things regularly, I don't see the problem and the benefit. I have no doubt that this is a brilliant explanations how to cope with a problem, but for me this is missing yet the red line. More pictures
    would be helpful describing the problem and outlining the results produced."
    Richard Mueller: "Needs more explanation, and perhaps an example. There should be links to relevant references."
    Ed Price: "Good job on the opening descriptions! Could benefit from breaking up and explaining the code more. Images and references would be helpful. Good article!"
    Hasham Niaz
    DataCleanUp() Function Implementation in MS SQL Server
    Jinchun Chen: "Good."
    JS: "-Does actually not work for Case senstive areas where I want to remoce certain Upper/lower case characters. This might be not interesting for some people, but is extremely important and relevant to other people. The limitation is
    that I can´t pass multiple values to be removed from the string, right ? Could this be implemented as well as many people wash out their data from unused / unimportant control characters. "I have tested it on a table which has got more than 11 Million
    rows and it executed fine returning the correct results. Since this is a scalar function you will notice decrease in performance." Once you want to maintain the old data and keep the new cleaned up one seperately, you could suggest something like persisting
    the data in a computed column which could be indexed and then help improving the performance. This would not be the case for any adhoc queries though."
    Richard Mueller: "Very clever and also very useful. There should be links to references, for example to explain the PATINDEX function."
    Ed Price: "Great job on this article! Very clear and well executed! See JS's comments for some thoughts about what's possible. Great article!"
    Manoj Pandey: "A good utility Function that I can use and tweak for my future needs, Thanks."
    Jaliya Udagedara
    Calling WCF Service from a Stored Procedure in Microsoft SQL Server 2012
    GO: "Gold Winner. For sure!"
    Ed Price: "Amazing article! The depth, images, and code formatting make this fantastic!"
    NN: "Great article, thorough explanations, great interaction in the comments - very useful tutorial"
    Søren Granfeldt: "Nice work."
    João Sousa
    ASP.NET MVC 5 - Bootstrap 3.0 in 3 Steps
    GO: "Thanks for that great article"
    Ed Price: "Great formatting! Good use of images!"
    NN: "Nice introduction to Bootstrap in ASP.MVC project"
    Søren Granfeldt: "Just a little more technical explanation would be nice"
    Critical_stop
    Using 64-bit shortcuts from a 32-bit application
    NN: "Good and short article, right to the point"
    Søren Granfeldt: "Mixing and matching 32/64 bit always seems to give people a hassle. This will help those having issues."
    GO: "good one!"
    Ed Price: "Good article. Short and sweet."
     Wiki and Portals Technical Guru - May 2014  
    XAML guy
    TechNet Guru Competition: Judge System Explanation
    GO: "No one could do it beter than you Pete! Thanks!"
    Richard Mueller: "Excellent explanation of the judging system. Perhaps could use a See Also section."
    Ed Price: "Good quote from Shanky in the comments, "Awesome....Kudos to your for your beautiful work" -- Great job!"
    NN: "Very good article. It may also benefit from See Also section"
    Payman Biukaghazadeh
    TechNet Wiki Persian Council
    GO: "Go Persion GOOO!"
    Richard Mueller: "The Persian Council is an excellent idea. The link to "How to Write an Article" should be in a See Also section, along with other articles."
    NN: "Great article, missing a link to other portals and councils pages"
    Ed Price: "Thank you to Payman and the Persian community for jumping in! The Wiki is warm!"
    Durval Ramos
    Wiki: Best Practices for building TechNet Wiki Portals
    Ed Price: "Fantastic job from Durval on helping us standardize the portals!"
    NN: "Good article, but unfortunately a bit hard to read and understand due to bad grammar. "
    Richard Mueller: "Excellent and important topic. Grammar still needs work. I like the links and See Also."
     Windows Phone and Windows Store Apps Technical Guru - May 2014  
    Sara Silva
    Authentication using Facebook, Google and Microsoft account in WP8.0 App (MVVM)
    Ed Price: "Great article! Great code formatting and good use of code comments for descriptions of what your code's doing! Could be improved by breaking out the code with more descriptions in the article (in addition to
    the code comments). Very in-depth article! "
    Peter Laker: "An excellent article, pulling together all the bits you need to make this happen"
    SubramanyamRaju.B
    WindowsPhone Facebook Integration:How to post message/image to FaceBook Fan
    Page(C#-XAML)
    Ed Price: "Good topic! Code blocks would help with the formatting. Good job on this article!"
    Peter Laker: "Love this, very useful to many I'm sure, thanks!"
    Saad Mahmood
    Creating a custom control in Expression Blend with Custom Properties (WindowsPhone
    & Store)
    Ed Price: "This has a good mix of descriptions and clarity! The images help a lot!"
    Peter Laker: "A nice introduction to our beloved Blend. Great work!"
     Windows Presentation Foundation (WPF) Technical Guru - May 2014  
    Magnus (MM8)
    WPF/MVVM: Merging Cells In a ListView
    KJ: "Ah the collectionViewSource -- never used it myself but this looks like a good reference article if I ever needed to..."
    GO: "Thank you!"
    Ed Price: "Great formatting and good descriptions. Short and sweet! Another fantastic entry from Magnus!"
    Peter Laker: "Thank you again Magnus"
     Windows Server Technical Guru - May 2014  
    Mr X
    How to implement User
    Activity Recording for AD-Integrated Critical Servers by combining the use of Group Policy, Powershell and Orchestrator
    Philippe Levesque: "Really good information and detailed step."
    JH: "brilliant, love how it combines different technologies to achieve a solution, clearly written and well illustrated."
    JM: "Another excellent article, thanks again for your many great contributions"
    Richard Mueller: "Very creative solution. Great to have such detailed steps and images."
    GO: "I like the conclusion. Thanks"
    Mr X
    How Domain Controllers are located in Windows
    GO: "Super article Mr X! Merci!"
    JM: "Yet again, excellent article."
    Richard Mueller: "Good documentation. An explanation of how the priorities and weights are determined would help. A See Also section would also help."
    Philippe Levesque: "Good "In deep" information. Good to know to help diagnose computer problem in AD's site."
    JH: "another good article, great diagrams. Some repetition but it does help clarify a complex issue. "
    Mahdi Tehrani
    Detailed Concepts:Secure Channel Explained
    JH: "great article. This fills an important gap in this content space. Editing is a little rough, but diagrams and explanations are clear."
    JM: "This is a very good article, however you need to provide more detail in the section on how to fix a broken Channel."
    Richard Mueller: "Excellent topic. Grammar needs work. Good images. Could use a See Also section."
    Philippe Levesque: "Really good explanation of the secure's channel, I like the debugging step included ! "
    GO: "Thanks for this, not everybody know about secure channel."
    As mentioned above, runners up and their judge feedback were removed from this forum post, to fit into the forum's 60,000 character limit.
    A great big thank you to EVERYONE who contributed an article to last month's competition.
    Hopefully we will see you ALL again in this month's listings?
    As mentioned above, runners up and comments were removed from this post, to fit into the forum's 60,000 character limit.
    You will find the complete post, comments and feedback on the
    main post.
    Please join the discussion, add a comment, or suggest future categories.
    If you have not yet contributed an article for this month, and you think you can write a more useful, clever, or better produced wiki article than the winners above,
    here's your chance! :D
    More about the TechNet Guru Awards:
    TechNet Guru Competitions
    #PEJL
    Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over to the one and only
    TechNet Wiki, for future generations to benefit from! You'll never get archived again!
    If you are a member of any user groups, please make sure you list them in the
    Microsoft User Groups Portal. Microsoft are trying to help promote your groups, and collating them here is the first step.

    Congrats to Shanky and Uwe!
     SQL Server General and Database Engine Technical Guru - May 2014  
    Shanky
    Curious Case Of Logging In Online and Offline Index Rebuild In Full Recovery
    Model
    Jinchun Chen: "Good article. Thank you!"
    GO: "One of the best Wiki Articles ever! Thanks buddy!"
    DRC: "-- This is a great article which provides in-depth information on internals of Online & Offline rebuild index and Transaction logging. -- The following statement need to be re-written for more clarity. “The less logging can be attributed
    to the fact that no information about page allocation is logged information about de-allocation is logged please see below figure 13. Also if you compare amount of record returned in this case we had output containing just 64 rows while offline index rebuild
    had ____ rows.” -- Overall, a great article, thoroughly enjoyed reading it."
    NN: "Very interesting article, another great contribution by Shanky"
    Ed Price: "Thorough descriptions and great solution! Good article!"
    Uwe Ricken
    SQL Server: Be aware of the correct data type for predicates in queries
    Ed Price: "Incredibly well formatted! Great breakdown of sections!"
    GO: "Whoo, this is a wonderful article!"
    DRC: "-- This article explains the Query execution behaviour when the Query is not optimally written which could cause increased execution time. Great article. -- This topic is clearly explained and documented using a simple example and sample
    output which is easy is understand. -- Simple, very well written and great article to read. "
    NN: "Very good, easy to understand article and important information to know to all SQL Server developers"
    Also worth a mention were the other entries this month:
    SQL Server installation error Could Not  Find Database Engine Startup Handle by
    Shanky
    Ed Price: "Wow, what an amazing article! Fantastic code formatting, great descriptions, and the images help you when you need it!"
    NN: "I read this article with great interest. The funny thing is that at the same time I was reading someone was having this exact problem in UniversalThread.com forum, so I was able to refer him to this article. UPDATE. Looks like he is still
    having problems"
    GO: "Thank you so much!"
    DRC: " -- This article -- Explains on modifying/deleting the registry keys after backup -- But it doesn't provide the level/how to back up the registry. -- We also need to warn the users that if we modify/delete the wrong registry key it might
    lead to crash of SQL or even WINDOWS -- In case there are multiple instances on the same machine following this article would cause all the SQL instance to crash. -- So it would be better to contact the support team or before trying out the action steps. "
    5 Top Features Your Company Can Use in SQL Server 2014 Standard Edition by Richard
    Douglas
    NN: "Very well written and quite interesting. Since it's originated from the blog, it has a personal touch which is more appropriate for a blog " 
    DRC: " -- Expand the word GA (General Availability) in the below sentence and correct the spelling mistake "it was written before the GA of SQL Server 2014" "SSD technology and a chunk of this session was on BPE" "who doesn't’t like playing
    with new cool stuff!" "which doesn't’t sound as impressive" "business from the likes of Oracle et al." -- This is a good article and provides all the required information and links to Microsoft website for more details. " 
    Ed Price: "Fantastic topic, but it should be made more "Wiki like" and less personalized. Anybody in the community can help us do that! " 
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • SQL operations are not allowed with no global transaction by default for X

    Hi All,
    I am getting the above mentioned error.
    java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA driver supports performing SQL operations with no global transaction, explicitly allow it by setting "SupportsLocalTransaction" JDBC connection pool property to true. In this case, a
    lso remember to complete the local transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().
    I am developing a web application. I have jsp, servlets, JDBC classes.
    I am using DataSource and Connection pools.
    I am on WLS 8.1 sp3 and Oracle 10.1.
    Part of My Config file looks as follows:
    <JDBCConnectionPool DriverName="weblogic.jdbcx.oracle.OracleDataSource" KeepLogicalConnOpenOnRelease="true" KeepXAConnTillTxComplete="false" Name="AUMDataSource" NeedTxCtxOnClose="false" NewXAConnForCommit="false" Password="{3DES}AKRkWgdzXN8WrXSRtSvJ6g==" Properties="user=pibsrmgr;portNumber=1521;SID=pibsrdod;serverName=pibsrdod.dtu.mlam.ml.com" RollbackLocalTxUponConnClose="true" SupportsLocalTransaction="false" Targets="myserver" TestTableName="SQL SELECT 1 FROM DUAL" URL="jdbc:bea:oracle://pibsrdod.dtu.mlam.ml.com:1521" XAEndOnlyOnce="false" />
    <JDBCTxDataSource EnableTwoPhaseCommit="true" JNDIName="jdbc/AUMDataSource" Name="AUMDataSource" PoolName="AUMDataSource" Targets="myserver" />
    Any help will be appreciated.
    Thanks
    ---Radhe

    Hi,
    Regarding Transactions , the following link can helpful to you .
    Regards,
    Prasanna Yalam

  • Order of the sql operation

    hi experts,
    I want to clear my basic concepts here.
    I want to know the order of the sql operation.
    actually the problem with me that i have read from different blog and websites
    about the order of operation of the sqkl queries , hence i am confused here.
    what i think the order of operation iis
    -----------MY assumptuion---------------------
          From
           |
          where
           |
          group
           |
          having
           |
          select
           |
          order by
    is my assupmtion is correct?
    if yes , then if suppose there is rownum clause in my selection criteria,at which timing
    will it apply?
    on some site i have seen below criteria
    1. The FROM/WHERE clause goes first.
    2. ROWNUM is assigned and incremented to each output row from the FROM/WHERE clause.
    3. SELECT is applied.
    4. GROUP BY is applied.
    5. HAVING is applied.
    6. ORDER BY is applied.
    is this correct or my assumption is correct?
    thanks a lot in advance..!!
    regards,
    prashant

    Hi Prashant,
    Instead of memorizing, why not check the query plan -
    -->-- Creating a test table
    CREATE TABLE test_tbl as
      SELECT 'A' name, 100 sal FROM dual UNION ALL
      SELECT 'A' name, 120 sal FROM dual UNION ALL
      SELECT 'B' name, 66 sal FROM dual UNION ALL
      SELECT 'C' name, 20 sal FROM dual UNION ALL
      SELECT 'C' name, 50 sal FROM dual UNION ALL
      SELECT 'C' name, 60 sal FROM dual UNION ALL
      SELECT 'D' name, 90 sal FROM dual UNION ALL
      SELECT 'D' name, 110 sal FROM dual;
    -->-- Query explain plan
    EXPLAIN PLAN for
    SELECT name, SUM(sal) sm
    FROM test_tbl
    GROUP BY name
    HAVING Sum(sal) > 150
    ORDER BY sm;
    -->-- Fetching the plan from cursor pool
    SELECT *
    FROM TABLE(dbms_xplan.display);
    -->-- Query plan
    PLAN_TABLE_OUTPUT                                                               
    Plan hash value: 3401269832                                                     
    | Id  | Operation            | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |          |     8 |   128 |     5  (40)| 00:00:01 |
    |   1 |  SORT ORDER BY       |          |     8 |   128 |     5  (40)| 00:00:01 |
    |*  2 |   FILTER             |          |       |       |            |          |
    |   3 |    HASH GROUP BY     |          |     8 |   128 |     5  (40)| 00:00:01 |
    |   4 |     TABLE ACCESS FULL| TEST_TBL |     8 |   128 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):                             
         2 - filter(SUM("SAL")>150)                                                                                       
    Now, how to read the plan?
    Start reading the plan - with the line "Operation" indented towards extreme right. Line-4 in this case.
    Note: If two lines are indented similarly i.e. on same vertical line... read normally as-in order.
    Like this:
    | Id  | Operation            | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |            |     8 |   128 |     5  (40)| 00:00:01 |
    |   1 |  SORT ORDER BY       |            |     8 |   128 |     5  (40)| 00:00:01 |
    |*  2 |   FILTER             |            |       |       |            |          |
    |   3 |    HASH GROUP BY     |            |     8 |   128 |     5  (40)| 00:00:01 |
    |   4 |     TABLE ACCESS FULL| TEST_TBL_1 |     8 |   128 |     3   (0)| 00:00:01 |
    |   5 |     TABLE ACCESS FULL| TEST_TBL_2 |     8 |   128 |     3   (0)| 00:00:01 |
    Read: line 4 and then line 5, since both are on same vertical level.
    Final sequence:
    1- (Line 4) Table Access : FROM clause
    2- (Line 3) GROUP BY
    3- (Line 2) Filtering : WHERE clause
    4- (Line 1) Sorting : ORDER BY clause
    5- (Line 0) SELECT
    Hope this helps.
    -- Ranit

  • How to add custom sql operations in Database adapters?

    I have a database adapter in ESB configured with insert, update and select operations.
    I wanted to add another select operation with pure sql. When I added the operation it gave me error "Start of the root element expected" while registering the service.
    Can't we do like this?
    I use SOA suite 10.1.3.4.
    - Sam

    Hi Thanks for reply.
    There is an option while configuring the DB adapter "Execute Custom SQL" where you can specify the query you want to execute. It will generate the schema as per the query you enter in the wizard.
    I have created adapters with this type of custom SQLs and even I have put multiple operations in the same adapters where all use Custom SQL and they are working fine.
    Thease custom SQL operations can be anything insert, update, select and they even work with other operations using procedures in the same adapter. But yes we need to modify the WSDL manuallly.
    My problem was that when I try to add the custom SQL operation in the adapter which is configured with normal select, insert and update operation, I was getting the error mentioned.
    - Sam

  • While adding/Changing member in planning it gives the error "The SQL operation failed with an error code: 0"

    Hi,<BR>While adding/Changing member in planning it gives the error "The SQL operation failed with an error code: 0" and not allowing any of the changes. I am not able to open the forms giving the error as "Fiscal Days Input - is invalid". Interestingly one form was opening, when the Page selection is changed it also started giving error as like "Fisacal Days Input(form name) - is invalid check log for details". <BR>Pls advice us that what is this error and how to resolve this.<BR><BR>And Which log is to be referred for the details.<BR><BR>Thanks<BR>Ravi

    If a form is invalid it generally means that one of the dimension references is missing.<BR><BR>Can you get in to edit the form?<BR>If you can, see if you can preview it. I suspect you will not be able to.<BR><BR>If not, check all dimension boxes have at least one member against them.<BR>If you have multiple rows and/or columns check all of them too.<BR><BR>I've had a couple of forms in dev "drop" a dimension reference but only once or twice so not enough to reproduce or find out what is causing it. Each time I got the "form invalid" error message and managed to fix it.<BR><BR>Hope this helps.<BR>

  • Dynamic Group Membership - All SQL Computers in a Domain

    I am trying to create groups containing all SQL servers in each domain. I am using the Wizard in the console. However I appear to be having winter blues as I can't work out how to do it. Everything I try results in an empty group.
    Can someone please explain what I need to do to?

    Roger
    Thanks for the input. The code looks logical and I applied it and imported a revised MP. However I am not getting any membership in the group. There is another group membership in the same MP and that populates correctly, so I haven't a clue where I'm going
    wrong. As you can see below my rule is the same as yours, except with a different domain name.
    <Expression>
                 <And>
                              <Expression>
                                           <RegExExpression>
    <ValueExpression>
    <Property>$MPElement[Name="MicrosoftWindowsLibrary7585010!Microsoft.Windows.Computer"]/NetbiosDomainName$</Property>
    </ValueExpression>
    <Operator>ContainsSubstring</Operator>
    <Pattern>DOMAINNAME</Pattern>
                                           </RegExExpression>
                              </Expression>
                              <Expression>
                                           <Contained>
    <MonitoringClass>$MPElement[Name="MicrosoftSQLServerLibrary6410!Microsoft.SQLServer.ComputerGroup"]$</MonitoringClass>
                                           </Contained>
                              </Expression>
                 </And>
    </Expression>
    Eric

  • SQL operation failed when new creating form ?

    Dear All,
    When I create a new form in workspace 11.1.2.1 , it occur an error and returns "SQL operation failed". So, how to solve it ?
    Thank you all.
    Eva

    Try to restart planning. Have you used admin account to create form?
    Look at the logs <MIDDLEWARE_HOME>\user_projects\epmsystem1\diagnostics\logs\services\HyS9Planning-sysout.log and HyS9Planning-syserr.log

  • Capture all SQL statements and archive to file in real time

    Want to Capture all SQL statements and archive to file in real time?
    Oracle Session Manager is the tool just you need.
    Get it at http://www.wangz.net
    This tools monitor how connected sessions use database instance resources in real time. You can obtain an overview of session activity sorted by a statistic of your choosing. For any given session, you can then drill down for more detail. You can further customize the information you display by specifying manual or automatic data refresh, the rate of automatic refresh.
    In addition to these useful monitoring capabilities, OSM allows you to send LAN pop-up message to users of Oracle sessions.
    Features:
    --Capture all SQL statement text and archive to files in real time
    --Pinpoints problematic database sessions and displays detailed performance and resource consumption data.
    --Dynamically list sessions holding locks and other sessions who are waiting for.
    --Support to kill several selected sessions
    --Send LAN pop-up message to users of Oracle sessions
    --Gives hit/miss ratio for library cache,dictionary cache and buffer cache periodically,helps to tune memory
    --Export necessary data into file
    --Modify the dynamic system parameters on the fly
    --Syntax highlight for SQL statements
    --An overview of your current connected instance informaiton,such as Version, SGA,License,etc
    --Find out object according to File Id and Block Id
    Gudu Software
    http://www.wangz.net

    AnkitV wrote:
    Hi All
    I have 3 statements and I am writing some thing to a file using UTL_FILE.PUT_LINE after each statement is over. Each statement takes mentioned time to complete.
    I am opening file in append mode.
    statement1 (takes 2 mins)
    UTL_FILE.PUT_LINE
    statement2 (takes 5 mins)
    UTL_FILE.PUT_LINE
    statement3 (takes 10 mins)
    UTL_FILE.PUT_LINE
    I noticed that I am able to see contents written by UTL_FILE.PUT_LINE only after statement3 is over, not IMMEDIATELY after statement1 and statement2 are done ?
    Can anybody tell me if this is correct behavior or am I missing something here ?Calling procedure must terminate before data is actually written to the file.
    It is expected & correct behavior.

  • Retreiving all SQL source codes from forms

    Hi,
    Does anyone know how to retrieve source codes ( trigers,
    procedures, etc.) from forms to put into a txt file ? I know I
    can use the export option from the PL/SQL editor for individual
    triger or procedure, but is there a way to retrieve all SQLs
    from the form just at one time ?
    Your help is very appreciated.
    Thanks
    Jessica

    U can get a document of the Form in a text file. This will
    contain all Objects properties, Triggers etc.To do this:
    1. Open the Form Builder and the Form u want to document.
    2. File - Administration - Object List Report.
    Hope this helps.

  • How to find out all SQLs executed by a procedure

    I need to find out all SQLs executed by a procedure. I can trace and check but in my case the issue happened 4 hours back and i know what procedure was causing it. There are multiple dynamic queries fired from this procedure. I need to track down all SQLs fired by this procedure constructed dynamically during the time issue was happening.
    I have the sql_id of the statement which was executing the procedure. How do I track down all "child" SQLs using this sql_id?
    Will appreciate any pointers.
    -ravi

    Thanks for your suggestion and looking into this.
    We already have that functionality built in. Version is 10.2.0.3...But the issue is the proc is called thousands of time in a day and we can not keep the tracking of sqls and parameters passed on all the time. When the issue happened we were not tracking. The bind variables are not captured as the SQL is constructed within the proc by looking up the values dynamically from secondary tables dynamically based on the parameters passed to the procedure. Now the SQLs which are generated from the proc will have the bind variables captured as they will come as predicates and will have no clob types (condition for the binds to be captured).
    I need a query to track down all "child" SQLs by using the sql_id of the parent process which is the procedure's sql_id.

  • Bat file execute all *.sql files in a folder

    Hi all,
    How to write a *.bat file to execute all *.sql files in a folder?
    Because have about 20 *.sql file in a folder. There are used to fix data in my database. The number of *.sql file increases day by day. So I want to write a *.bat file to execute all *.sql file in the folder. Since I just run this *.bat file.
    Mai Thanh Hải.

    user545846 wrote:
    Hi
    I have done this many times. can guide you. :)And did it fail to work all the times you tried it?
    c:\>type test1.sql
    select 1 from dual;
    exit
    c:\>type test2.sql
    select 2 from dual;
    exit
    c:\>sqlplus scott/tiger@testdb @c:\test*.sql
    SQL*Plus: Release 10.2.0.3.0 - Production on Thu Aug 6 12:37:04 2009
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SP2-0556: Invalid file name.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining optionsWildcards in SQL*Plus filenames don't work. So why do you suggest that?
    Better is to use the DOS command FOR...
    c:\>for %i in (test*.sql) do sqlplus scott/tiger@testdb @%i
    c:\>sqlplus scott/tiger@testdb @test1.sql
    SQL*Plus: Release 10.2.0.3.0 - Production on Thu Aug 6 12:38:06 2009
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
             1
             1
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    c:\>sqlplus scott/tiger@testdb @test2.sql
    SQL*Plus: Release 10.2.0.3.0 - Production on Thu Aug 6 12:38:06 2009
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
             2
             2
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    c:\>... although even better would be to proceduralise the SQL into packages/procedures on the database and have just a single procedure call do all the work.

  • How to fill combo box with list of all SQL server

    Ok, I know how to find all SQL servers that I need, I have code for that task, and I have Array of all servers.
    My problem is ...
    I made setup project and do a huge work, and in the end this task appear!
    I used ORCA tool to change TextBox (A) template in visual studio (2008 by the way), and I transform first TextBox to ComboBox.
    Now, the little part that I'am missing is how to fill this combo box with a result of my function for listin SQL servers?
    Can I somehow send combobox object to myMethod:
    private void FillCombo(ComboBox cmb)
          // do the job
    or
    instanceOfThisCombo.Items.Add(listOfSQLServers);
    please help me to solve this... thanksc#

    Hi Valerij,
    The ComboBox control in an MSI dialog uses the ComboBox table to populate the items in it. To get what you want, you need to update the ComboBox table in the MSI package with your application and run the MSI package. The following KB article describes how to dynamically populate a ListBox control in Windows Installer:
    http://support.microsoft.com/kb/291329
    This method introduced in the above KB article also applies to populating a ComboBox control in Windows Installer.
    I don't think it's possible to run the application as a Custom Action from within the MSI package because the application will modify the content of the MSI package which is currently running. So you need to launch the MSI package from within your application after updating the ComboBox table. In short, when installing, just run your application which updates the ComboBox table and install the MSI package.
    Hope this helps.
    If you have any question, please feel free to let me know.
    Sincerely,
    Linda Liu

  • MAP Toolkit - How to use this MAP tool kit for all SQL Server inventory in new work enviornment

    Hi Every one
     Just joined to new job and planning to do Inventory for whole environment so I can get list of all SQL Server installed . I downloaded MAP tool kit just now. So looking for step by step information to use this for SQL Inventory. If anyone have documentation
    or screen shot and can share would be great.
    Also like to run It will be good to run this tool anytime or should run in night time when is less activity? 
    Hoe long generally takes for medium size environment where server count is about 30 ( Dev/Staging/Prod)
    Also any scripts that will give detailed information would be great too..
    Thank you 
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach A.Shah

    Hi Logicinisde,
    According to your description, since the issue regards Microsoft Assessment and Planning Solution Accelerator. I suggestion you post the question in the Solution Accelerators forums at
    http://social.technet.microsoft.com/Forums/en-US/map/threads/ . It is appropriate and more experts will assist you.
    The Microsoft Assessment and Planning (MAP) Toolkit is an agentless inventory, assessment, and reporting tool that can securely assess IT environments for various platform migrations. You can use MAP as part of a comprehensive process for planning and migrating
    legacy database to SQL Server instances.
    There is more information about how to use MAP Tool–Microsoft Assessment and Planning toolkit, you can review the following articles.
    http://blogs.technet.com/b/meamcs/archive/2012/09/24/how-to-use-map-tool-microsoft-assessment-and-planning-toolkit.aspx
    Microsoft Assessment and Planning Toolkit - Technical FAQ:
    http://ochoco.blogspot.in/2009/02/microsoft-assessment-and-planning.html
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • All SQL statements in a session

    Hi OTN,
    It's possible to get all SQL statements executed in a session?
    In V$SESSION and V$ACTIVE_SESSION_HISTORY are only the current and pre current statements.
    -JSG

    Hi, you can enable the sql trace to a especific session with dbms_trace and get all sql statements, if you need more information review the Note:104239.1 into Metalink site.
    Luck.
    Have a good day.
    Regards.

Maybe you are looking for

  • New iPhoto not working at all - blank library on startup

    I just upgraded my iLife package to 09 and must admit that I've never experienced this much trouble in my 15 years as an apple. First of all: Upon upgrading and first launch of iPhoto I was met by a complete blank library. I quickly checked all my pr

  • Archive Backup job failing with no error

    Hi All, Can anybody help me to fix the backup issue. please find the rman log below and help me to fix this. Script /opt/rman_script/st80_oracle_arch.sh ==== started on Fri Jun 28 11:05:11 SGT 2013 ==== RMAN: /OraBase/V10203/bin/rman ORACLE_SID: ST80

  • HT1414 how to backup ipod in disk mode

    Hello, I am trying to backup my ipod classic, but it only gives me the restore option. I do not want to go ahead with the restore because it will wipe out all my data. Is there a way to manually backup?

  • Problem with JDBC CONNX (make Rollback)

    When we work with tables in BD since Oracle ADF through this JDBC ConnX operate correctly, except when done in a transaction rollback, which produces the following error performance: "Statement not active." To determinate where the error occurred, we

  • Performane issues

    Hi Folks, How do i get the best performance while designing interfaces,procedures.........what are best steps to follow to get good performance to load data?? Thanks in advance Reddy