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
  • 594
  • 1
  • 5
  • 21

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,574
  • 17
  • 72
  • 116
2

you can try using rownum

SELECT team FROM assigned WHERE parent_id=investigations.id and rownum =1 
Ian Kenney
  • 5,661
  • 1
  • 21
  • 39
  • 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