473,320 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

solve the query for me please

Hi,

A Student begins a new job with an annual salary of $ 35,500 for his first year of employment, a guarantee of a 4 % salary increase each for his second, third and fourth year and a guarantee of a 5.5 % increase for his fifth and sixth year. Write a program that will display Student’s salary for the first six years of this employment


how can I write this query using for loop.
please try for me.

Thanks
Dec 10 '06 #1
1 1212
pragatiswain
96 Expert
Hi,

A Student begins a new job with an annual salary of $ 35,500 for his first year of employment, a guarantee of a 4 % salary increase each for his second, third and fourth year and a guarantee of a 5.5 % increase for his fifth and sixth year. Write a program that will display Student’s salary for the first six years of this employment


how can I write this query using for loop.
please try for me.

Thanks
Try this:

declare
iBaseSal number(10,2);
iYr number(2);
begin
iBaseSal:=35500;
iYr:= 1;

For iYr= 1..6
loop
if (iYr > 1 and iYr <= 4) then
iBaseSal:= iBaseSal * 1.04;
if (iYr > 4) then
iBaseSal:= iBaseSal * 1.055;
dbms_output.putline('For Year:' || iYr || '-->' ||'Salary' || iBaseSal);
end loop
end

Hope this helps
Dec 13 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: BVM | last post by:
Hi, All: I have this error. It seems execution time is too long. Actually the execution time is about 30 seconds(I tested in Query analyzer). How do I solve this problem? ...
8
by: vj | last post by:
Hi all, I want to solve the two equations u*tan(u)=w and u^2 + w^2=V^2, where V is a known constant, and u and w are the two unknowns to be determined. Please can someone suggest me how to...
1
by: arun | last post by:
Query is too complex -------------------------------------------------------------------------------- Hi, I was trying to solve this problem since last two days but couldn't find any solution. ...
2
by: Deven Oza | last post by:
Hi every one can anybody solve this problem for me. What initial values of a and c are required such that the final values of a and b are: a = 32 b = 4 …
12
by: ashokingroups | last post by:
Hi, Good morning to all, :-) One interviewer asked me the following question He has given the following two tables including data. DEPT TABLE ------------------- DEPT(DEPTNO, DNAME, LOC)...
5
by: annCooper | last post by:
Exchange Rates Source file: Exchange.cs Input file: Exchange.in Output file: Exchange.out Using money to pay for goods and services usually makes life easier, but sometimes people prefer to...
2
by: gsreenathreddy | last post by:
Hi! Please solve this query in employee table in scott user i would like view the details of all the employees (empno, ename )who are working under which manager(mgr) .with his manager name...
6
by: fido19 | last post by:
Once upon a time, there lived a chimpanzee called Luycha Bandor (aka Playboy Chimp). Luycha was unhappily married to Bunty Mona, a short but cute little lady chimp. Luycha was tall and handsome –...
0
by: xwebmaster | last post by:
Hi Please help me solving this query.. I have 3 tables.. comm_propDB ID | User_ID | mls_num -----|---------------|--------------------- 2 | 2 | 5004 3 | 2 ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.