Board index » cppbuilder » year field
2004-02-19 03:36:49 AM
I have a table that was built several years ago that has a field named
Year. Now that I'm starting to use queries, I have discovered that a
field named Year is a bad idea. I would like to add a new field to the
table named BYear using ALTER TABLE. Then with another query, copy the
data from the Year field to the BYear field. Then delete the Year field
using DROP. Here is the code I'm having problems with:
UPDATE 'BR1997' SET BYear = '1997'
WHERE Year = '1997';
How to get around the Year field?
There is another field that has the last two digits of the year in it
called Camp_num. For instance 01-97. I have tried the following code &
it doesn't work either:
UPDATE 'BR1997' SET BYear = '1997';
WHERE SUBSTRING(Camp_num FROM 4 FOR 2) = '97'";