[postgis-users] Except

Matt Doughty matt.doughty at geograma.com
Wed Nov 28 08:12:10 PST 2007


Thanks for the ideas. At the moment I'm trying to go with the 'array as text' suggested by George although I have to admit I haven't got very far yet.

Matt

PS: Sorry for sending a SQL question to the PostGIS list- shan't happen again (although I must say the members of this list have been particulary helpful!).



 
 
Matt Doughty
 
GEOGRAMA S.L.
Tel.:  +34 945 13 13 72    652 77 14 15
Fax: +34 945 23 03 40 
www.geograma.com
 
 
-----Mensaje original-----
De: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] En nombre de Kevin Neufeld
Enviado el: miércoles, 28 de noviembre de 2007 17:04
Para: PostGIS Users Discussion
Asunto: Re: [postgis-users] Except

Sorry, my bad... I misread your question. 

You might be able to write a plpgsql function that went looking at the 
system tables for a list of all your columns for a given table and then 
build a query using the columns of your choice.
-- Kevin

Kevin Neufeld wrote:
> How about,
>
> SELECT col1, col2, col3 FROM my_tbl
> EXCEPT
> (SELECT col1, col2, col3 FROM my_tbl LIMIT 1);
>
> -- Kevin
>
> Matt Doughty wrote:
>>
>> Hi,
>>
>> Is there a way of selecting all fields except one in particular? I'd 
>> like to create a query that says something like: select * except 
>> field01. The thing is the query needs to be valid for a number of 
>> different tables, each with a different set of fields apart from one 
>> (gid), which I don't want to select.
>>
>> Cheers,
>>
>> Matt
>>
>> Matt Doughty
>>
>>     
>>
>> GEOGRAMA S.L.
>>
>> Tel.: +34 945 13 13 72 652 77 14 15
>>
>> Fax: +34 945 23 03 40
>>
>> www.geograma.com
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>   
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list