GPSFileDepot.com
 

News:

Welcome to GPSFileDepot!

Main Menu

PostGreSQL tutorial

Started by Seldom, January 22, 2012, 05:40:26 PM

Previous topic - Next topic

Seldom

UPDATE area SET mp_type = '0x46' WHERE WHERE (fcode = 46000 or fcode = 46006) and areasqkm >= 15;
UPDATE area SET mp_type = '0x47' WHERE WHERE (fcode = 46000 or fcode = 46006) and areasqkm >= 10 and areasqkm < 15;
UPDATE area SET mp_type = '0x48' WHERE WHERE (fcode = 46000 or fcode = 46006) and areasqkm >= 2 and areasqkm < 10;


This query segment is lifted from the Hydrography tutorial.  Are the two "WHERE"s a typo, or do you need them when you have the "or" statement in parentheses next to an "and"?

-Oz-

That is a typo.  Two wheres will not work.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

-Oz-

#2
Fixed.  Thanks
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

Seldom