[EMAIL PROTECTED] wrote:

> I am having trouble using locks within a SELECT query. I'd 
> like to use the
> SQL standard "FOR UPDATE", since I am actually porting a 
> system from Oracle
> to SapDB.
> When I make even a simple query like:
> 
> SELECT * FROM Table FOR UPDATE
> 
> I get the following error message:
> 
> Missing keyword:OF
> 
> [OF is the optional keyword for specifying the columns to 
> lock. Since I
> want to lock all the columns, I shouldn't use OF.]
> 
> The question is: can use "FOR UPDATE" in a SELECT query by 
> itself? If not,
> what would it be the most similar solution?


Usually 'FOR UPDATE' is fine, even with SAP DB.

BUT
If you are using ODBC or a tool using ODBC (like SQLStudio, for example)
then OF is mandatory, according to ODBC-standard.

The semantic of FOR UPDATE, FOR UPDATE OF and FOR UPDATE OF <columnlist>
is the same.

Elke
SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to