473,324 Members | 2,356 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,324 software developers and data experts.

find total row

Expand|Select|Wrap|Line Numbers
  1. create or replace function fun_getnoofrows(p_empcode number,p1_date varchar2,p2_date varchar2) return number as
  2.   v_cnt number ;
  3.  
  4.   i number:=0;
  5.   days number:=0;
  6.   begin
  7.   select  count(1)into v_cnt 
  8.   from inouttime 
  9.   where empcode=p_empcode and 
  10.   to_date(attnddate,'DD-MM-YYYY') 
  11.         between to_date(p1_date,'DD-MM-YYYY') and 
  12.         to_date(p2_date,'DD-MM-YYYY');
  13.  
  14.  
  15.     while i=30 
  16.     loop
  17.     IF v_cnt>0 then
  18.     days :=days+1;
  19.     end if;
  20.  
  21.     i:=i+1;
  22.  
  23.  
  24.  
  25.     end loop;
  26. return days;
  27.   end;
  28.  
  29.  
hey this is my function now this is not return value and i want to return total number of v_cnt row
Jan 1 '13 #1
1 1890
zmbd
5,501 Expert Mod 4TB
Bytes is not a code writing nor homework service. Please read the FAQ and posting guidlines before posting your question.

This appears to be a homework question and as such may be deleted.

By, simply stating that your code "doesn't work," and expecting someone to help doesn't usually result in much of an answer and may result in your thread being deleted.
Instead, please tell us what you were expecting to happen, what actually happened, for each error: the EXACT title, error number, and descriptions that occurred and at what line in your posted code the error occurred. These are the minimum requirements for posting a question of this nature.
Jan 1 '13 #2

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

Similar topics

2
by: msnews | last post by:
Hi All, We have a requirement to display total number of current users using the site. We want to display only the total no other information. And this value needs to change dynamically. Is it...
2
by: sudhir1508 | last post by:
i have i grid view. which we have bind unbounded column. in that column i have a column that i want total in footer. plz any one help me
1
by: meryline | last post by:
hi, iam new to c#, can any one tell me how to find the total number characters entered in a textbox. like in vb.net i find it using len(textbox.text) . iam trying to implement the same in c# sharp...
4
by: drago | last post by:
Hi guys, I will be quick this time... Just want to know how we can calculate generic values in the same column. I am using invoice form with a services subform . I have a column of 'total' in subform...
4
by: cmrhema | last post by:
hello I am using a gridview to display records. I have set page index for the grid. I have populated the gridview. After every 10 records I will move to the next page. All these works fine. ...
1
by: gravikrishna | last post by:
hello sir pls tell me the code of my question how do u find total text of a html page in .net
9
by: john20 | last post by:
Hi All, How can i find the total 'Count' of a particular character's occurance in a string. means i want to find the count of '<' in a string. can you please help to find that. Thanks
1
by: visweswaran28 | last post by:
I created one crystal report in that i print time for each user. finally i want to calculate total time. so wat should i do to calculate total time. i tried with sum method......
2
by: karimufeed | last post by:
I am working on an access project for pension calculation. I want to find total length of service between two dates. i.e. if the Date of entry into service is 15/3/1980 and the date of retirement...
3
by: Gurunath Dhage | last post by:
Need help on access database design and queries Hi All, I’m working on a small project for loan Financial service company. I’m developing a Schedule Entry System . It has a Leasee who takes the...
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...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.