The forum will be unavailable for maintenance at some point from Friday, April 13 at 19:00 EDT until Sunday, April 15 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

I am using ultralitej database on android application and i need to delete rows with negative ID that exists in the same table with positive ID and same Code column. This sql executes without error in MSSql server but raises an error here: Syntax error near FROM at offset 10

DELETE r FROM Remote as r, Remote as r1 WHERE r.ID < 0 AND r.Code = r1.Code AND r1.ID > 0

Is there anything specific about delete with join in ultrealitej ? I tried with a subquery but got another error: Row has changed since last read -- operation canceled

EXISTS (SELECT * FROM Remote rReal WHERE  rReal.ID > 0 AND rReal.Code = Remote.Code)

asked 05 Dec '13, 06:56

katalun4o's gravatar image

accept rate: 85%

edited 05 Dec '13, 06:57

The subquery worked.. i cannot explain why that error appeard, but now is working

permanent link

answered 05 Dec '13, 08:20

katalun4o's gravatar image

accept rate: 85%

Can't tell why the EXISTS subquery does not work as expected, however, the "DELETE with a table-list syntax" seems unsupported by UltraLite.

That's easily noticable if you compare the DELETE syntax for SQL Anywhere (confine synax 2 which does allow a table-list, just like MS SQL) and for UltraLite.

permanent link

answered 05 Dec '13, 07:12

Volker%20Barth's gravatar image

Volker Barth
accept rate: 32%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 05 Dec '13, 06:56

question was seen: 988 times

last updated: 05 Dec '13, 09:02