Re: Update with select

2008-05-02 Thread Rob Wultsch
> -Original Message- > From: Albert E. Whale [mailto:[EMAIL PROTECTED] > Sent: Friday, May 02, 2008 4:06 PM > To: mysql@lists.mysql.com > Subject: Update with select > > I am trying to update a field on a record in a table. Here is the > statement I create

RE: Update with select

2008-05-02 Thread Rolando Edwards
@lists.mysql.com Subject: Update with select I am trying to update a field on a record in a table. Here is the statement I created: UPDATE pdata SET pvalue = ( SELECT pvalue FROM pdata WHERE pentrytime =1207022400 ) WHERE pentrytime =117540; However, I get the following error: |#1093 - You can&#

Update with select

2008-05-02 Thread Albert E. Whale
I am trying to update a field on a record in a table. Here is the statement I created: UPDATE pdata SET pvalue = ( SELECT pvalue FROM pdata WHERE pentrytime =1207022400 ) WHERE pentrytime =117540; However, I get the following error: |#1093 - You can't specify target table 'pdata' for upda

Re: How to update with select a spatial value ?

2005-06-12 Thread Jigal van Hemert
From: "Pete Lancashire" > update fooloc set location = geomfromtext('point(lat lon)'); I have no experience with spatial tables, but from the manual I conclude that either of these should do the job: UPDATE `fooloc` SET `location` = GeoFromWKB(point(`lat`, `lon`)); or UPDATE `fooloc`

SQL: How to update with select a spatial value ?

2005-06-11 Thread Pete Lancashire
I have an existing MyISAM table that I want to add a spatial column to. It originally had two integer columns, lat and lon, and I've added a new column "location point NOT NULL default ''" Example data: select lat, lon, astext(location) from fooloc; +--+--+--+ | lat