Login    Register

XLeratorDB/util Online Documentation

ViewExists


wct.ViewExists
 
Updated: 30 October 2008
Use wct.ViewExists to determine if the specified view exists in the database.
Syntax
SELECT [westclintech].[wct].[ViewExists](
   <@Schema, nvarchar(4000),>
   <@ViewName, nvarchar(4000),>)
 
Arguments
@Schema
is the name of schema containing the view to test for. @Schema is an expression of the character string data type category. 
@ViewName
is the name of view being tested for on the database. @ViewName is an expression of the character string data type category. 
 
Return Types
bit
Remarks
·         ViewExists simplifies SQL intended to drop a view if it exists.
Example
 
IF (wct.ViewExists('wct','myView') <> 0) DROP TABLE wct.myView
Here is the result set

----------------------

Command(s) completed successfully



  Comments
Add Comment
No Comments Yet


 |  View Topic History  |
Copyright 2010 WestClinTech LLC         Privacy Policy        Terms of Service