hi,
i'm using SQL 2005 and have the following tables
table a
( Number int, [Value] varchar(500) )
table b
( Number int, [Sequence] tinyint, [Value] varchar(50) )
data for table b
Number [Sequence] [Value]
10 1 123456
10 2 Somestring
10 3 789
25 1 Value2
25 2 12345
etc...
data for table a
Number [Value]
10 NULL
25 NULL
etc...
i need to update the data in table a with cumulative value from table b based on number order by field Sequence
so the table a will looks like
Number [Value]
10 123456Somestring789
25 Value212345
right now i am using a while with a counter to update that table.
in my opinion, this method is work better than using cursor. am i right ?
is there any other eficient way to do that ?
pls give me some advice about this.
thx..