Hi
I am updating a table and I am not sure update it based on a condition. I am using Sybase 11.92
I want to update from table1 to table2. Table1 has a field called term, it is either a Y or N. Table1 also has a term_date field. Table2 has two date fields, term1 and term2. I want to update term1 or term 2 on table2 with term_date from table1 based on whether term is a Y or N.
if term = Y
update term1 with term_date
end if
if term = N
update term2 with term_date
end if
I can't for the life of me figure out how to do this. Can anyone help?
Thanks,
Mark
I am updating a table and I am not sure update it based on a condition. I am using Sybase 11.92
I want to update from table1 to table2. Table1 has a field called term, it is either a Y or N. Table1 also has a term_date field. Table2 has two date fields, term1 and term2. I want to update term1 or term 2 on table2 with term_date from table1 based on whether term is a Y or N.
if term = Y
update term1 with term_date
end if
if term = N
update term2 with term_date
end if
I can't for the life of me figure out how to do this. Can anyone help?
Thanks,
Mark