• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SQL update position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SQL update position


  • Subject: Re: SQL update position
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 9 Mar 2007 09:56:42 -0800


On Mar 8, 2007, at 8:33 PM, Ian Joyner wrote:

I have just found that the statement:

UPDATE <table> SET POSITION = <value>

gives the error:

SQL ERROR - [position 13, near '' in 'ATE MEMBER SET POSITION ='] update error: SET expected but not found.

The following works:

UPDATE <table> SET OTHER_FIELD = >value>, POSITION = <value>

Seems that POSITION is a reserved word in SQL-92 but not 99 or 2003 (according to a table on the Web http://developer.mimer.com/ validator/sql-reserved-words.tml).

Above its reservedness depends on context it seems, and since WO generates the fields in the order it sees fit, I can't guarantee that POSITION won't come after SET.

Is WO using the SQL-92 standard? I'm using OpenBase so for those SQL gurus out there (now come on you know who you are), should this be reported as a bug to OpenBase? Or is OpenBase working correctly according to the standard?

WO (EOF to be more accurate) does not use any standard. It was designed to be agnostic as far as the backing store is concerned. The SQL is generated by EOF's JDBCAdaptor in co-operation with the EOF plugin for a specific database.


The bug is an OpenBase one: the plugin should be quoting column names. This is the correct thing to do when using reserved words as column names (well, that and avoiding them). This should work:

UPDATE <table> SET "POSITION" = <value>

Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >SQL update position (From: Ian Joyner <email@hidden>)

  • Prev by Date: Re: Making a WO Project dependent on a WO Framework Project
  • Next by Date: DBUnit in Eclipse config question
  • Previous by thread: SQL update position
  • Next by thread: Xcode + WO book
  • Index(es):
    • Date
    • Thread