Hi,

> SELECT DATE_ADD(NOW(),tbl_name.interval) AS date
> FROM tbl_name;

As you know, the syntax is:
  DATE_ADD(date,INTERVAL expr type)

The  'expr'  can  be  a  column,  but  I  don't think either
'INERVAL'  or 'type' support columns - they are not strings.
So, IMHO, this is the closest you can get:

  SELECT DATE_ADD(NOW(), INTERVAL tbl_name.interval MONTH) AS date
  FROM tbl_name;

where  tbl_name.interval  = '1'. It shouldn't be too hard to
convert  all  intervals  to  months (or whatever you want to
use)... Hope it helps.



Take care,
Aleksandar


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to