Hello
I am a junior programmer and new member of this forum
I want to ask a question
I have these two columns in sql 2000 server
trx_date char(8)
trx_time char(6)
And now, I imported this database to sql 2008
and want to copy those two columns' record to a new column call
trx_datetime (datetime)
Please guide me , thanks
2
Contributors
2
Replies
2 Hours
Discussion Span
2 Years Ago
Last Updated
3
Views
Related Article:SQL function problem
is a solved MS SQL discussion thread by y2kshane that has 2 replies, was last updated 1 year ago and has been tagged with the keywords: function, sql.
INSERT INTO ABC(datetime, sn)
SELECT
convert(datetime,
RTRIM(LTRIM(trx_date))+' '+
SUBSTRING(trx_time,1,2) + ':' +
SUBSTRING(trx_time,3,2) + ':' +
SUBSTRING(trx_time,5,2), 120),
sn
FROM orders WHERE sn = '123456789';