Here's a piece of code that runs well from QA but when placed in a SP it errors out with "Syntax error converting datetime from character string" Any idea why?
create table #test (appt_time varchar(255),
dtAppt_time datetime null)
insert into #test(appt_time)
values ('2:20 AM')
update #test
set dtAppt_time = convert(datetime,appt_time)
create table #test (appt_time varchar(255),
dtAppt_time datetime null)
insert into #test(appt_time)
values ('2:20 AM')
update #test
set dtAppt_time = convert(datetime,appt_time)