What i wrong with this stored procedure? -
01-02-2005
, 11:20 PM
CREATE PROCEDURE ConvertDate();
BEGIN
DECLARE :a integer;
set :a = 74513;
SELECT TIMESTAMPADD( SQL_TSI_DAY, :a, CONVERT('1800-12-28 00:00:00',
SQL_TIMESTAMP));
END
I'm trying to convert a clarion serial date(which is a serial number
based on Dec 28, 1800). This serial date is in a Integer column. Right
now I'm just trying to get the procedure to work with hardcoded data.
The number 74513 is Nov 17, 2003. When I execute the query : CALL
Convertdate() I get the error "Invalid Argument". What am I doing
wrong?
TIA
Carlos San Miguel |