Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.
create table #Tmp
insert into #Tmp select '14/02/2011',0
insert into #Tmp select '14:02:2011',0
insert into #Tmp select '14:02/2011',0
insert into #Tmp select '14/02:2011',0
declare @DateValue nvarchar(20)
while ((select count(*) from #tmp where validDate=0)<>0)
select top 1 @DateValue= datevalue from #Tmp where validDate=0
update #Tmp set validDate=1 where datevalue = @DateValue and convert(datetime,datevalue,103) = convert(datetime,@DateValue,103)
--select convert(datetime,date) from #Tmp
update #Tmp set validDate=2 where datevalue = @DateValue
select * from #Tmp where validDate= 2 --Error occured
drop table #Tmp
Open in new window
Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.
Join & Ask a Question
Join our community for more solutions or to ask questions.
For immediate help use Live now!