Solved

AS/400 - STRSQL Select range of date

Posted on 2014-04-04
2
1,004 Views
Last Modified: 2014-04-04
Hi and thanks,

I would like to select a range of dates from Current date back 15 months with in a SQL Statement...

Please help and thanks
0
Comment
Question by:Amour22015
2 Comments
 
LVL 18

Accepted Solution

by:
daveslash earned 250 total points
ID: 39978575
select stuff
  from MyTable
 where someDate > current date - 15 months

Open in new window


HTH,
DaveSlash
0
 

Author Closing Comment

by:Amour22015
ID: 39978868
Thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question