Hi,
I am serious new to the world of Sql Server so apologize that maybe my question is on newbie level. I am trying to execute following in Sql Server Managment Studio.
declare @item int
declare @name varchar(10)
set @item = 21
while @item <= 23
begin
set @name = cast(@item as varchar(10))
UPDATE [CosmosVenture].[dbo].[CV_Hotel]
SET [CV_HotelPhoto] = 'images/hotel/' + @name + '/main/' + @name + '.jpg’
WHERE [AH_HotelID] = @item
set @item = @item + 1
end
Thanks Andy
And the error I get is following...
Msg 105, Level 15, State 1, Line 8
Unclosed quotation mark after the character string '.jpg’
WHERE [AH_HotelID] = @item
set @item = @item + 1
end
'.
Msg 102, Level 15, State 1, Line 8
Incorrect syntax near '.jpg’
WHERE [AH_HotelID] = @item
set @item = @item + 1
end
'.