Suggest a good query for my problem

Joining two tables .......
1. CREATE TABLE STUDENT
IDNO NUMBER,
NAME VARCHAR2(30 BYTE),
AGE NUMBER,
CLASS NUMBER
2. CREATE TABLE CLASS_ST
CLASS NUMBER,
CLASS_NAME VARCHAR2(20 BYTE)
1. joining two table and find minimum age of student in each class.
2. return name,age,class_name
Edited by: joel on Oct 10, 2011 3:57 AM

Joel,
How does this relate to Oracle Forms? You should always post questions in the appropriate forum. In this case, you should have posted your question in the PL/SQL forum.
For reference, you might want to take a look at the following as well:
Oracle Forums FAQ
10 Commandments for the OTN Forums Member
How to ask questions the smart way
Craig...

Similar Messages

  • Can someone suggest some good books for sql reporting services (SSRS) 2012 or above?

    Hi Everyone,
        Can someone suggest some good books for sql reporting services (SSRS) 2012 and above? I ave been working on ssrs for past 2 months and have a basic understanding of ssrs.
    Regards
    Regards

    Hi,
    you can look for below options;
    http://www.amazon.in/Microsoft-Server-Reporting-Services-Recipes/dp/0470563117#reader_0470563117
    http://www.goodreads.com/book/show/18147604-learning-sql-server-reporting-services-2012
    Thanks
    Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem. http://techequation.com

  • Suggest a good book for learning?

    Hey, all.
    Trying to get into the automating/scripting thing as I've started a new job that has to do a lot of versions of similar animations/illustrations. I'm no programmer, but have had some success with simple AppleScripts in Illustrator and Photoshop, but After Effects doesn't like to play nice with AS. So I figure I may as well focus my efforts on ExtendScript/JavaScript to work with all the apps, be cross-platform, plus help with my limited Expressions knowledge.
    So can anyone suggest some good books for learning the JavaScript language? I've done online tutorials, which have helped a little, but just a big ol' consolidated JavaScript book, teaching the structure and syntax from the beginning (again, not a programmer by trade) would be best for me. Thing is, 95% of the books I've looked at are focused on web design, which I'm not that interested in. I'll use one if the core JavaScript teachings are well-presented and I can just ignore the web stuff; just don't want to buy a book that I'm only going to read half of and not learn everything I need to.
    All suggestions welcome, and thanks in advance.

    Hi there - lots of resources...
    Look up "eloquent javascript" online for a pdf.
    Javascript - The Definitive guide
    NewThinkTank on youtube
    Codeacademy
    Then it's the scripting guide for the other half.

  • Please suggest me good links for locking mechanism in SAP

    Please suggest me good links for locking mechanism in SAP
    thanks,

    Hi Akash,
    Here is a small description on lock object.
    The lock mode controls whether several users can access data records at the same time. The lock mode can be assigned separately for each table in the lock object. When the lock is set, the corresponding lock entry is stored in the lock table of the system for each table.
    Access by more than one user can be synchronized in the following ways:
    Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
    Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
    Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
    Check out this thread:
    LOCK OBJECT?
    Regards,
    Vivek
    PS: Award points if helpful

  • Is it possible to connect a dot matrix printer to MacBook Air? If yes, please suggest a good application for printing bills in a shop.

    Is it possible to connect a dot matrix printer to MacBook Air? I need to print receipts in my textile showroom. Please suggest good applications for printing receipts and saving daily sales records.

    Prath33k wrote:
    Is it possible to connect a dot matrix printer to MacBook Air?
    yes.  As long as it is a newer one (means not 15-20 years old). Do you have one?  If so, provide the make/model.  If you do not have one, which ones are you looking to purchase?

  • Suggestion on Good Books for SAP NetWeaver Administrator

    Hi,
    I am very new to SAP NetWeaver. Can any one please suggest some good books to learn SAP NetWeaver Administration. Is SAP NetWeaver For Dummies is good book to start with?
    I want to understand the SAP NetWeaver Architecture and also want to learn from SAP Basis administration/Consultant point of view. So which book can help?
    Also I got to kmow, SAP NetWeaver includes the following components and tools:
    Components:
    SAP Auto-ID Infrastructure
    SAP Business Intelligence
    SAP Enterprise Portal
    SAP Exchange Infrastructure
    SAP Master Data Management
    SAP Mobile Infrastructure
    SAP Web Application Server
    Tools
    SAP Composite Application Framework
    SAP NetWeaver Developer Studio
    SAP Solution Manager
    So from SAP Basis Consultant point of view, which Componet one should learn or focus on?
    Appreciate help.
    Thanks
    Regards,
    BasisCK.

    Hi Nitin,
    Thanks for the reply. SAP R/3 Handbook, Third Edition - By Jose Antonio Hernandez, Franklin Martinez, James Keogh
    ~
    Table of contents
    Chapter 1: SAP: From SAP R/3 to SAP NetWeaver
    Chapter 2: The Architecture of the SAP Web Application Server
    Chapter 3: SAP NetWeaver: An Overview
    Chapter 4: Using SAP Systems
    Chapter 5: Upgrading to SAP R/3 Enterprise: The First Step into SAP NetWeaver
    Chapter 6: The Change and Transport System
    Chapter 7: Development Options with SAP Solutions: ABAP Engine
    Chapter 8: User Management and Security in SAP Environments
    Chapter 9: Web Application Server System Management
    Chapter 10: Performance and Troubleshooting with SAP Solutions
    Chapter 11: SAP for IT Managers: Implementation, Planning, Operation, and Support of SAP Systems
    INDEX
    ~
    Is this book completely talk about SAP NetWeaver or it's kind of transition/bridge from SAP R/3 to SAP netweaver?
    Since you are experienced in Netweaver technology, can you suggest the step by step approach to be master in this?
    I mean read this book first, then what next? what component I should go for it? XI, EP??
    Appreciate your help and inputs.
    God bless u.
    Thx
    Regards.
    Basis CK.

  • How to place nulls has last rows.Find query for below problem

    I have a table..MyTable(value number(10))
    select * from Mytable;
    value
    12
    null
    13
    null
    11
    null
    This is the table i have and the records i have...... and i need output like this
    value
    12
    13
    11
    null
    null
    null ..............>ike this i need output for this i use this query i.e
    Query-->select value from mytable where value is not null
    union all
    select value from mytable where value is null
    ------------>and this query gives only one column result i need multiple results like below: i have table with 2 columns like below
    MyTable2(value1 number(10),value2 number(10))
    select * fromMyTable2
    value1 value2
    111 null
    null 201
    112 null
    null 200
    110 null
    this is the table i have......... and i need output like below
    value1 value2
    111 201
    112 200
    110 null
    null null
    null null
    NOTE:: If we use ORDER BY table records order must change, i don't want to change any order....please what is the query for that

    I'm not able to find any sense in your request but it can be done:
    select value1, value2
    from (select value1, rownum rn from
             (select value1 from mytable where value1 is not null
               union all
              select value1 from mytable where value1 is null)
            ) a,
           (select value2, rownum rn from
             (select value2 from mytable where value2 is not null
               union all
              select value2 from mytable where value2 is null)
            ) b
    where a.rn = b.rn;You should study some book about relational databases to understand frst of all what a record is, and then that records in a table are not ordered.
    Max

  • Can someone please suggest some good projects for learning about usrp and labview for beginners?​??

    Can some1 please me suggest  some good things to work out on USRP using labview.. 

    https://decibel.ni.com/content/groups/ni-usrp-exam​ple-labview-vis?view=documents
    Omar

  • Need suggestions or possible approach for this problem

    Hello,
    I have a scenario and I want to develop an apex application for this scenario.
    The thing is I have mutiple report regions on a page which are querying the same tbl 'loans'. I have a button named 'Assign loan' at the top of the page and at bottom of the page I have buttons 'Save' and 'Complete'. Initially the multiple report regions should not be displayed, only after user clicks on the buton 'Assign loan', then only they should be visible. Similarly for the buttons 'Save' and 'Complete'. After the loan is assigned to a user the button 'Assign loan' should be disabled.
    Now Consider a situation where in a user logins to the application and clicks on the button 'Assign a loan', at this point i will update the table and set a flag, so that the user will get that particular record for the reports region. I mean this record should be locked for that user and shouldn't be available for other users. The thing it should work in a multi-user environment, i mean each user should get a different loan when they click the button 'Assign loan'. So, here the user is assigned a loan and he/she makes changes to the multiple report region editable items and he/she can either save the changes by clicking on the button 'Save' or they can click on the button 'Complete' which means the loan was reviewed and is completed. The user shouldn't be assigned an another loan until he/she reviews and completes a paticular loan already assigned to him. And another case would be the user does some changes to the multiple report region editable items and clicks the button 'Save' (menaing pending) the report changes should be saved and he shouldn't be assigned any new loan until he completes the already assigned loan.
    Can anyone please help me with their possible suggestions or an approach to this kind of problem.
    thanks,
    Orton

    It looks to me that the trickiest part is preventing more than one user from getting assigned the same loan. I've seen DBMS_LOCK used for a situation like this. It's been years so I'm a bit fuzzy on the exact details but it goes something like this:
    When the user clicks 'Assign a loan', try to get an exclusive generic lock:
       dbms_lock.request(lockhandle => 'LOAN_LOCK',
                      lockmode   => dbms_lock.X_MODE,
                      timeout    => 10);If another user already has a lock with this name, try again after the timeout until the lock is obtained (and probably only try a maximum number of times).
    Once the lock is obtained, get the next available unassigned loan and set the flag in the table. Now release the lock so the next user can get a loan assigned.
       dbms_lock.release(lockhandle => 'LOAN_LOCK');As long as everyone uses the same process for getting a loan assigned, only the user with a lock can modify the table. The rest of it (the logic around what buttons to show, requiring an assigned loan to be completed before getting another one assigned, etc.) should be relatively straightforward.

  • Why new firmware may be a good fix for screen problems

    When I read on the Internet Thursday that some people had reported that the firmware had fixed their dark screen problems, I wondered if this was possible, and was this a good fix. I had taken my Touch to the Apple store earlier, and had the screen problem confirmed, but no exchange was possible at the moment, because the Touch was out of stock.
    Where I work we have a number of small LCD screens that have a narrow viewing angle like the Touch, but being commercial monitors, also have knobs to control brightness and most importantly contrast. I started playing with the contrast and was surprised that I was able to exactly duplicate the problem my Touch had, just with contrast. The contrast adjustment on this narrow view LCD controlled viewing angle, and I could duplicate the negative image thing perfectly. I now had great hope that the firmware would in fact fix my Touch.
    When I got home from work, I installed the firmware update to my week 36 Touch, and was thrilled to see all video issues gone. We need to remember that Apple has a lot more control over the LCD display through software than we have. We only have brightness! I mean if you had to adjust the contrast knob on your new computer monitor would you label the monitor as defective?
    I believe that Apple knew by serial number which Touches needed adjustment to the video based on LCD origin, and applied them with this software. They merely tuned the contrast knob, and some other video settings that we don't have! (It would be nice if they added a contrast slider, and maybe color saturation level, to the brightness level already included!)
    I have no intention of returning my Touch now for exchange, will count myself as lucky that my video got tweaked to perfection, and I have no dead pixels in my week 36 Touch. I understand that some people are never going to be happy with all of this, that in a perfect world everything would be great right out of the gate, all the time. But...
    Enjoying my Touch a lot. A great gadget.
    Now if we could only have those 3rd party applications!

    This is true. With any LCD screen you can adjust contrast and color temperature which seem to be the combination working against week 36 and 37 owners. It makes sense Apple could control these settings through a software update. I suspect as you have stated, the 1.1.1 firmware upgrade does a serial check and selectively alters certain settings to compensate for the difference in the screens.
    I say this because I still strongly suspect that Apple did change screens, screen coating or something in the hardware betweent he 37 and 38 lines (or early on in the 38 line) because there are reports with screen shots to confirm inconsistency int he effect of the 1.1.1 firmware update fixing the problem.
    If the firmware update works for you, fantastic! If it does not then I would return it. If I recieved a week 36 and week 37 device from an on-line order I would return unopened to the nearest Apple store to avoid a restocking fee. If I didn't have an Apple store I would do the return through whoever I did the on-line order with.
    The reason I would do this is that I am a bit of a perfectionist when it comes to displays. I feel like if I'm paying $300-$400 for one of these devices my desire to have the best screen would take priority over my need to own the device quickly, but that's just me.
    Jeremy
    Is your iPod Touch screen bad? Compare it against these screen shots:
    http://jdeats762.bravehost.com/iBadScreen.htm
    Message was edited by: Ramzy76

  • Query for Datasource problem

    I have made an database based xfl function as:
    declare function tns:add_months($da as xs:dateTime,$val as xs:int) as xs:dateTime? external;
    and when i am calling this function in an Data sService is is giving me this error:
    The function is defined for the following datasources: [null]

    i am using a Database based xfl function for incorporating add_months function of sql:
    declare function tns:add_months($date as xs:dateTime,$value as xs:int) as xs:dateTime? external;
    This was working fine when i called it in another funcition where clause(see attacment for it's query plan-CorrectQueryPlan.xml)
    But after changing the JNDI name when i am using it in the same function where clause i am getting this error:
    Unable to generate SQL for XQuery expression: Cannot generate SQL for the user-defined function {lib:ShipmentsDataServices/XqueryLibrary/Test}add_months for datasource pg.dtmg101DS. The function is defined for the following datasources: [null]
    see attacment for it's query plan-Error.xml)
    I have also trie to create a new Database based xfl and trie to use it in a where clause of some other data Service then also it is showing me the same above error.
    please help me solving this.
    thanx
    Anand

  • Pls help me in writing a query for my problem !

    I have to find out the amount(LAmt) for members who lie btw diff age groups, below are the table structures:
    table1
    DOB ID
    12/24/1986 F125
    06/05/1988 F223
    05/04/1987 F589
    07/07/2001 F856
    table2
    LAmt ID LDate
    $56 F125 01/01/2011
    $45 F223 08/22/2005
    $87 F589 09/24/2004
    $87 F856 10/10/2000
    $87 F587 09/09/2002
    Query:
    1) I have to find the age group for the members who lie between 1 to 5 & 6 to 10 and so on, Also find the the no. of days since they have been registered(Using LDate-Current Date) , also the LAmt for those members.

    Hi,
    836810 wrote:
    SELECT -- To calculate Listed Amount of members btw age group 0 to 4
    COUNT(DateOfBirth) as Nopresent,
    DATEDIFF (yyyy,DateOfBirth,GETDATE()) as age,
    SUM(RPTInvHosp.AccountListAmount) as ListedAmt,
    COUNT(DateOfBirth) * SUM(RPTInvHosp.AccountListAmount) as [Calc]
    FROM RPTInv1st,RPTInvHosp
    WHERE
    DATEDIFF (yyyy,DateOfBirth,GETDATE()) >= 0 and
    DATEDIFF (yyyy,DateOfBirth,GETDATE()) < 5 and
    RPTInv1st.PASDebtorID=RPTInvHosp.PASDebtorID
    Group by DATEDIFF (yyyy,DateOfBirth,GETDATE())
    I want to get members btw the particular age group JOIN with the no of days they have been opened an account & their amount.In Oracle, use double-quotes (or nothing) instead of square brackets around aliases:
    COUNT(DateOfBirth) * SUM(RPTInvHosp.AccountListAmount)  as "Calc"The double-quotes are only necessary if you want the alias not to conform to the normal naming conventions; they are optional around normal names, such as CALC.
    There are no built-in functions called GETDATE or DATEDIFF in Oracle.
    In Oracle, SYSDATE returns the current DATE (on the database server).
    There's nothing very convenient in Oracle for getting the difference between two DATEs in units of a year. The best way is to use MONTHS_BETWEEN to get the difference in months, and then divide that number by 12, like this:
    WHERE     FLOOR ( MONTHS_BETWEEN ( SYSDATE
                                , DateOfBirth
               / 12
               )          BETWEEN     0
                         AND     4Do you need help about how to do a join?
    It's not at all clear what you want here.
    Whenever you have a question, post CREATE TABLE and INSERT statements for your sample data, and post the exact results you want from that data. Explain, with specific examples, how you get those results from that data.
    Always say what version of Oracle (or other software) you're using.

  • Suggest a good book for ejb for begginers

    i does'nt uderstand which book is good .what about orelly enterprise java bean

    you should only buy one that describes the new EJB3 standard. Google or search Amazon.com for EJB3.
    who uses EJBs anymore?
    %

  • Query for the Problem of setting up agent and scheduling a scenario

    I have setup a agent called AGENT_SCHEDULER.I can start this agent from the windows service,but when I go to Topology manager and say test Test Connection I don't get any response. My ODI hangs up and I have to manually kill
    from the task Manager. Why is this happening?
    But when I start from the command prompt using agentscheduler "-port=20910" "-name=AGENT_SCHEDULER" "-v=5 its gets started and tehn when I go to topology Manager and test connection ,it says agent test successful.
    But in the windows service it is not started though. Is this correctly behaving?
    After that when I schedule a Package Scenario and give status "active " and execution on "startup",I able to save. At this I presume the schedule must have started and ran the process. But then when I Go to Operator,it gives me error UNPARSEABLE DATE "0" and the opens up and doesn't show me anything.
    what is this error unparseable date "0"?
    I have set my ODIPARAMS with corect master and work repository and encoded ODI_SECU_ENCODED_PASS with the latest one generated?because every time I generate I get a different one.I am using java version "1.5.0_05".
    Also I have a requirement that I schedule my package after every 30 mins? What I found that we can schedule hourly?How will I be able to achieve this?

    Hi user768175
    Ref Note 783671.1 In Iassets Security by Cost Center is not Working, The Symptoms is as below :
    In iAssets, users with "Enforce Security by Cost Center" are able to see assets from different cost centers then the one where they are restricted, when using Advance Search button.
    But I still not work when using Advance Search button....
    Anyway, do u know how to setup the Cost Center/Department for employee in the HRMS module? Is't correct as below?
    I tried to set in HRMS (HRMS Manager) -> People -> Enter and Maintain --> select user--> Assignment -> Purchase Order Information -> input value in Set of Books and Default Expense Account field
    Many thanks for your help...
    SamCH

  • Give me Sql Query for this problem?.  Please Help Me........

    This is my exact requirements
    My PNO table formart is
    PNO PDate PCount
    P001 08/27/05 20
    P001 08/29/05 10
    P002 08/27/05 20
    P003 08/28/05 20
    P003 08/28/05 20
    I want to display the total (PCount) PNumber for this week.
    PNo Sat (27th) Sun(28th) Mon(29th) .........Fri(2/09/2005)
    P001 20 0 10 0
    P002 20 30 0 0
    P003 0 40 0 0
    or at least i want to display, i mean if there is no record for P003 on starturday, it will display 0.
    PNo Sat (27th)
    P001 20
    P002 20
    P003 0
    first iam getting distinct PNo for this week, and check whether these number occurs on saturday if occur then display count otherwise display 0
    Millons of thanks in advance...
    Message was edited by:
    user448874

    EZECASH@ORCL> select * from pno_table;
    PNO  PDATE         PCOUNT
    P001 27-AUG-05         20
    P001 29-AUG-05         10
    P002 27-AUG-05         20
    P003 28-AUG-05         20
    P003 28-AUG-05         20
    P001 02-SEP-05         10
    P001 03-SEP-05         15
    P002 03-SEP-05         10
    P002 04-SEP-05         10
    9 rows selected.
    EZECASH@ORCL> select next_day(trunc(sysdate)-7,'sat') d1,next_day(trunc(sysdate)-7,'sat')+1 d2,next_day(trunc(sysdate)-7,'sat')+2 d3,
      2    next_day(trunc(sysdate)-7,'sat')+3 d4,next_day(trunc(sysdate)-7,'sat')+4 d5,next_day(trunc(sysdate)-7,'sat')+5 d6,
      3    next_day(trunc(sysdate)-7,'sat')+6 d7
      4  from dual
      5  /
    D1        D2        D3        D4        D5        D6        D7
    27-AUG-05 28-AUG-05 29-AUG-05 30-AUG-05 31-AUG-05 01-SEP-05 02-SEP-05
    EZECASH@ORCL> select pno,sum(decode(trunc(pdate),d1,pcount,0)) day1Sum, sum(decode(trunc(pdate),d2,pcount,0)) day2Sum,
      2  sum(decode(trunc(pdate),d3,pcount,0)) day3Sum,sum(decode(trunc(pdate),d4,pcount,0)) day4Sum,
      3  sum(decode(trunc(pdate),d5,pcount,0)) day5Sum,sum(decode(trunc(pdate),d6,pcount,0)) day6Sum,
      4  sum(decode(trunc(pdate),d7,pcount,0)) day7Sum
      5  from  pno_table,
      6  (select next_day(trunc(sysdate)-7,'sat') d1,next_day(trunc(sysdate)-7,'sat')+1 d2,next_day(trunc(sysdate)-7,'sat')+2 d3,
      7    next_day(trunc(sysdate)-7,'sat')+3 d4,next_day(trunc(sysdate)-7,'sat')+4 d5,next_day(trunc(sysdate)-7,'sat')+5 d6,
      8    next_day(trunc(sysdate)-7,'sat')+6 d7
      9  from dual) w
    10  where pdate >= next_day(trunc(sysdate)-7,'sat')
    11  group by pno
    12  /
    PNO     DAY1SUM    DAY2SUM    DAY3SUM    DAY4SUM    DAY5SUM    DAY6SUM    DAY7SUM
    P001         20          0         10          0          0          0         10
    P002         20          0          0          0          0          0          0
    P003          0         40          0          0          0          0          0
    EZECASH@ORCL>

Maybe you are looking for

  • Adobe Support Responding to an invalid serial number

    Adobe is deliberately stealing my software and blocking it from usage.  While they recognize my email address when I tried to create a new account to share this with fellow consumers, they cannot find my records and are blocking my Adobe product from

  • My blackberry keeps on freezing on the restart page

    hii my blackberry scroller stopped working; so i took the battery out and out it back in. it now keeps on freeziing whilst restarting the bar only gets up to about 3/4 of the white bar. i have contionusly taken the battery out and put it back up aswe

  • Query field requirement

    Hello All, I have the following requirement in the report, I wonder whether this can be done by Formula variable(Customer exit) or do it in any other way. The customer wants the report as shown below. Date (PRDT)    New Boolean Customer exit variable

  • Problem Editing a .fla

    I am building a website and I happen to come across a flash intro movie on templatemonster.com and so i began editing it. Here is the actual movie itself: http://images.templatemonster.com/screenshots/18000/18003.html All I am editing is the text in

  • How does one skip songs on an ipod nano

    how do i skip songs on my ipod nano from my playlist?