Reply to Re: Stored Procedure

Your name:

Reply:


Posted by Dan Guzman on 03/07/06 14:48

Try:

UPDATE MyTable
SET ImagePath = '\Images\' + ImagePath

This can be encapsulated in a stored procedure if needed:

CREATE PROC dbo.UpdateImagePath
@ImagePathPrefix varchar(255)
AS
UPDATE MyTable
SET ImagePath = @ImagePathPrefix + ImagePath
GO

EXEC dbo.UpdateImagePath '\Images\'

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Shwetabh" <shwetabhgoel@gmail.com> wrote in message
news:1141734360.018259.125170@i40g2000cwc.googlegroups.com...
> Hi,
>
> I want to change the data in a few fields of a table.
> There are many records (about 1k+). All I want to do to
> these fields is to append a string to the starting of data in the
> fields.
> eg:
>
> Old Data ->
>
> ---------------------------
> Image
> ---------------------------
> A1.jpg
> A2.jpg
>
>
>
> Required data ->
>
>
> -----------------------------
> Image
> ----------------------------
> \Images\A1.jpg
> \Images\A2.jpg
>
>
>
>
>
> For this purpose, should I use a procedure or is there any other
> possible way out?
>
> Awaiting your replies,
> Regards
> Shwetabh
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация