-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: HQL query, current_timestamp()
PostPosted: Wed Apr 02, 2008 9:21 am 
Newbie

Joined: Wed Apr 02, 2008 9:01 am
Posts: 4
Hello,
I'm executing this HQL query:
Code:
update phone_in_stock
set state=1
where state=2 and dateSellingStarted<current_timestamp()-day(5)


The following error occurs : Data truncation: Truncated incorrect datetime value: '5'
I don't see where is the problem in the request.
With the following "delete" query :
Code:
delete from phone_in_stock
where state=0 and dateSellingStarted<current_timestamp()-day(5)

No error occurs, but data is not erased.

Have you got an idea of the problem ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 03, 2008 8:36 am 
Newbie

Joined: Wed Apr 02, 2008 9:01 am
Posts: 4
Do you think it is a bug, should I post it in JIRA ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.