sql server - Access to any element of a table -


i have built table in stored procedure :

declare @storetable table ( path varchar(1000) not null, nbdays int, offset int )  insert @storetable select path, number, offset  filename f left outer join ... 

let's table have 4 rows, this:

path1 | 3 | 1 path2 | 9 | -1 path3 | 2 | 3 path4 | 5 | 0 

i know how can have access element table.

for instance, use value -1 of offset on row 2, in order include @ end of path2 (and modify path2)

any clue?

instead of variable create temp table. this:

create table [dbo].[#storetable] ( [path] varchar(1000) not null,     [nbdays] int,     [offset] int ) on [primary] 

then can select or joins/updates regular tables. temp table deleted when exist sp. hope helps you


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -