Solved

AS/400 - STRSQL Select range of date

Posted on 2014-04-04
2
983 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now