combine 2 columns into 1

flynn

Well-known member
Joined
Jul 28, 2005
Messages
58
I have 2 columns that I need to combine into 1. Both columns are datetime. colDate has the date and colTime has the time. I would like to create a new column called FullDateTime that would hold the concatenation of these 2 columns.

This is what I have so far, but it isnt quite right:
Code:
Alter Table activity Add FullDateTime datetime;
insert into [activity] ([FullDateTime]) values (select (colDate + colTime) from activity)
alter table activity drop column colDate
alter table activity drop column colTime

Can someone point me in the right direction?

tia,
flynn
 
Finally figured it out:


Code:
update  activity set FullDateTime = colDate + colTime
 
Back
Top