Reply to Re: trouble porting a trivially simple function - with declared variables
Posted by --CELKO-- on 08/05/06 13:56
CREATE FUNCTION my_max_market_date ( ) RETURNS DATETIME
RETURN (SELECT MAX(h_market_date) FROM Holdings_Tmp);
Why waste space on a local variable? SQL Server's SELECT.. INTO syntax
is dialect and violates the Standards and the optional DECLARE..
[AS].. syntax is also dialect -- the SQL/PSM would not uses the [AS]
because it is for creating alias names, not allocating scalars.