Solved

AS/400 - STRSQL Select range of date

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS SQL with ODBC 5 36
Oracle - Query link database loop 8 38
SSIS with VPN COnnection 2 74
Can > be used for a Text field 6 42
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
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.​
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
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

770 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