Why doesn't this work?use tempdbgoIF OBJECT_ID (N'dbo.fn_Alert') IS NOT NULL DROP FUNCTION dbo.fn_AlertGOCREATE FUNCTION dbo.fn_Alert(@alert_mask BIGINT)RETURNS TABLEAS RETURN(select @alert_mask as Mask)GOSELECT * FROM dbo.fn_alert(0x4); -- this produces the expected resultDECLARE @T TABLE(alert_mask BIGINT)INSERT INTO @T SELECT 0x4select fn.mask, T.alert_mask from dbo.fn_alert(T.alert_mask) as fncross join @T as T/* RESULT: Msg 4104, Level 16, State 1, Line 8The multi-part identifier "T.alert_mask" could not be bound.*/DROP FUNCTION dbo.fn_Alert
~ Shaun MerrillSeattle area