0

I am moving from Postgres to Oracle and I am getting the ORA-00907 error for the following statement:

UPDATE investigations SET 

team=(SELECT team FROM assigned WHERE parent_id=investigations.id LIMIT 1);

Please help with my Oracle syntax.

Thanks in advance!

Jason
  • 754
  • 3
  • 8
  • 22

2 Answers2

2

As far as I know oracle doesn't have LIMIT clause. Take a look at this topic

Community
  • 1
  • 1
maks
  • 5,911
  • 17
  • 79
  • 123
2

you can try using rownum

SELECT team FROM assigned WHERE parent_id=investigations.id and rownum =1 
Ian Kenney
  • 6,376
  • 1
  • 25
  • 44
  • Good point - but as there was no order by in the original query, it should be pretty similar behaviour in this case – Ian Kenney Jun 30 '13 at 21:01