Solved

AS/400 - STRSQL Select range of date

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

948 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

23 Experts available now in Live!

Get 1:1 Help Now