Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

update smalldatetime column

$
0
0

hi everyone,

i have this list of dates and  i need to update the dates to a tables' smalldatetime column

i tried updating in various ways such as:

begin tran update dw_fact_emrg_visits set release_date = cast('2012-10-03 23:59:00' as smalldatetime) where visit_id = 0160601196758;

begin tran update dw_fact_emrg_visits set release_date = convert(smalldatetime,'2012-10-03 23:59:00') where visit_id = 0160601196758;

anyway, nothing works. i keep getting this messages about error converting from string to numeric etc'

i tried inserting the dates (it's just a few) to a temp table and then update from that table but still recieved error.

ther must be a correct way to update a smalldatetime column

TIA


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>