SQL Calculations Questions

1

SQL dynamic date calc.
How shall the WHERE clause look for this challenge: Pseudocode: select all records from file where datefield (ccyymmdd 8.0) shall be greater than todays month minus 36 months. As you can see this may be expressed as [em]rolling 36 full months plusĀ current month[/em]. Any help will be apreciated. Dan

Answer Question   |  September 7, 2009  4:45 PM
IBM 9407 M15, SQL, SQL Calculations, SQL Dynamic Date Calculation
asked by:
2,540 pts.

SQL divisions
Hi All, I’m trying to make a calculation through SQL code but this is resulting in a 0. Example: declare @activities as integer declare @days as integer declare @media as float –my queries that extracts data and sets values to @days, @activities; in this case they return @activities=51 and @days=199 set @media = @activities/@days select [...]

Answer Question   |  January 28, 2009  3:43 PM
SQL, SQL Calculations
9,695 pts.

1