>Thanks for your help. Yeah.. I am using SQL 2000 only. But I have a problem in using Table variable. Actually I don't know how to use table variable? So please give me an example of using table variable (If possible). I really appreciate your help.
The code below demonstrates how you can use table variable.
DECLARE @t1 TABLE (
keyfield int, dummy varchar(100))
INSERT INTO @t1 VALUES (1, 'Some text')
INSERT INTO @t1 VALUES (2, 'Some other text')
INSERT INTO @t1 VALUES (3, 'Some other text')
UPDATE @t1 SET dummy = 'Text for ID 3'
WHERE keyfield = 3
SELECT * FROM @t1
See 'table data type' in BOL for details.
--sb--