Hi

I am new to oracle, was pretty much involved in developing in sql server. Can someone please help me in converting the below query to oracle.

Declare @lowyear int
Declare @highyear int
Declare @TotalRecords int

Set @highyear = @Year
Set @lowyear = 2001

while @highyear >= @lowyear begin
Set @Year = @highyear

Set @TotalRecords = (select count(*) from .....)

DECLARE @TempTable TABLE (YearID char(45), TotalCount char(30), test1 char(30), test2 char(30),
test3 char(30), test4 char(30), test5 char(30), test6 char(30), test7 char(30))

INSERT INTO @TempTable (YearID, ToalCount, test1, test2, test3, test4, test5, test6, test7)
Select @Year, @TotalRecords, convert(decimal(4,1),round(convert(decimal(15,5),(select count(*) ....) * 100) / convert(decimal(15,5),(@TotalRecords)),2)),
convert(decimal(4,1),round(convert(decimal(15,5),(select count(*) ....) * 100) / convert(decimal(15,5),(@TotalRecords)),2)),
convert(decimal(4,1),round(convert(decimal(15,5),(select count(*) ....) * 100) /
convert(decimal(15,5),(@TotalRecords)),2)),
convert(decimal(4,1),round(convert(decimal(15,5),(select COUNT(*) ....) * 100) /
convert(decimal(15,5),(@TotalRecords)),2)),
convert(decimal(4,1),round(convert(decimal(15,5),(select COUNT(*) ....) * 100) /
convert(decimal(15,5),(@TotalRecords)),2)),
convert(decimal(4,1),round(convert(decimal(15,5),(select COUNT(*) ....) * 100) /
convert(decimal(15,5),(@TotalRecords)),2)),
convert(decimal(4,1),round(convert(decimal(15,5),(select COUNT(*) ....) * 100) /
convert(decimal(15,5),(@TotalRecords)),2))

set @highyear = (@highyear - 1) end