Problems about SQL (conversion to a form that Oracle can understand)

how can I convert this SQL into a form that Oracle can understand??
Select Temp.Country_name, number1
from (Select L.CID, C.country_name, count(*) as number from Leagues L, Countries C
where L.cid = C.cid and L.season = 'Autumn'
Group By L.CID, C.country_name) AS Temp
where number1 = (Select MAX(Temp. number1) from Temp)
ORDER BY Temp.Country ASC;
this query is to find the country that held the maximum number of leagues in "Autumn". Display the country_name and number. Sort the result according to country_name in alphabetical order and it should be allowed in SQL/92.
relational schema of Leagues ( LID(PRIMARY KEY), LEAGUE NAME, CHAMPION_TID, YEAR, SEASON, CID)
COUNTRIES (CID, COUNTRY_NAME, FOOTBALL_RANKING)
Thank You.

Hi,
Welcome to the forum!
Sorry, I don't know what's allowed in SQL/92.
This works in Oracle 9 (and up) and doesn't rely on anything that I know is an Oracle-specific feature:
WITH       country_summary     AS
     SELECT       c.country_name
     ,       COUNT (*)          AS country_total
     FROM       leagues     l
     JOIN       countries     c     ON     c.cid     = l.cid
     WHERE       l.season     = 'Autumn'
     GROUP BY  c.country_name
--     ,            c.cid          -- needed only if country_name is not unique
SELECT     *
FROM     country_summary
WHERE     cnt     = (
                SELECT  MAX (cnt)
                FROM    country_summary
;Here's another way, which works in Oracle 8.1 (and up):
SELECT  *
FROM     (
          SELECT       c.country_name
          ,       COUNT (*)                         AS country_total
          ,       RANK () OVER (ORDER BY COUNT (*) DESC)     AS rnk
          FROM       leagues     l
          ,       countries     c
          WHERE       c.cid          = l.cid
          AND       l.season     = 'Autumn'
          GROUP BY  c.country_name
     --     ,            c.cid          -- needed only if country_name is not unique
WHERE     rnk     = 1
;By the way, do you find it easier to read and understand code when it's formatted like the examples above, or as you posted it?
Help the people who want to help you. Always format your code. When posting any formatted text on this site, type these 6 characters:
\(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
Edited by: Frank Kulash on Nov 4, 2010 10:35 AM
Revised 2nd option, because Oracle 8.1 can't use ANSI join syntax.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Is there a way to create a PDF form that ANYONE can fill out and SAVE with their content?

    Is there a way to create a PDF form that ANYONE can fill out and SAVE with their content? By anyone, I mean someone who can download and use the free Adobe Reader, on either a Mac or PC. I have Acrobat Pro, and would like to be able to create forms that can not only be filled out and printed, but saved and emailed, which is not an option with the forms I have created to date. They can be filled out, but not saved, with Adobe Reader.
    TIA,
    Nancy

    To do what Dave indicated you need to do, it depends on what version of Acrobat you have:
    Acrobat 8: Advanced > Enable Usage Rights in Adobe Reader
    Acrobat 9: Advanced > Extend Features in Adobe Reader
    Acrobat 10: File > Save As > Reader Extended PDF > Enable Additional Features
    Acrobat 11: File > Save as Other > Reader Extended PDF > Enable More Tools (includes form fill-in & save)
    I wonder what it will be next time?

  • How do I get a PDF document put into an attachment form that I can drag to an e-mail.  Usually I get an icon showing an spiral note book which then becomes an attachment when I drag it to the e-mail, but occasionally it stays in PDF and prints out on the

    How do I get a PDF document put into an attachment form that I can drag to an e-mail.  Usually I get an icon showing an spiral note book which then becomes an attachment when I drag it to the e-mail, but occasionally it stays in PDF and prints out on the e-mail.  What have I done differently?

    Thanks again for the detailed instructions Srini!
    And I really hate to be a pest . . . but . . .
    Using your example and not modifying it, I get the e-mail form filled out correctly and the pdf attached, however, I'm not prompted to sign it.
    Any more clues?

  • I want to create a form that I can change at an instance that will store the information without replacing it

    I want to create a form that I can change at an instance that will store the information without replacing it: Here are examples of what i have:
    This is the form:  The True/False in column B are actually check boxes
    Date
    Job Name
    Start
    End
    Hours Worked
    Per Diem
    Wednesday, Mar 5, 2014
    Duke University
    7:30 PM
    2:30 AM
    7.00
    Arellano, Paul
    TRUE
    Wednesday, Mar 5, 2014
    Duke University
    7:30 PM
    2:30 AM
    7.00
    0.00
    Blackwell, Zach
    FALSE
    Christian, Charles
    TRUE
    Wednesday, Mar 5, 2014
    Duke University
    7:30 PM
    2:30 AM
    7.00
    0.00
    Christian, John
    FALSE
    Currence, John
    FALSE
    Curtis, Brandon
    FALSE
    Hawkins, Tyre
    FALSE
    King, Corey
    FALSE
    Nunez, Jose
    FALSE
    Rangel, Antonio
    FALSE
    Rice, Eric
    FALSE
    Salgado, Ricardo
    FALSE
    and the sheet that the index to looks like:
    Saturday, Mar 15, 2014
    Rice, Eric
    Providence College
    9:00 AM
    7:30 PM
    10.50
    1
    Saturday, Mar 15, 2014
    Rice, Eric
    Virginia Beach
    7:30 PM
    2:30 AM
    7.00
    Saturday, Mar 15, 2014
    Salgado, Ricardo
    0.00
    Sunday, Mar 16, 2014
    Arellano, Paul
    Providence College
    7:00 AM
    8:00 PM
    13.00
    1
    Sunday, Mar 16, 2014
    Blackwell, Zach
    0.00
    Sunday, Mar 16, 2014
    Christian, Charles
    0.00
    Sunday, Mar 16, 2014
    Christian, John
    0.00
    Sunday, Mar 16, 2014
    Currence, John
    Providence College
    7:00 AM
    8:00 PM
    13.00
    1
    Sunday, Mar 16, 2014
    Curtis, Brandon
    0.00
    I want to be able to fill out the form and it place itself into Sheet 1 without changing everytime.  I can index the array from the form, but it changes everytime.

    You think it would be the other way around.
    Just speculation, but forms probably came to iOS first because of likely use for data entry in the field that syncs back to the Mac.  On a small screen with a touch interface, forms make inputing values easier.
    On the Mac, with its bigger screen, typing directly into a data table often works well enough.
    SG

  • I would like to create a simple vote form that members can hit the reply button and record their preference in a check box. Is this possible on iPad?

    I would like to create a simple vote form that members can hit the reply button and record their preference in a check box. Is this possible on iPad?

    Go to the App Store and search on "Forms Management".
    There are a lot of candidates.

  • I want to create a form that i can drop pictures in a certain place

    i want to create a form that i can drop pictures into

    Unfortunately Formscentral does not support drag and drop pictures into your form. If you want to form filler submit their images with other form data, you can use file attachment field. Add an file attachment field when design form, so that form filler can add their image file into it and submit with other form data.
    Thanks,
    Pengpeng Sun

  • I need a fillable form that I can send to my clients and have them fill out and return via e-mail

    I need a fillable form that I can send to my clients, have them fill it out and return via e-mail

    Hi,
    You can save your form as a submission-enabled PDF form, send the PDF form to your clients and ask them not to submit the data using the submit button in the form but send you the PDF form after they fill it out. "Save Submission-Enabled PDF" button can be found in the Distribute tab of the form.
    Thanks,
    Wenlan

  • I have a white ipod touch 4 and it will not go into DFU mode. I know I am doing it right as I have 2 other black ones that I can put into DFU anytime no problems. The ipod works perfect besides that. Can anyone help?

    I have a white ipod touch 4 and it will not go into DFU mode. I know I am doing it right as I have 2 other black ones that I can put into DFU anytime no problems. The ipod works perfect besides that. Can anyone help?

    DFU or Device Firmware Upgrade mode allows all devices to be restored from any state.
    Above from:
    DFU Mode - The iPhone Wiki

  • A problem about sql*load

    how load LOB Data into database?
    I already saw oracle8i documents about sql*load. in general, lob fields in samples are less than 4000
    How load data >4000 into lob ?
    null

    I already knew the solution of the problem,but I met another problem.
    I checked my sql 7 database again, I found large columns are ntext datatype. I changed the ntext to text and migrated data again. In SQL*PLUS ,I found the data of clob columns change to '????.?-?'. I know this is caused by NLS_LANG, my NLS_LANG=simplified chinese_china.zhs16gbk. How do i set my nls_lang to get the right data?
    null

  • Need to create form that user can fill out and SAVE in Reader

    Hi,
    My form, which of course works fine in Adobe Acrobat 4 CS4, is unsaveable when typed into with Acrobat Reader. It says at the top:
    "Please fill out the following form. You cannot save data typed into this form. Please print your completed form if you would like a copy for your records."
    *I know it's possible* to make it writable/saveable for Readers users, because I have here a form that someone else created, and in Reader the message says, "Please fill out the following form. You can save data typed into this form."
    What setting do I need to change in Acrobat to make it saveable in Reader? Document attached.
    Thank you in advance!!!!

    WelltechSolutions wrote:
    Phillip,
    Thank you for the clarification.
    I cannot seem to find the post that mentioned that this could not be done; perhaps it was for an older version of Acrobat. If I find it, I'll send you the URL.
    This is a form that will reside on a web site for download, and the forms are used by individuals to track exercise as part of a community nonprofit wellness program. I doubt 500 folks will use it. We can monitor downloads.
    If we need to go above 500 downloads, how would we go about purchasing a license for additional use? And, is there a chance that Adobe will increase this limit for a purpose that is non-commercial and non-profit?
    Thanks.
    I don't know the answers to the question about license for additional use, nor would Adobe increase the limit. I  among other that were associated with Non-profits (I was treasury for an Electronics Association for 17 years) were the reason for adobe doing this to begin with. Before Acrobat 8, you had to use the other methods mentioned (The LiveCycle Server).

  • PDF form that you can type in and save

    I am working to create forms that my student athletes will need to type into and save so that they can upload them to our online pre-participation site. Is there any special way I need to save my Adobe PDFs?  I saved them normally and one student had no problem with this task....I had another try this and it would not allow them to save the file. So after reading online I saved it as a Reader extended, enable more tools and then they could type and save the document. Is this the way to go?  I need them to type in the form, but not mess with the overall outline - just type in the blanks. Thanks

    If they're using the latest version of Reader (XI), then you don't need to do anything else. Earlier versions require that you apply the Reader Extended Rights in Acrobat for the file to be savable in Reader. This also has legal implications as to the number of replies you may collect (500).

  • Does anyone know the best way to create a form that you can do a mail merge with?

    I have been asked to create a form that can be used to do a mail merge. At first I thought I could create it in indesign and then pdf the file and do form fields right in the pdf, but I'm not sure if you can do a mail merge with data in an excel file and a pdf file containing form fields.
    The other option I know I could use is a Word file and excel, but I don't think the functionality is as good as in a pdf (like addition of percentages, or error messages, radio buttons, etc.). And I do need to be able to do a mail merge. Anybody have any suggestions?

    There is not built-in feature for this, but it can be done with scripting. The problem is it can be a bit complicated, and it more complicated to decribe in much detail in a forum posting. It involves creating the base form and making the pages templates. You can export from Excel to a tab delimited text file. You can then either programmatically create a template-based FDF that when loaded into Acrobat populates the PDF form, creating as many individual forms as needed, or using JavaScript in Acrobat to read the data file and generate as many individual forms as needed. Both approaches involve a similar amount of programming, but they're quite different.
    You might want to look into this product, which apparently is no longer available but may be come back soon: http://www.debenu.com/products/eol/arts-pdf-variform-lite/

  • How to certificate a Form, that i can use xfa.host.importData("");?

    Hello!
    I´ve got made a Form that can import an XML Document. For this feature i use the javascript function
    xfa.host.importData(""); <-- empty String to open the OpenFileDialog
    the form works in Adobe Acrobat Reader 7.05 fine, but now i have updated my Adobe Acrobat Reader to 7.07 and nothing happend. A first look in the JavaScript Debbuger says me, that there is an security problem. So i have searched for this problem here in the forum and found an answer that this is only working with a certificated document/form.
    Is that right? I think its a bug, because why shoudt i certificate a document for Adobe Reader 7.07 and not for 7.05?
    My question is, how do i certificate the Form and what do i need to configure in the adobe reader that my document is working?

    [email protected] wrote:
    > Eva,
    >
    > While it's technically possible to attach files to an XFA-PDF form (a form designed in LiveCycle Designer (XFA) and saved as a PDF document) using Acrobat Pro, for example, it's really not recommended. An XFA form saved as a PDF document really a PDF with a thin wrapper around an XFA document. When the PDF document is opened in Designer, the PDF wrapper is discarded and therefore any annotations (such as bookmarks, attachments, comments, etc.) that you might have added to the PDF document using Acrobat are lost. Fortunately, we have a great solution for this in an upcoming release but I can't really give any details on it at the moment.
    >
    > As far as digital signatures go, I'm not really an expert in that area so I can't speak to whether attachments get signed or not. This might be a good question to post on an Acrobat Forum
    or the Reader Extension Forum
    >
    > Stefan
    > Adobe Systems
    Stefan,
    I'll have to disagree with you...I don't see the use of file attachments within an XFA form as an
    issue. Sure, the attachments will be discarded when you open them in Designer, but the purpose of
    Designer is for designing the form template, not as a client application for
    viewing/filling/distributing forms. The same could be said for form data or digital signatures...as
    soon as you open up a PDF file containing saved form data in Designer, you lose that information as
    well.
    As far as the digital signatures go...the attachments are included as part of the information
    that is signed. If you add or remove an attachment, the signature validation icon will display a
    yellow exclamation mark indicating that something in the form has changed.
    Justin Klei
    Cardinal Solutions Group
    www.cardinalsolutions.com

  • How on earth can I just make a form that people can sign??

    What I am trying to do is create a contract that people can fill out by simply clicking on text boxes and then typing in their pertaining text then at the bottom there will be a signature box which they should be able to click and then have the option to draw their signature.  No digital id crap, no certificates.  just a simple drawn signature.
    So I started with a word document.  Coverted it to PDF.  I have acrobat 11, I used the form wizard and let adobe find specific fields.  Edited the fields to my likeing to include on signature box and then saved the document.  Took FOREVER to find out I had to go through a special process of saving to allow others to sign.  So I go to File- save as other...-  reader extended pdf...- enable more tools    <-- that allows me to allow them to sign it. 
    Now when I open my document with reader it has the draw your signature greyed out!!! WTH!! I need help to give that option cause this is going to old people and they can't understand the digital signature long process.
    Windows 7-64

    The behavior you're seeing with Reader 11 and an enabled document is normal.
    You say you also tried with a version that's a "regular Save", which I assume is a non-enabled version that has no digital signature fields. In this case you should be able to select any of the options except for "Use a certificate" when using Reader. I just tested Reader 11.0.5 on a Windows machine with a non-enabled form that didn't include any digital signature fields, and it behaved as I expected, allowing me to use a hand-drawn signature. What does this show (in Reader, not Acrobat) when you select: File > Properties > Security
    A screen shot would be nice.
    In case you weren't aware, when a form is e-signed this way, the form fields are flattened when the document is saved, so any forms you receive back from users won't contain form fields, making it difficult to extract the data if you need to.

  • Create a form that user can fill online, print and not save.

    I have form that I want user to fill out. I want them to send it via email or print and not save the information that was typed into it.
    Where or how do you put that type of security?
    Thank you!
    Jim Z

    through adobe policy server you can give only online access to the document(means that document will not be opened unless user is authenticated with the policy server) and assign policy to user to restrict him only printing and filling in form fields.
    Also you can revoke that document after sometime.

Maybe you are looking for