Sep 4, 2000 #1 NEL3644 Technical User Sep 4, 2000 26 US What's the query statement that will always display records from previous 3 months. Will anyone please help me?
What's the query statement that will always display records from previous 3 months. Will anyone please help me?
Sep 4, 2000 #2 NeoTurtle Programmer Aug 25, 2000 38 US Sort months in descending order and set MAXROWS to 3 months in your query . . . that's if you have months as a field in your database. hope this helps, -NeoTurtle Upvote 0 Downvote
Sort months in descending order and set MAXROWS to 3 months in your query . . . that's if you have months as a field in your database. hope this helps, -NeoTurtle
Sep 5, 2000 #3 perichazhi Programmer Jul 17, 2000 25 IN First of all your database table should have a date field which captures the date of transaction. If your database is SQL Server use the query below select * from tablename where datefield > dateadd(mm,-3,getdate()) if oracle then use select * from tablename where datefield > sysdate-30 Upvote 0 Downvote
First of all your database table should have a date field which captures the date of transaction. If your database is SQL Server use the query below select * from tablename where datefield > dateadd(mm,-3,getdate()) if oracle then use select * from tablename where datefield > sysdate-30