I'm not sure what it would be called, but could this be done?
Just as how I could do an INSERT by using a SELECT statement, such as:
insert into tableA(the_id, the_date)
select tableB.the_id as [the_id], '2006-01-01' as [the_date]
from tableB left outer join tableB_other
on tableB.the_id = tableB_other.the_id
where tableB_other.the_id is null
I'd like to do an UPDATE by using a SELECT statement. So maybe something like this
update tableA set the_date=B where the_id=C
select the_id as [C] from tableA where the_date is null
Could this be done? How would this be done? What would the syntax be?
Thanks in advance for any suggestions.
Just as how I could do an INSERT by using a SELECT statement, such as:
insert into tableA(the_id, the_date)
select tableB.the_id as [the_id], '2006-01-01' as [the_date]
from tableB left outer join tableB_other
on tableB.the_id = tableB_other.the_id
where tableB_other.the_id is null
I'd like to do an UPDATE by using a SELECT statement. So maybe something like this
update tableA set the_date=B where the_id=C
select the_id as [C] from tableA where the_date is null
Could this be done? How would this be done? What would the syntax be?
Thanks in advance for any suggestions.