Hi,
I have a table with the following columns:
Table1:
PersonID, [1], [2], [3],][4] , [5] and so on .
The TABLE FIELD NAMES are actual numbers (not letters) representing the days of a month.
I'mm writing a stored procedure to populate this table with UPDATE Statement (NOT INSERT statements as the PersonID is already in the table)
is there any way for me to access the column as a array ?
For example:
UPDATE Table1 Set column[4] = 'hello' where PersonID = 1
I tried this:
declare @index varchar(2)
set @index = '3' (column with the name '3')
UPDATE Table1 Set @index = 'hello' where PersonID = 1
but it doesn't work.
Thanks,
Hang
I have a table with the following columns:
Table1:
PersonID, [1], [2], [3],][4] , [5] and so on .
The TABLE FIELD NAMES are actual numbers (not letters) representing the days of a month.
I'mm writing a stored procedure to populate this table with UPDATE Statement (NOT INSERT statements as the PersonID is already in the table)
is there any way for me to access the column as a array ?
For example:
UPDATE Table1 Set column[4] = 'hello' where PersonID = 1
I tried this:
declare @index varchar(2)
set @index = '3' (column with the name '3')
UPDATE Table1 Set @index = 'hello' where PersonID = 1
but it doesn't work.
Thanks,
Hang