Compile the creation of the error function, over and over again
I don't see anything wrong with this function. Everything I run with SQL Developer I get a compile error, I try to fix that and get five more who have no sense. All "inappropriate" generic syntax errorsThere is something terribly wrong with my function? I have re-written so several times, I think that I did nothing, but tried to slip in with the DB knowing, which is not me to get anywhere.
I shows the log of compiler errors, but as I said, he continues to change and add an error with any change to the function
Any ideas? At this point, I think Developer SQL (for Mac) is just smoked. I often force quit
CREATE OR REPLACE FUNCTION emp_status
(emp_first IN VARCHAR2,
emp_last IN VARCHAR2,
emp_num IN NUMBER,
staff_id IN NUMBER
staff_rank IN VARCHAR2)
RETURN VARCHAR2
IS
emp_information VARCHAR2(80) := emp_first || emp_last || ' has a rank of ' || staff_rank);
BEGIN
SELECT employees.e_first, employees.e_last, staff.e_id, staff.s_rank
INTO emp_first, emp_last, staff_id, staff_rank
FROM Employees, Staff
WHERE employees.e_id = staff_id;
RETURN emp_information;
END;
tables-- Create tables
CREATE TABLE EMPLOYEES
(e_id NUMBER(1),
e_first VARCHAR2(20),
e_last VARCHAR2(20));
CREATE TABLE STAFF
(s_id NUMBER(3),
e_id NUMBER(1),
s_phone VARCHAR2(10),
s_rank VARCHAR2(8));
-- Insert into tables
INSERT INTO EMPLOYEES VALUES
(1, 'Holly', 'Foster');
INSERT INTO EMPLOYEES VALUES
(2, 'Robert', 'Combs');
INSERT INTO EMPLOYEES VALUES
(3, 'Harvy', 'Lambert');
INSERT INTO EMPLOYEES VALUES
(4, 'Sarah', 'Miller');
INSERT INTO STAFF VALUES
(001, 1, '9992221234', 'ADMIN');
INSERT INTO STAFF VALUES
(023, 2, '9992226789', 'SEC');
INSERT INTO STAFF VALUES
(006, 3, '9992223456', 'TECH');
INSERT INTO STAFF VALUES
(011, 4, '9992223535', 'HR');
Your function does not much sense in my opinion.
You have these variables to input emp_ * and staff_ * that you concatenate in an emp_information of VARCHAR2.
Then you try to SELECT those variables based on the query in the function (which is not allowed by the way) entry.
You probably want something like this I guess:
CREATE OR REPLACE FUNCTION emp_status (staff_id IN NUMBER)
RETURN VARCHAR2
IS
emp_information VARCHAR2(80);
BEGIN
SELECT employees.e_first || employees.e_last || ' has rank of ' || staff.s_rank
INTO emp_information
FROM Employees
, Staff
WHERE STAFF.S_ID = staff_id
AND EMPLOYEES.E_ID = STAFF.E_ID;
RETURN emp_information;
END;
Your original code does not include a JOIN with the STAFF table I added.
However, in reality you do not have a function at all. you could just do the following:
CREATE VIEW EMP_INFORMATION_VW AS
SELECT staff.s_id
, employees.e_first || employees.e_last || ' has rank of ' || staff.s_rank AS emp_information
FROM Employees
, Staff
WHERE EMPLOYEES.E_ID = STAFF.S_ID;
Then, you could do:
SELECT EMP_INFORMATION FROM EMP_INFORMATION_VW WHERE S_ID = :STAFFID
HTH!
Tags: Database
Similar Questions
-
Windows Vista Service Pack 2 (KB948465) I get the error code 80092004 and it was not able to load.
Free unlimited installation and compatibility support is available for Windows Vista, but only for Service Pack 2 (SP2). This support, initially planned to end on November 26, 2009, has been extended until February 26, 2010. Availability of support chat or messaging differs depending on your location. Some questions may require that more support for which he is advanced a charge. Go to http://support.microsoft.com/oas/default.aspx?prid=13014&gprid=582034 & select appropriate category (i.e., download problem;) Installation problem; Problems after installing a service pack). ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft
-
Ideas: I'm trying to download the updates to my computer, but can't. I get the error code 646 and the download fails. I tried to download the update several times, but get the same answer. What is the problem?
- Pragrams you have problems with
- Error messages
- Recent changes to your computer
- What you have already tried to solve the problem
Remember - this is a public forum so never post private information such as numbers of mail or telephone!
Hello
Try this 1st to see if it helps, and it should:
Description of the Patch registration cleanup tool
http://support.Microsoft.com/kb/976220/------------------------------------------------------
If necessary :
Try this - Panel - Windows Updates - on every update that will not be installed - click on the important updates
or the update itself - double click a view more information (or click top then discovers on the right)Those who will take you to a page where you can download the update.
Or go here and the KBxxxxxx number to download it.
Download Center - mount the KBxxxxxx.
Microsoft Download Center
http://www.Microsoft.com/downloads/en/default.aspxDownload - SAVE - go to where you put them - click on - RUN AS ADMIN
Then you can right click on the update in the updates Windows and HIDE.
If you get an error Installer install this version:
Windows install 4.5 Redistributable
http://www.Microsoft.com/downloads/details.aspx?FamilyId=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en----------------------------------------------------
Then run this:
How to reset the Windows Update components? -a Mr Fixit
http://support.Microsoft.com/kb/971058Description of the system for Windows Vista, Windows Server 2008, update tool and
for Windows 7
http://support.Microsoft.com/kb/947821------------------------------------------------------------
Because these are all Office updates you might get more information if necessary in the Agency of those groups that
may have experienced the same problem.Office newsgroups
http://www.Microsoft.com/Office/Community/en-us/FlyoutOverview.mspxMicrosoft.public.office.misc discussions
http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Office.misc&cat=en_us_01cb749f-c998-4762-8099-df71793c11c7&lang=en&CR=us------------------------------------------------------------
If necessary you can incident free get reports however the above should take care of it for you.
Windows updates - free Incident report
Go here and click on-> Windows Update fails while searching, downloading or installation of updates
http://support.Microsoft.com/GP/wusupport#tab3The security updates, you can get free support Incident report
http://www.Microsoft.com/protect/resources/support.aspxI hope this helps.
Rob - bicycle - Mark Twain said it is good. -
Get the error message "send and receive reported an error (0x800CCC92): your e-mail server rejected your login. '. Check your username and password in your account properties.
I'm using Outlook 2002 on the XP Pro operating system.It lasts for almost a year, but I managed to work around the issue since it was started using a different outgoing SMTP user name and the password. (More settings, outgoing server tab, log in using...) Now it has stopped working.
There are four machines at this place and all suffer from the same problem. I use a LinkSys RVS4000 router. The previous Linksys router has also had the same problem so I replaced, thinking he can correct the problem, he didn't.
Troubleshooting:
a. I am able to recreate the account on another machine to a different place and it works.
b. I can take an account of my machine, create in this place and it will not work.
c. accounts deleted and created a new, did not
d. has replaced the router to the place with a new Linksys router
e. contacted support for ISP, (Time Warner), they accuse the hosting company
d. contacted support for hosting of the company (HostCentric) they blame the ISP
c. confirmed username and passwords are correct.
e. There are 4 machines in this place with different addresses. All started having this problem/error the same day within hours
f. may receive emails cannot be sent.http://expwinproblems.blogspot.com/2010/11/error-messages-in-Outlook-when-send-or.html
-
Error 8007006E on KB2289158 and KB2413381, also the error 80073712 KB968930 and KB2419640
I have updates that were not for a few months. I get an error 8007006E on KB2289158 and KB2413381. I also have the error 80073712 KB968930 and KB2419640. What can I do to fix this?
I use Vista Home Basic, SP2. 32-bit.
Hello
Please see the Sub articles that might help you.
Problems with installing updates
http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-installing-updates
How to reset the Windows Update components?
http://support.Microsoft.com/kb/971058You can also install the stand-alone package updates. You can download the stand-alone version of the link with the KB number below:
http://www.Microsoft.com/downloads -
Original title: can't access my BIOS, but blocked on select boot device
I have a laptop Toshiba Satellite Pro. I gave up some time ago and removed the HARD drive to see if has been affected by the decline, as that was my first thought. "When turned on the laptop back, the error message:" Reboot and select clean boot device or Insert Boot Media in selected boot device and press a key. My HARD drive is installed correctly, that am a qualified technician. The laptop goes directly to this error message, when turned on, so cnnot access to the BIOS. Help, please.
Hi Ryan,
Please contact Microsoft Community. I will surely help you this question.
To better understand the issue, let me know if you have tried pressing the F12 key or the key that is used to start the BIOS on the computer?
Method 1:
You may need to press the key (which is used to start-up the BIOS) as soon as you turn on your computer before Windows starts. See the article for more information.
Method 2:
If the problem persists, I suggest you to return the item and check if it helps.
What can I do if my laptop Windows 7 or Windows Vista does not start?
http://forums.Toshiba.com/T5/computer-troubleshooting/what-can-I-do-if-my-Windows-7-or-Windows-Vista-laptop-won-t/Ta-p/285717If the problem persists, I suggest you to contact the Toshiba Support for assistance.
http://support.Toshiba.com/support/home
Hope this information helps. Reply to the post with an up-to-date report of the issue so that we can help you further.
-
Hi, I am planning on buying a laptop and the need to have the programs installed in the laptop, I am able to use this account or I will have to go and buy the programs all over again
with one single-user subscription cc, you can install programs Office app and cc cc on an unlimited number of pc and mac computers.
(you can only sign on, at most, two computers at once, but even that isn't a drawback for a single user.)
-
I cannot install the suite Criative cloud reinstall every time, she told me that gave the error in installation and transferred me the site of re - download the creative cloud. Can you help me?
uninstall all cc (if nothing is installed) by using the adobe uninstaller programs.
clean through the use of the Adobe Creative Cloud cleaning tool to solve installation problems
Restart your computer, and then install, https://creative.adobe.com/products/creative-cloud
Use the desktop application to install your programs of cc.
-
Error message is "Adobe Illustrator CS5 15.0.2 updated there is a download of this update error." Quit and try again later. »
I tried to install this update for the month. any help will be greatly appreciated.
Thank you!
Try direct updates
-
Hello
I'm under Illustrator CS6 on a Mac version 10.10.3. I created an Illustration and I accidentally did very little to save and close the window. Now whenever I open the file I get the error "unable to open the illustration. There is not enough room for the window; increase the area of document and try again. "This problem is specific to this file only - I can open all other correct files, and anyone who tries to open that particular file on a completely separate machine receives the same error. I read all the posts of people having the same error message, but their problem is different from mine because my problem is specifically limited to this file. I've trashed preferences, hidden and shown the toolbar Application and an open framework of other files and makes them great as possible, has the file open on the file menu, instead of double clicking, and none of these methods work.
Can anyone help?
Thank you so much in advance!
Well, problem solved. For future users with this problem:
Open a new document in Illustrator
Press "F" to enter full screen mode
File > open to open the file problem
-
What are the causes videos stop and start again during the transmission?
What are the causes videos stop and start again during the transmission?
Hello
You can update the latest drivers for the video card and check.
Also perform the clean boot and check:
http://support.Microsoft.com/kb/310353
NOTE: When you are finished troubleshooting, make sure that restore you the computer mode normal startup such as suggested in the article above.
Let us know the results.
-
- When windows update (KB968930) power Shell2.0 and WinRm20 for win Vista tries to install the thugs of the computer then restarts and crashes again and again
Hello LisaQuaranto,
I suggest that you configure the computer to start in minimum mode, download the update from the Download Center and try to install the update.
To perform a clean boot on a computer that is running Windows Vista:
a. Click Start, type msconfig in the search box and press ENTER.
If you are prompted for an administrator password or a confirmation, type the password, or click on continue.
b. on the general tab, click Selective startup.
c. under Selective startup, clear the check box load startup items.
d. click OK.
e. When prompted, click on restart.
f. after the computer starts, check if the problem is resolved.
If your problem is resolved after the clean boot, and then follow the steps in the following article to narrow down the exact source:
http://support.Microsoft.com/kb/929135
In addition, refer to the section on how to restore your computer to a Normal startup mode by following the steps under "Reset the computer to start as usual", after performing the clean boot troubleshooting.
You can download the update following the link below:
http://support.Microsoft.com/kb/968930
Thank you
Irfan H, Engineer Support Microsoft Answers -
My apps to say that I am not connected to creative cloud, but I am. I tried to delete the opm.db file and connect again, no luck.
I had no problem with this problem until today when I rebooted my laptop to install a driver for the tablet.
Check your hosts file.
help for that and other adobe.com sure common connection problems read, http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
-
There is a problem with Adobe Acrobat/Reader. If this is the case, please exit and try again. (0:104)
I get this message when I try to open a PDF from a Web page link. When I open the task on the Applications tab Manager, I don't see that adobe Acrobat/Reader listed at all.
How can I solve this problem?
I can answer my own question.
After typing "patch" and read a few threads, I found out how to fix it.
-
Maybe it's a mistake on my part of basic mathematics, but I'm sure 9 less 2 is 7 and not-2.
Seriously, someone has come across an instance where the function of subtraction mess up like this (see screenshot)? I tried to replace the function of subtract several times, and it is impossible that the values are simply by changing so fast that I do not see the true values being passed to the function, because the values are the values of thread retention after that I stopped the program. If I leave a white VI and just put in the 9-2 it outputs 7, as they are supposed to, is not a problem with the machine.
I found ways around this problem of course. For example, if I replace the subtraction function with a composed arithmetic add function and put in a - 2 for the constant it works correctly. (Note: replace the simple add function and using a constant - 2 does not .) Also, if I convert the value of the variable (represented by #38 probe in the image) to a double representation, instead of the I32 either, that works too.
In any case, I'm just curious as to if I am the only one affected by this bug, or maybe someone knows why this bug occurs?
It is possible that you have found a bug in the behavior of the system of values keep. Since LV 2010 had some changes in the way the code is compiled, it is possible that it was introduced it there. If you have the means, try to run your VI in 2009 of LV and see if it has the same behavior with the values to keep power on and off.
If a person of NEITHER sees what wire and jump in, they can request a copy of your code that you could send their private for them to try and understand what is happening.
Maybe you are looking for
-
Help accomplish upright Fluctuation analysis (DFA)
Hello I am tryting to fulfill a DFA of time series chart. I have the EKG signal, where I got the RR intervals. For the DFA analysis, I have to do: Analysis of upright fluctuation method proved to be useful in revealing the magnitude of correlations a
-
I have 3 computer Aspire 5600U who noted starting with a USB 3 device plugged into the USB 3 port
He did not become a problem with constant updates of Microsoft for Windos 10 check daily all 3 computers to see if the device USB 3 must be disconnected before the reboot may end.
-
I was told recently by a supposed that computer NY windows support agency was slow
They have offered to remove all errors and all the files and the re - validate my windows (with supplement). This seems to have been a scam. Any ideas on a way forward?
-
animated images to a Web site on my computer
How to take a photo of a page on a Web site and move it to my laptop?
-
Hi, I deleted (mistakenly) office and tool bar icons in the HP Solution Center so I can not open screen Scan or Print Documents. What I have to reinstall all the software or is it possible to recover? Win XP up todate packs and patches.