Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 isn't quite right:

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...