473,395 Members | 1,401 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,395 software developers and data experts.

help with querying dates

I have a query where I can extract data for a ceratin month using this statement

select trunc(last_day(add_months(sysdate,-25))+1) from dual
select trunc(last_day(add_months(sysdate,-25+1)))+1 from dual

Is there a function where you can do the select for a day?
Nov 13 '06 #1
2 1233
Can you tell what exactly u need for days.
Do u want to get the day after some number of days like add_months will add the given number of months to the passed date. If that is what u need then just use "+" operator. select (sysdate + 25) from dual. will give the day after 25 days from today.

Thanks,
Nov 14 '06 #2
Can you tell what exactly u need for days.
Do u want to get the day after some number of days like add_months will add the given number of months to the passed date. If that is what u need then just use "+" operator. select (sysdate + 25) from dual. will give the day after 25 days from today.

Thanks,
I would like that date too also I have a date field in the table where the max date is 26/10/2006 and the min date is 22/02/2000. I have over 1.5 million records which need to be purged so I need to loop the query several time to process all the dates. Hope this helps?
Nov 15 '06 #3

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

Similar topics

2
by: Ian DeRock | last post by:
I'm fairly new to XML. As I can see it, XML is a way to organize data like in a table in a RDB, or the RDB itself. I have used XML in application data, but did not design the actual XML. I...
7
by: ndn_24_7 | last post by:
Hello all, I'm trying to run a query to make a report. My database is a incident reporting database. I'm tryng to make a monthy report for incidents. The field I need to query in the date field...
2
by: toedipper | last post by:
Hello, MYsql and PHP If I want to extract data with todays date then it's 'where blab blah = current_date()' For yesterday it's 'where blah blah = current_date()-1' But can anyone tell...
4
by: Stewart Allen | last post by:
I'm trying to filter a table that has 2 date fields, the first date will always have a value but the second will only occasionally has a value. Each date field also has a corresponding text field...
8
by: Lyn | last post by:
I am trying to get my head around the concept of default, special or empty values that appear in Access VBA, depending on data type. The Access Help is not much (help), and the manual that I have...
4
by: Darryn Ross | last post by:
Hi, i am trying to run a simple SQL statement from my C# app to return a number of records, however when i do my record count is always zero, but i know there are transactions in there... My...
4
by: Steve Chow | last post by:
I was wondering if someone could help with my assignment. I've pretty done finished the work but cannot figure out why it only prints the last one added. Here is my code. The way things are done...
4
by: dmeiser | last post by:
Hello all: I need to query a table for events that happen on third shift ( 11 PM to 7 AM ) in a date range. In the past, I've only needed to query for one night, but I now need to query for 14...
4
by: minapatel | last post by:
Probably a simple solution but can't find it myself can someone help????? I would like to extract data from a table where the dates are between two dates and then loop to select more data for...
6
by: sephent | last post by:
I'm pretty new to SQL and querying, and I'm not sure if this is the correct group to post this to, but hopefully someone can point me in the right direction. I have the following query: ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.