🙂
i have a table the Includ any row.
Names Rows my Table is:
ID_ImgPhoto(PK),IDPhoto(FK),Title,Small,Larg,AddedDate,AddedIp,Status.
i want read at the DataReader in asp.net and change string the String.replace() many Values Small And Larg row in my table.
i want Insert Multiple Rows to table after select and change The Same Values rows.
i want select many row With a Condition.
My select Code Is:
ALTER Procedure [dbo].[sp_Tbl_ImagePhotoGraphy_SelectRow]
@IDPhoto int
As
Begin
Select
[ID_ImgPhoto],
[IDPhoto],
[Title],
[Small],
[Larg],
[AddedDate],
[AddedIp],
[Status]
From Tbl_ImagePhotoGraphy
Where
[IDPhoto] = @IDPhoto
End
i Want changed value many rows after the give Value @IDPhoto And select Many Row my table and FOR EXAMPLE :
/*OLD DATA*/
ID_ImgPhoto IDPhoto Small Larg
1 1 OLD/1S.jpg OLD/1L.jpg
2 1 OLD/2S.jpg OLD/2L.jpg
3 1 OLD/3S.jpg OLD/3L.jpg
4 2 Oldsmall/1S.jpg OldLarg/1L.jpg
5 2 Oldsmall/1S.jpg OldLarg/1L.jpg
5 2 Oldsmall/1S.jpg OldLarg/1L.jpg
5 2 Oldsmall/1S.jpg OldLarg/1L.jpg
____________________________________________________________________
/*NEW DATA Afetr Select And Chnage Rows Value*/
ID_ImgPhoto IDPhoto Small Larg
1 1 NEW/1S.jpg NEW/1L.jpg
2 1 NEW/2S.jpg NEW/2L.jpg
3 1 NEW/3S.jpg NEW/3L.jpg
4 2 Oldsmall-2/1S.jpg OldLarg-2/1L.jpg
5 2 Oldsmall-2/1S.jpg OldLarg-2/1L.jpg
5 2 Oldsmall-2/1S.jpg OldLarg-2/1L.jpg
5 2 Oldsmall-2/1S.jpg OldLarg-2/1L.jpg
I FIND THIS Sulotion.:)
UPDATE yourtable set small=replace(small,’OLD/’,’NEW/’),larg=replace(larg,’OLD/’,’NEW/’)