Question:
oracle pl/sql function, i have this segment of pl/sql statement, how can i execute this pl/sql function?
chin
2010-11-05 22:56:40 UTC
it is like this:-

CREATE OR REPLACE FUNCTION


DECLARE



BEGIN

-- execution
SELECT skills_price, StartDate, FinishDate, No_hrs
FROM Skills, Daily_Work, Contract;

SELECT SUM(skills_price*No_hrs) as SALARY
FROM Skills, Daily_Work, Contract
WHERE (StartDate IS NOT NULL AND FinishDate IS NOT NULL);


-- exception
IF (v_salary = StartDate IS NOT NULL && v_salary = FinishDate IS NOT NULL)
-- display salary calculate
ELSE -- display salary not counted due to unfinish job performed
raise;

END;
/


any hints on this as i want to calculate the salary of the contractor and the exception, what exception should i write so that it can display salary and display errors when salary is not display ??

pls guide me and feel free to comment to improve this script

thanks...
Five answers:
?
2010-11-07 08:48:18 UTC
Visit the following link for user friendly SQL training material:

http://www.technofunc.com/forum/erp-process-specific-discussions/technical/sql-plsql
anonymous
2014-05-22 08:58:25 UTC
Oracle PLSQL TRAINING in GREENS TECHNOLOGY,CHENNAI

Learn Oracle PL SQL from the Best Oracle PLSQL Training center in Chennai with the most experienced trainer in the field. Greens Technology Adyar provides Oracle SQL, PLSQL, Performance Tuning training in Chennai to professionals and corporates on advanced SQL, PL SQL with XML, Oracle PLSQL Training includes Analytic SQL for Data Warehousing on both Classroom Trainings and Online Trainings



Request for Demo Class and Enroll the course pay.



Contact @ 8939915577



http://www.plsqltraining.in/index.html

http://www.plsqltraining.in/contact-greens-technologys.html
pruitte
2016-12-15 15:41:25 UTC
A set off is directly invoked whilst a undeniable situation occurs - many times an insert/delete against a table or replace against a table or a particular column of that table. considering the fact that those ensue directly, care might desire to be taken that an endless cascade of triggers would not take place (set off A on table A replace reasons insert to table B. table B has an insert set off that does an replace to table A which starts off the cycle another time.) On distinctive row updates/inserts/deletes, the set off might nicely be centred to fire on each row or purely as quickly as, and the two until eventually now, after or instead of the substitute in question. tactics and purposes are very comparable in that the two can carry out distinctive steps and return a value. the main substantial distinction is that a technique can return a row or maybe distinctive rows instead of purely a scalar cost and can desire to be invoked (the two via yet another technique or via a script), at the same time as a function might nicely be embedded with sq. code (as area of the opt for values or as standards interior a the place clause)
breedenjr
2016-12-04 11:23:51 UTC
A set off is immediately invoked while a particular difficulty happens - often an insert/delete against a table or replace against a table or a particular column of that table. because of the fact those take place immediately, care must be taken that an countless cascade of triggers does not ensue (set off A on table A replace motives insert to table B. table B has an insert set off that does an replace to table A which starts the cycle throughout back.) On dissimilar row updates/inserts/deletes, the set off may be exact to hearth on each row or only as quickly as, and the two in the previous, after or rather of the exchange in question. tactics and purposes are very comparable in that the two can carry out dissimilar steps and return a value. the main important distinction is that a technique can return a row or maybe dissimilar rows rather of only a scalar cost and must be invoked (the two by skill of yet another technique or by skill of a script), collectively as a function may be embedded with sq. code (as section of the decide on values or as standards interior a the place clause)
TheMadProfessor
2010-11-08 10:57:11 UTC
There seems to be a lot of info missing here: how are tables Skills, Daily_Work and Contract related? Do you want a tablewide summation of salary or should it be grouped somehow? Do you print the exception all the time or only if no completed contracts exist?


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...