Click here to Skip to main content
15,887,302 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
insert with this data field is happen but when i m tried update with this following query error
in update syntax why this is happend????
update tbl_assigntask set time='12:00:00 PM' where id=38
Posted
Updated 28-Mar-14 20:15pm
v2
Comments
Siva Hyderabad 29-Mar-14 1:51am    
update tbl_assigntask set [time]='12:00:00 PM' where id=38

time should be datatype varchar(50) or not?
Member 9599723 29-Mar-14 1:53am    
text
Siva Hyderabad 29-Mar-14 1:55am    
if you're using SQL Server 2005 use varchar(MAX). Text datatype is deprecated and should not be used for new development work.
Member 9599723 29-Mar-14 1:57am    
i m using MS ACCESS

add brakets to time, i.e.
[time]

Reason: time is a reserved word in Access, so should avoid using it as field name, refer access-help-reserved-words[^]
 
Share this answer
 
v3
Comments
Maciej Los 29-Mar-14 16:13pm    
+5!
Peter Leow 29-Mar-14 21:50pm    
Thanks Maciej.
As Date, Time, User etc are the reserved words of your system. You can't straight away use them. So you can use them using [...].

Therefore, your query should be looked like,
SQL
update tbl_assigntask set [time]='12:00:00 PM' where id=38 


-KR
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900