Need help... As a very basic beginner.

1 create a table with three columns, call NEXT_BUS_DAY. Write a query (or queries) to fill the table as follows: each date of the month for April 2006 stored as a date in the first column. The second column contains the day of the month as characters, such as Friday. The third column stores the day after day in column 2. For example, Saturdays and Sundays are not working days, so if two column Friday, then three-column will contain Monday. (Not considered holidays for this problem). Tip: On TO_CHAR mask 'DAY' returns the same padded characters number of namespaces of the day like the day with the longest.

Hello

user13417896 wrote:
INSERT INTO NEXT_BUS_DAY
WITH got_mdate AS
(

Select level as DateRange + to_date('&date','MM YYYY')-1
of the double
where (to_date ('& date', 'MM YYYY')-level 1 +)<= last_day(to_date('&date','mm="">
connect by level<=31>

WITH got_mday AS
(
SELECT TO_CHAR (mdate, 'DAY') AS mday
OF the double
)
Select this OPTION, mday
CASE
WHEN mday IN ("SATURDAY", "SUNDAY")
THEN 'weekend '.
ANOTHER "work day".
END AS type_o_day
OF got_mday
;

Can u help me pls inthi final step...

What stage is this?
What is the request (or the INSERT statement, if you insist on the conduct of an INSERT at this point) which worked correctly?
What problem receive you at this stage?

The example I gave before illustrates how you can assign an alias in a subquery and use this alias in a query Super. If you see something in it that you can use in this problem, so much the better, but I have never said that all or part of it could be directly copied on your return.

Looks like you have a subquery to work now:

DEFINE  date = "04 2006"

WITH     got_mdate        AS
(
select to_date('&date','MM YYYY')-1 + level as DateRange
      from    dual
      where   (to_date('&date','MM YYYY')-1+level) <= last_day(to_date('&Date','MM YYYY'))
      connect by level<=31
)
SELECT     *
FROM     got_mdate
;

Output:

DATERANGE
-----------
01-Apr-2006
02-Apr-2006
03-Apr-2006
...
29-Apr-2006
30-Apr-2006

So far so good.
What is the next step? How can you modify this query to bring you a little more towards your goal?
You're going to add another column to this result include? What will be in the new column? What functions or other expressions can you use to get it?

Published by: Frank Kulash, December 6, 2010 16:39

More I think about this problem, less I like the plan I originally described for you. Sorry for the bad suggestion.
It would be simpler if you wrote an INSERT statement for poulate only mdate column. The query you have above is sufficient for this. You won't a cluase WITH or any kind of subquery; Since you will not need to reference an alias anywhere.
After that you have populated mdate column, write an UPDATE statement to fill the column mday, using the value already in mdate.
After that you have populated mday column, write another UPDATE statement to populate the nbday column, using the value already in mday.

It won't be as effective (in terms of computer resources) than writing a single subquery.
I think it will be much more effective in terms of your time and effort, and also what seems best for you to learn at this stage.
On a real job, you could make a similar decision. If you're only taliking about 30 lines and you just have to do this once, then you probably won't do much damage, no matter how inefficient the UPDATE statements are.

You can only fill in the column mdate?

INSERT INTO nex_bus_day (mdate)
SELECT TO_DATE ...

Tags: Database

Similar Questions

  • Need help with Flash - really basic!

    Hi, I really need help with Flash and quick. I have to create an auto-run cd, but before I can create that, I have to make everything works! I took a class in College Flash, which up to 1 1/2 ago so im kind of knowledge missing!

    My first problem is as follows:
    I have the homepage, and it contains a button English and french.
    When you click on buttons, it brings you to the next page, either resourcesFr or resourcesEn.
    I tried to use the loadMovie script but and it works but the new page loads on the home page you can still see the English/french under buttons. How can I fix? I know its simple but I am short on time... Should I still use the loadMovie script?

    My other problem is that im trying to have another button to link to a folder. Use the script for getURL for this as well?

    Help!

    I was able to solve my problem... it was only the forward slash that were in the wrong way... so the correct code is:

    on (release) {}
    DRV = _url.substr (8.1);
    getURL (drv + ": / English/brochures");
    }

    Only took me 5 days... I think I need to buy a script book action! Laughing out loud

  • Need help with some oracle basics

    Hi friends,

    I would like to know if my abt to understand some concepts as described below is just?

    1) active user : when a user issues a command SQL to oracle to perform.

    (2) * user inactive: * when oracle wait for users to issue commands and the user is INACTIVE.


    Please help me to find these answers:

    A user become active when they click submit button/backup/restore?

    I would like to know how much resources a user oracle uses (network traffic, memory, I / O)?

    Is a user uses some resources if it is inactive and sitting idle for long time?



    Thank you

    Oracle marks a session as a session inactive if the user will not do anything with the database for some time. I don't know what is the explanation for the status of the session that you see a toad, since I do not use it. Maybe someone else would have a better explanation then wait for others to participate.

    Aman...

  • Need help with a basic host script?

    All I recently started using Powershell scripts and as big a language it is that I'm still learning at the 'very' early stages. All I would do is create a script that reads some hosts from a text file, and then it receives some info on all the virtual machines associated with this host. I know that the get - vm command can do for ALL the virtual machines in VC but when I run my script it seems to get the information for the VC together and NOT on a per-host basis. (We have several hosts within the domain and require info VM only a couple). Ive checked some samples but nothing that allows me to get the info I need Heres my script so far (very basic, I know!)  $hostlist = (get-vmhost-name (get-content c:\hosts.txt) | select name) #Get VMs for each host foreach ($esx in $hostlist) {$VMs = get - vm foreach ($vm in $VMs) {Write-host $vm. Write-host $vm name. $vm.numcpu MemoryMB Write-host Write-host $vm. Guest}} I know its really basic so far, but all I'm trying to achieve is just get some info on some VMS and report to the console (I know that I can send the information to a spreadsheet myself so now worries it) thank you very much for you help in advance

    You can limit the virtual machines, you receive chaining cmdlets Get-VmHost and Get - Vm together like this

    $hostlist = (get-vmhost -Name (get-content c:\hosts.txt) | select Name)
    
    #Get VMs for each host
    foreach ($esx in $hostlist) {
      $VMs = Get-VMHost $esx | Get-VM
      foreach ($vm in $VMs) {
        Write-host $vm.Name
        Write-host $vm.MemoryMB
        Write-host $vm.numcpu
        Write-host $vm.Guest
      }
    }
    
  • Flash CS5 beginner - need help with Add URL link animated banner

    I apologize if this is a very basic question, but I am a newbie in Flash design. I created a basic animation in Flash CS5 and I need to add a clickable URL link. I tried a few tutorials that seemed promising, but none of them solved my problem. I tried a number of things, including the conversion to parts or all of the simple images buttons or movies and linking them this way as well as type in the code ActionScript 2 and 3, which none was successful. The animation plays correctly in my browser, but when I click it, the link does not work. I wish that the entire banner clickable to take viewers to the website linked instead to use the text of the hyperlink. Also, when I open the Code snippets window, it is empty, any image or image I selected. Do I need to import snippets of code somewhere or just will I things the wrong way? Any help is greatly appreciated!

    go to your help section and search the reference Guide of Action Script 3.  It is the repository of all the possibilities of ActionScript with Flash and Flex.  You can consult the alphabetical index URLRequest and navigateToUrl.  There could even be code samples included.  I haven't looked right, but you'll probably get before doing so.

    Best,

    -markerline

  • Speed/performance of my mac mini (mid-2010) is very slow. Need help, consolidate the files, software updates, etc. in order to improve the speed and performance.

    My mac mini (mid-2010) speed/performance is very slow - think of it as a result of letting my kids do "whatever" about it in recent years.  Need help, consolidate the files, software updates, etc. in order to improve the speed and performance.  You will also need to get data out of old PowerBook G4.

    < object edited by host >

    We are users like you.  Search locally by using something like Yelp or similar

    http://www.Yelp.com/search?find_desc=Apple+repair & find_loc = Chicago, + IT & start = 0 & ortby = rating s

    or read a few links which may be relevant on this forum about the slow mac mini

    http://BFY.tw/5C63

  • Need help... Re-install Vista Home Basic Edition, but Activation has declared that the license has already been used?

    Need help...

    My hard drive crashed,

    then re-install Vista Basic Edition,

    Complete the activation code (come when I bought my notebook)

    but activation said that my license has already been used

    and I have to purchase another license?

    How to solve this problem?

    Hello

    You receive an error message?

    I suggest you follow the step to contact the Microsoft support center and check.

    (a) click Start and in the search for box type: slui.exe 4

    (b) press ENTER on your keyboard

    (c) select your country.

    (d) take the phone activation option and brace yourself for a real person.

    How to activate Windows Vista

    http://support.Microsoft.com/kb/940315

  • Windows 7 64 bit worked very well and when was time to save I get the cyclic redundancy check, I try several times and made the same thing I need help please

    worked very well and when was time to save I get the cyclic redundancy check, I try several times and made the same thing I need help please

    Hello Hans,.

    Thanks for choosing Microsoft Community!

    According to the description of the problem, you have problems when you use the backup on Windows 8 feature.

    Please answer these questions to better understand the issue and help you:

    1. are - what you're talking to backup and restore functionality on Windows 7?

    2 have you made any changes to the computer before the show?

    It is perhaps to cause bad sectors on the hard drive, run the disk check to repair bad sectors

    Check your hard drive for errors:

    http://Windows.Microsoft.com/en-us/Windows7/check-your-hard-disk-for-errors

    Important: Running chkdsk on the drive if bad sectors are found on the disk hard when chkdsk attempts to repair this area if all available on which data can be lost.

    For more information:

    Backup and restore: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/back-up-and-restore-frequently-asked-questions

    Hope the helps of information. Don't answer if you need assistance, we will be happy to help you.

  • I don't see adobe now sketch in the Mac App store, previously I bought it on the App store, please help me in what I need this in a very urgent basis

    I don't see adobe now sketch in the Mac App store, previously I bought it on the App store, please help me in what I need this in a very urgent basis

    You should be able to see in your previous purchases.

    Adobe Photoshop sketch is currently on the App Store here: Adobe sketch.

    He just received an update in December.

  • Hello, need help for Adobe Reader DC playing animation files that are specified in the pdf output by script Latex Beamer. My Adobe Reader DC refuse to open any format that I gave him.  Thank you very much

    Hello, need help for Adobe Reader DC playing animation files that are specified in the pdf output by script Latex Beamer. My Adobe Reader DC refuse to open any format that I gave him.  Thank you very much

    Hey ihorl18351266,

    Please note that you can open PDF files using only the CD player. Any other format will not be supported by the software.

    Kind regards

    Ana Maria

  • Hello, I need help, I can't play the video using Facebook. Works very well in Youtube. I use Safari. Tried different solutions such as changing preferences, reinstalling Flash.

    Hello, I need help, I can't play the video using Facebook. Works very well in Youtube. I use Safari. Tried different solutions such as changing preferences, reinstalling Flash.

    Hello

    Please try following the steps and see if it helps

    1. Please work through this guide.

    https://helpx.Adobe.com/Flash-Player/KB/video-playback-issues.html

    Follow the instructions in the guide on the provision of the dxdiag report and additional information on what you tested and observed.

    2 turn off hardware acceleration in the settings. Steps are mentioned in the link below

    How to disable or enable hardware acceleration?

    Thank you

  • need help with something basic, rename pages, made in muse

    Hi all

    can someone help me with a basic task,

    I need to rename a page ivve Muse containing slide shows or forms,

    When I download via FTP on writing the page index.html of Web sites

    any suggestions on what I'm doing to rename Ive tried everything

    Thank you in anticipation

    Julie

    Hi Julie,.

    To rename a page in Muse name, please right-click on the page and access the properties of the page. "You can rename the name of the page of all pages, as well as the 'file name' of Muse, but you cannot change the ' file name ' Muse index page. Please refer to the following screenshot:

    If you choose to export the site in HTML format, you can then change it so but links of menu items will be broken and you must manually link all the elements menu outside the muse.

    I hope this helps.

    See you soon!

    Aish

  • I need help on a home page. Basic for you but not for me

    Hello

    I need help on a home page.

    I have this page called themainpage.cfm that someone here asked me to make the homepage of my CF pages.

    I have 2 pages now in the test server.

    Bloicpage.cfm
    And
    Index.cfm

    When you go to
    Server.myappfolders/repfolder


    It lets you go to

    Server.myappfolders/REP/Folder/ Bloicpage.cfm


    Page.

    I need for the themainpage.cfm to be the default when you type

    Server.myappfolders/repfolder


    Then have a link with the Bloicpage.cfm and a "back" button to return to the mainpage.cfm

    Thank you very much

    If you want themainpage to your page by default, you will need to re-name-the index.cfm. First give your current index.cfm as another name.

  • As a beginner, it's very basic, I imported my address book apparently ok, but I'm having a problem trying to address an e-mail to the address book in

    As a newbie it is very basic, I imported my address book apparently ok, but I'm having a problem trying to address an e-mail to the address book in the address field, I'm a right click, left click, but no list of addresses appearing or contact component which I should be able to see all the entries in my address book. What am I doing wrong please?

    Open a window of writing and press F9 to activate the touch pane.

  • cannot pair look on the phone was very good and makes everything I don't need help

    my Apple Watch re - will pair not to my iPhone 5 c was fine and just went off I tried everything I know manual I tried but only to give me 5 digits and he needs 6

    I've been trying since 08:00 this morning no chance need help, my watch is 7months old exploded b4 but matched ok.

    Hi, Dorothy

    When pairing manually, you need to tap your iPhone when it shows the name of the device (which includes a five-digit code) on your watch:

    Your watch then displays a six-digit code, you will then enter on your iPhone:

    More information:

    Set up your Apple Watch - Apple Support

Maybe you are looking for