Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function To Test For Table Doesn't Work
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01328338
Message ID:
01328366
Views:
9
>How do you pass the parameter to Object_ID when the table name is being passed in?
>
CREATE FUNCTION dbo.fnTableExists
	(@sTableName VARCHAR(50))

RETURNS TinyInt
AS

BEGIN

	RETURN CASE WHEN object_id(@sTableName) IS NOT NULL THEN 1 ELSE 1 END

END
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform