Insert with subquery fails with ERROR 1110 (42000): Column 'REQ_DESC' specified twice

2004-01-05 Thread Arun Natarajan
Hello all I have a requirements table structured as (req_id, version_id, req_desc, comments). When a requirement comments is changed by the user, my application increases the version_id for the requirement and saves it as a new record. Sample records: 1,1,'Description 1', 'comments 1'; After upda

Oracle nvl function equivalent.

2004-01-04 Thread Arun Natarajan
Hello All, Is there an equivalent to the nvl() function of Oracle available in MySql. I am currently using version 4.1 alpha and am trying to execute the following query: >>Select count(nvl(col1,1)) as col1 from table1 group by col1; Also, I tried to create a user defined function as below, but it