C'est quoi le problème dans cette requette?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 DECLARE @sql NVARCHAR(MAX) DECLARE @Path VARCHAR(MAX) DECLARE @Code NVARCHAR(MAX) DECLARE @max int SET @Path = 'C:/Users//HP/Pictures/fotos/' SET @Code = '1' SET @max = 7 WHILE @Code < @max BEGIN SET @sql = ' UPDATE [BDD_Loc].[dbo].[employe] SET Photo = (SELECT * FROM Openrowset ( Bulk '+@Path+@Code+'.jpg'''' , Single_Blob) as image ) WHERE Matricule = @code ' SET @code = convert(int,@Code)+1 EXEC sp_executesql @sql END
l'erreur qui s'affiche:
Msg*102, Niveau*15, État*1, Ligne*4
Syntaxe incorrecte vers 'C:'.
Partager