Trying to learn about PL/SQL

Have a problem I can not figure out in time. Anyone have any ideas?
Write a PL/SQL program to compute the number of days in each month for year 2020. Your program will first create a table named Month_Days with two columns (see the table structure below). Use a Loop in your program to insert month and the number of days in that month into the table. INSERT INTO command can only be used once in your program. Your program should work correctly for any year.
current version I am working on looks like this
Set Serveroutput on;
DROP TABLE MONTH_DAYS;
CREATE TABLE MONTH_DAYS(
Month_ Varchar(9),
     Days_ Number (2));
Begin
FOR i IN 1..12 LOOP
INSERT INTO MONTH_DAYS (Month_, Days_)
Values(to_char(to_date('i-01-2020','MM')), to_char(to_date(last_day('01-i-2020'),'DD')));
DBMS_OUTPUT.PUT_LINE('Month_'||''|| 'Days_');
end loop;
end;

Compute Number of days in each month of Year 2020
DROP TABLE MONTH_DAYS;
CREATE TABLE MONTH_DAYS(cnt number(2), Month_ Varchar(9),Days_ Number(2));
declare
mons Varchar2(10);
dats Varchar2(10);
begin
for i in 0..11 loop
insert into month_days(cnt, month_, days_)
values
(i,to_char(add_months(to_date('20200101','YYYYDDMM'),i),'Month'),
to_char(last_day(add_months(to_date('20200101','YYYYDDMM'),i)),'DD'));
select month_ , days_ into mons, dats from month_days where cnt = i;
DBMS_OUTPUT.PUT_LINE('Month: '||Mons||'Days: '|| Dats);
end loop;
end;
/

Similar Messages

  • I have a new iPhone 5S.  While trying to learn about it, I accidentally recorded a voice memo with no content.  I cannot now figure out how to get rid of it.  There is a banner across the top of my phone with this memo which I don't want.  Help!

    I have a new iPhone 5S.  While trying to learn about it, I accidentally recorded a voice memo with no content.  I cannot now figure out how to get rid of it.  There is a banner across the top of my phone with this memo which I don't want.  I have deleted it from iTunes but cannot get it off the phone.  Help!

    The banner usually indicates that the memo is "Paused." If you go back into voice memos, touch the word "Done" beside the big red pause button, give it a name, then it will show in a list. Touch the memo in the list then touch the trash can icon that should appear.

  • Trying to learn about threads

    Hi guys,
    I'm trying to learn more about threads......i've written a small program for a better understand, but i don't understand the order of the output i'm getting:
    public class testme {
    public static void main(String[] args) {
    Theshape mover = new Theshape("go");
         mover.start();
    System.out.println ("checkpoint 1");
    System.out.println ("checkpoint 2");
         }//main
    }//class testme
    class Theshape extends Thread {
    public int count;
    public String thego;
    Theshape (String gg){
         thego= gg;
    count=0;
    }//constructor
    public void run(){
    try {
    do{
    System.out.println (thego);
    sleep(1000);
    System.out.println ("johnny");
    count=count+1;
    }while(count<8);
    } catch (InterruptedException e) {}
    }//run          
    }//class theshape
    ........the output i get is:
    checkpoint 1
    checkpoint 2
    go
    johnny
    go
    johnny
    go
    johnny
    go
    johnny
    go
    johnny
    go
    johnny
    go
    johnny
    go
    johnny
    I would like to know why "checkpoint 1" and "checkpoint 2" is printed first, even though the call to the run method is made before the two statements. i would have thought that the two checkpoint statements would be printed last.
    Can anyone help?
    Thanks,
    Zaf

    After you've issued the 'mover.start()' call, a new thread pops into existence. The first thread (your main thread) continues to run while the second thread prepares itself to start up. On your machine, this startup takes a (little) while, so your main thread is able to print those two line just before the other thread is able to print something. That's all there is to it. If you put a 'Thread.sleep(1234)' between those two println statements in your main thread, the output would probably be a bit different. Give it a try.
    kind regards,
    Jos

  • Trying to learn about Predictive Text

    My N8 User Guide (PDF) seems silent on how to use predictive text. Is it supposed to be so obvious that anyone can use it, and I'm an imbecile?
    My biggest gripe is that once predictive text finds what it thinks is a better word than the one I was spelling, I cannot find a way to convince it that I'm right. 
    In the interim, I've turned predictive text off, but it would be hugely beneficial to me. I teach English, so my spelling is above average, but my typing is carp.

    I have attached screenshots on how to deactivate predictive text. This taken using N8 running on Symbian Anna. Hope this helps
    Attachments:
    Anna 1.JPG ‏104 KB
    Anna.JPG ‏54 KB

  • Where can i learn about Boot Camp

    to all
    i would like to learn about boot camp and the risks of puttiong windows on my mac. some things i just need on windows.
    where can i read about it before i start to post dumb questions about virus software and the risk of virus, as i'm sure its been addressed somewhere..

    thanks for the reply The Hatter... but its not a case of not leaving my comfort zone, but getting the full facts first for what i want to do. I;m quite good at leaving my comfort zone thank you..
    currently trying to build a server at home with little experience
    teaching myself HTML and Javascript and writing 5 websites on the fly
    among many other things.. i just need to find out more about what i am doing before i do it so i understand what i am doing, and whether its the best use of my time.
    my laptop most certainly doesn't sit on a shelf. its been around the world, to far flung corners of jungles, remote islands in Thailand and never leaves my side. Its on al day working and on all night processing. infact it almost drowned with me when i was caught in a violent storm going between islands in Thailand. Naturally i put the laptop somewhere safe before saving myself from going overboard.

  • I have had LR4 since last August.Have just decided to start using it.I have an IMAC 10.9.3 version. Am trying to learn with "Classroom in a Book. Ton of  problems.Adobe will not help because it is to old and they no longer support. Can anyone tell where I

    Did anyone see the post I made about LR 4?Just in case I will post again. I have LR4 I bought last August and just now I am trying to learn this >I have "Classroom in  a Book" for LR4 lots of problems . I have a IMAC version 10.9.3. I tried different Adobe sites. They will not give me the Time of day because they say they no longer support this program. Can anyone here tell me where I can get support for this LR$ that Adobe no longer recognizes. Thank you My name is Jerry S. MY e-mail is [email protected] and phone number is 563-344-7910.

    Okay I will try. First I have lost pictures in catalogs and could not find again.I have tried reinstalling LR4 and when I do and reopen LR4 the same catalog appears in the panel and filmstrip and I have no idea how to get rid of that catalog and start over at square one like it was the frist time it was opened. That would be a big help and I think I start over and avoid the same problems.

  • How I can begin to start on self learning basis PL/SQL I mean writing block

    Could you please let me know about how One can get the expertise and start on self learning basis PL/SQL procedural on which actually HTML DB is written
    I am very much interested in learinig this language please provide me any useful link books online material in a proper way.
    Thanks in advance

    www.google.com.
    You'll find plenty of resources about pl/sql.

  • Hi, I've just started as a fresher in sap fico and I'm upto the LSMW part and I'm wondering why I keep getting an error in Run batch step when I do everything else correct could you help?  Please help I'm really trying to learn it as fast as possible

    Please help I'm really trying to learn it as fast as possible?  I've posted the file with all my screen shots going through the enitre process of me creating the LSMW file.

    First, I will try to address the iPod issue: If youve tried EVERYTHING on the website, your only other option is probably to contact Apple, I recommend by phone, and informing them of the problem. You are covered by warranty and therefore they are liable to assist you. Try that and come back with a status update
    Now I will address your attitude about it:Its absolutely understandable to be upset over something like this, especially with such an expensive product, but you are generalizing far to much. You may think Apple is being unproffesional by not warning potential buyers of the iPods common faults, but do you really think they would? they are out to sell these things, they arent going to point out the bad in their product. And not all iPods have problems, in fact only a fraction do. That gopes for the rest o Apples products as well. You are too hasty assuming all Apple products are junk, and one of many reasons as to why that is unfair of you is becuase you dont own any other Apple products.

  • Want to learn about xCode

    I bought my first Mac in february and I love everything about it. that said, I've been trying to get my hands on as much software as possible and I'm interested in learning about xCode. is there somewhere I can get started, right from scratch? I don't know much about developing software at all but I'm willing to learn.
    Thanks

    I posted this a while back. I don't know if it was helpful or not. It is a tutorial on C programming written by the author of a very good book on Motif programming.
    How C Programming Works
    Since you are just starting, my advice is to stay out of Xcode, just for little bit. Go through some basic "HelloWorld" tutorials. Learn how the terminal works. Learn a little bit about the process of compiling a source file into an executable. Xcode is very good, but it hides a lot of what is going on underneath. I think you would be much more effective with Xcode if you knew a little about that hidden stuff.

  • Learn about Tilt -- Notification

    This is in regards to viewing pictures (GALAXY S3)  when in the camera mode. the LEARN ABOUT TILT  notification keeps popping up, says cancel or enable.  Okay, so maybe I will enable, then I also go into my phone settings and yep it's enabled, no problem.   Back to Camera, view pic, dang if the LEARN ABOUT TILT notification AGAIN keeps popping up, then I have to tap done everytime.   IS there away to stop this.  I tried disabling motion features in phone setting, no luck.  Or is this the way it is, if so do not like it, NEVER happened before.  

    Try clearing data and cache for Gallery and then reboot your phone.  Sometimes Gallery remembers things that it shouldn't.
    Settings > Application manager > All > Gallery

  • New Designer Trying To learn

    Hi all,
    I am new to the field of ID. I have been an educator for 10
    years but am trying to learn as much about all the e-learning
    software that is available, Captivate, Camtasia, Articulate, etc.
    Does anyone have any suggestions for getting that first job or
    contract? It seems that they all want experience (at least 3
    years). I feel like a kid coming out of college again. Does anyone
    have any ideas or any projects that I can "intern" on or work on so
    that I can get some experience or solid things to create a
    portfolio with?
    Any suggestion provided is helpful to me.
    Thanks in advance.
    Rob

    Where are you located?
    rokenn3rd wrote:
    > Does anyone have
    > any ideas or any projects that I can "intern" on or work
    on
    Erik Lord
    http://www.capemedia.net
    Adobe Community Expert - eLearning
    http://www.adobe.com/communities/experts/
    http://www.awaretips.net -
    Authorware Tips!

  • Using Learn About FireFox and the 'Markers' disappeared never to return?

    Downloaded and installed FF4 for Mac
    Elected to ‘Learn about FireFox’, the browser complete with the Markers and dotted track/order to access line was displayed.
    Hit the first Marker and the relevant info window displayed.
    Hit the next Marker and then was distracted by another link and hit that.
    Returning (back button probably) to the learning session found all the Markers had disappeared.
    Tried various things to get the Markers to reappear but no luck so far.
    I did not restart FF4 but surely this should not be necessary?
    I will do this now but think this needs attention.
    Cheers, NSN
    EDIT: From the links obtained via a Google, I followed the most prominent to Mozilla.com and the info lead me to believe I was downloading FF4. I see this is not so!

    Unfortunately I tried that and it didn't work. Thanks for the help though. I tried to uninstall and it said I couldn't because the file is corrupt or something, but I think I finally got it uninstalled and/or deleted or whatever, but now I try to reinstall/download it again from the beginning and I can't. No matter what I do I can not get Firefox working again. No matter how many times I try to redownload it. Any other suggestions?

  • Network storage drive...where can I learn about these?

    I have so many questions, and frankly, the answers I've seen looking (briefly, admittedly) around these threads scare me.  Gee, Wally, what ever happened to Apple as the computer you didn't have to know computer programming to use?
    Now, before you all get your panties in a bunch telling me that I'm responsible for knowing how to use my hardware, I know...and I do want to know.
    So what I want to know now is how can I learn about the various types of "shares", and what they mean for hooking up a network drive for backup, etc.
    I have a WD 1TB drive which I believe uses "SMB", whatever that is.  It's got two folders on it currently, "Public" which I can access, and "WD Backup", which I can't.  I also can't seem to use it as a Time Machine drive, which is what I want to do with it.  And, or course, I can't re-format it, which I'd love to do as my wife hates the folder designations on it, and would like to have one folder called "iMac Backup" on it.
    Answers which don't involve Terminal will get extra points, but I've dealt with Terminal before, so take your best shot.  And ask for clarification if you need it.  Thanks.

    Unfortunately, networking and file-sharing aren't quite so simple in part because there's decades of history and dozens of companies involved in getting it into the current state. If you want dead-simple, you can get an Apple Time Capsule or AirPort with an external drive and be done with it. However, if you really want the most from network storage, you'll probably want to read up...
    WD make a number of drive, some network-attached, some not. We'll assume that you have one of their basic consumer network-attached drives.
    "SMB" stands for "Server Message Block" protocol and it was the local area network file-sharing protocol developed for Windows for Workgroups circa 1992 (it was later renamed CIFS - Common Internet File System - by Microsoft in 1996 because of the rising popularity of the Internet, despite the difficulty in getting it to work in anything but a small local network). SMB/CIFS is still widely used today for Microsoft Windows networks, though much of the equipment that serves those files are built on Linux or FreeBSD and not Windows.
    Access to shares on an SMB server (such as your hard disk) is controlled through a configuration utility provided with the drive or via a web application built into the device (that you access through your browser). Consult your manual. Generally speaking, however, SMB servers offer different ways of identifying whether or not you can access a share: 1) based on the computer connecting (in which case, everyone is considered the same user), or 2) based on a username/password combo. Generally a server will only operate in one mode. Shared directories can also allow or deny "guest" access (access without a password). All of this should be configurable through the drive utility or web application which you access with your web browser. Generally, an SMB server can only operate in one mode.
    It sounds like the Public directory is configured to allow guest access, and I'm guessing that "WD Backup" is a share that's password-protected and intended to be used with Western-Digital's own software of the same name. You should be able to add and create new directories as necessary through the provided utility or the web interface.
    You are correct, you cannot use Time Machine with an SMB file-sharing service. Time Machine will require AFP (Apple Filing Protocol) or NFS (Network File System) support. Western-Digital only has 3 network drives that support AFP and Time Machine: My Book Live, MyBook World, and WD ShareSpace. OS X also has some basic requirements about the performance and capabilities of network storage in order to use it with Time Machine, so you really want to look for drives that state up front that you can use Time Machine with them (for example, WD World Edition: http://www.wdc.com/wdproducts/updates/docs/en/appletimemachine.pdf )
    I'm not sure why you can't reformat the drive. This is supported on all WD products (though, if you've moved a bunch of data to it already, perhaps it would be a hassle).
    You can do backups of your Mac over SMB, but it's complicated by the fact that SMB is quite old and isn't capable of storing information about the file permissions, ownership, etc. It will be reliable for data files, but not for applications, etc. There's a work-around, of course. You can create a disk image on the SMB share using Disk Utility (make sure you create an HFS+ image) and backup to that. If you go that route, I would suggest either Carbon Copy Cloner or SuperDuper to perform your backups. They are true backup tools, not versioning tools like Time Machine.

  • I'm trying to learn and I think the knowledge is here!

    Hi! i'm always trying to learn and pass forward.  I'm not here to cause trouble. I have some things that I would like to have confirmed or denied. I do not own a HP computer at this time, but several of the residents in my village do. I have observed some great advice to community members from some smart people here on the forum. I have some things that I have learned from other forums and I want to share them. I would like to have comments from all the smart members here on the community forum. OK here we go!!
    Let's say we have a PC that won't boot into windows for some reason. Now IMHO, we have software or hardware problems.
    This is what I do. I down load a linux program. It's called Pupply Love.http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm
    This is a ISO file that you burn to a CD. It is a live CD and you can boot with it. You do not need a HD.
    Even if your PC has no hard disk (ex, broken hard disk), you can still boot Puppy via CD or USB and continue working. Old PCs that no longer work with new systems will still work good-as-new with Puppy.
    Now IMHO, you have proved that your monitor,power supply, and CPU are working. So now the HD is left. There are many ways to test your HD. One that comes to my mind is seatools dos.http://www.seagate.com/support/downloads/item/seatools-dos-master/
    One way to test your memory is memtest86.http://www.memtest86.com/download.htm
    memtest and seatools dos are both live CD's and should boot even if you don't have a working OS.
    Another live CD is the system repair CD  and the system recovery discs that you should have created on day one.
    I realize that HP has some great tools and I'm hoping that a guru will reply to this thread and add their comments. This is the way I learn. Computers can be a pain in the neck, but us humans can hold our own if we are willing to learn and pass forward to others.
    Dokie!!
    PS I take criticisms pretty well! This thread can be deleted if it is out of line or does not meet the standards of the forum. Some times I get a little windy and carried away.

    Hi Leo! If you can stop these down load managers, you will be my hero.
    Dokie!!
    PS I have tried my best to warn members here on the forum, but I haven't got a lot of support so far.
    I have my figers crossed that the new team will get-er-done

  • HT201250 My backup external hard drive hasn't work since I insalled Snow Leopard. Bad:(  I am still learning about my MAC and would just like to re-format the hard dive and set everything up again. I want to upgrade to Lion but can't untill I backup what

    My backup external hard drive hasn't work since I insalled Snow Leopard. Bad:(  I am still learning about my MAC and would just like to re-format the hard dive and set everything up again. I want to upgrade to Lion but can't untill I backup what I.

    Read through the links here, calm down and take your time.
    https://discussions.apple.com/community/notebooks/macbook_pro?view=documents

Maybe you are looking for