Re: [SQL] [GENERAL] DataBase Problem

2009-12-30 Thread Joshua Tolley
On Wed, Dec 30, 2009 at 09:49:52AM +0800, Premila Devi wrote: >I am having problem as : > > > >Caused by: org.springframework.transaction.TransactionSystemException: >Could not roll back Hibernate transaction; nested exception is >org.hibernate.TransactionException: JDBC roll

Re: [SQL] PSQL statement to delete 100 rows meeting certain criteria

2009-12-30 Thread Chris Browne
shulkae writes: > I am newbie to postgres/SQL. > > I want to delete all rows exceeding 400 hours (10 days) and I want to > limit deletion of only 100 records at a time. > > I was trying the following in PostgreSQL: > > DELETE from mytable WHERE (now() - timestamp_field > INTERVAL '400 > hour' ) L