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

Retrieving data by using live parameters....

I have table name time_data in that it holds (docid,docdate,usertype,fromdate,todate,userid ) columns date format is 'dd/mm/yyyy' now i want to retrieve the data by giving the run time parameters month and year ...'JUN' and '2013' .....
for suppose if i give month jan and year 2013 in that jan month it what date i have entered ..has to come ...total sum of users
Jun 21 '13 #1
2 1626
rski
700 Expert 512MB
not sure if I understand you want to count number of records for given month and year?
Jun 21 '13 #2
Expand|Select|Wrap|Line Numbers
  1. select count(*)
  2. from time_data 
  3. where to_char(fromdate,'Mon')='&Mon' and to_char(fromdate,'YYYY')='&Year'
&Mon and &Year will allow u runtime parameter
like this
Enter value for mon: Mar
Enter value for year: 2013

Hope this query helps u
Oct 3 '13 #3

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

Similar topics

2
by: Ryan | last post by:
We have an MIS system which has approx 100 reports. Each of these reports can take up to several minutes to run due to the complexity of the queries (hundreds of lines each in most cases). Each...
1
by: ST Choong | last post by:
this.oleDbCommand1.CommandText = "SELECT Description, , Bit FROM IO WHERE (Type = \'@Type\' AND Module = \'@Module\')"; this.oleDbCommand1.Connection = this.oleDbConnection1; ...
5
by: aniket_sp | last post by:
i am using a data adapter and a dataset for filling and retrieving data into .mdb database. following is the code..... for the form load event Dim dc(0) As DataColumn Try If...
0
by: Andy | last post by:
Hi All. I'm working for a company that has set out a guideline for retrieving data from a database. Nobody can explain to me the reason for the following. When retrieving a set of records...
3
by: Jakob Petersen | last post by:
Hi, I need to increase the speed when retrieving data from a hosted SQL Server into VBA. I'm using simple SELECT statements. How important is the speed of my Internet connection? (I have...
0
by: Newbie19 | last post by:
I am currently design a program that uses a SQL Select statement to pull data from a database. Recently I was informed I need to also pull data from a files on a remote hard drive as well. Two...
4
by: smartin | last post by:
Hi, I'm having problem retrieving data from an SQL stored procedure. I tried debugging but it wont give a the reason for the error. it just throws an exception after executing cmd.ExecuteNonQuery...
3
ADezii
by: ADezii | last post by:
Last Tip, we demonstrated the technique for retrieving data from a DAO Recordset, and placing it into a 2-dimensional Array using the GetRows() Method. This week, we will cover the same exact Method...
2
by: Prasad | last post by:
Hi, I am creating a stored procedure which contains an output parameter. Though the procedure is getting compiled properly I am not able to execute it from within SQL Server Management Studio and...
0
by: Selun | last post by:
Hi all, First of all im not sure if this is the correct section to ask this. Im using C# .NET I m trying to populate a gridview using datareader with the following code protected void...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.