Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IF variable contains string
Message
De
13/06/2008 17:20:43
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
IF variable contains string
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01324006
Message ID:
01324006
Vues:
115
This is part of script. I want to only run the code if the @Filename contains the string ".doc" but I'm getting an error on the syntax.
Msg 102, Level 15, State 1, Line 133
Incorrect syntax near '@Filename'.

			IF  CONTAINS(@Filename, '.doc')
				Set @CONVERTSCRIPT = 'c:\Tiff\RTFConverter.exe "' + @DocumentID + '|c:\ImpactMD\Export\' + @DocumentID + '.rtf"'
				Print 'Convert Script - ' + @CONVERTSCRIPT
				exec master.dbo.xp_cmdshell @CONVERTSCRIPT, no_output
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform