Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function To Test For Table Doesn't Work
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01328338
Message ID:
01328366
Vues:
10
>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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform