Hi

I am attempting to update a table column that is to be determined by a 
linestring being above, below or to the right of an intersection.

update pipe
    set 
    case when st_centroid(bob.edge_data.geom) >> num_search.the_geom9
        where bob.edge_data.edge_id <> pipe.edge
        and pipe.id =10
        then branch_right_id =
        
        when st_centroid(bob.edge_data.geom) |>> num_search.the_geom9
        bob.edge_data.edge_id <> pipe.edge
        and pipe.id =10
        then branch_up_id =
        
        when st_centroid(bob.edge_data.geom) <<| num_search.the_geom9
        bob.edge_data.edge_id <> pipe.edge
        and pipe.id =10
        then branch_down_id =
        
        end    
    (select bob.edge_data.edge_id
        from bob.edge_data, num_search, pipe            
        where st_intersects(bob.edge_data.geom, num_search.the_geom9))  
--intersection of max edge collected in pipe table    
    where pipe.id = 10; 

Following is the error-
ERROR:  syntax error at or near "case"
LINE 3:  case when st_centroid(bob.edge_data.geom) >> num_search.the...

Can this be done?

Bob

_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to