Re: [GENERAL] HELP with a query with blank fields

2008-06-01 Thread Stephan Szabo
On Tue, 27 May 2008, J. Manuel Velasco wrote: > Hello, > > This is the current query I have: > > SELECT dominis.nom, dominis.extensio, dominis.creat, dominis.expira, > titulars.first_name, titulars.last_name, contactes_admin_tec.first_name, > contactes_admin_tec.last_name, dns1.nom, dns2.nom, dom

[GENERAL] HELP with a query with blank fields

2008-06-01 Thread J. Manuel Velasco
Hello, This is the current query I have: SELECT dominis.nom, dominis.extensio, dominis.creat, dominis.expira, titulars.first_name, titulars.last_name, contactes_admin_tec.first_name, contactes_admin_tec.last_name, dns1.nom, dns2.nom, dominis.redirec, contactes_fac.nom, grups.nom FROM dominis, con

Re: [GENERAL] help with a query

2006-11-05 Thread redhog
If you do not want to amend your table with extra information, this is how you do it: Suppose you have a table create table events ( time timestamp, object int refers objects(id), -- The thing that had its ignition turned on or off at this time ignition boolean, comment varchar ); You can th

Re: [GENERAL] help with a query

2006-11-05 Thread Andreas Kretschmer
Pedro Doria Meunier <[EMAIL PROTECTED]> schrieb: > > Hi all! > > This is most certainly a lame question but perhaps someone is gracious enough > to lend me a hand& ;-) > > I have the following setup in a table: > > The first record which is to be found (ok easy enough :D) with a timestamp >

[GENERAL] help with a query

2006-11-04 Thread Pedro Doria Meunier
Hi all!   This is most certainly a lame question but perhaps someone is gracious enough to lend me a hand… ;-)   I have the following setup in a table:   The first record which is to be found (ok easy enough :D) with a timestamp meets a certain condition (ignition off) The following

Re: [GENERAL] Help with a query

2004-02-27 Thread Bas Scheffers
Klint, > select groname from pg_group > where (select usesyside from pg_shadow where usename = 'postgres') = > any(grolist); Unless you are lgged in as superuser (and applications other than pgAdmin et al shouldn't be) you will get access denied on pg_shadow. (because it contains passwords) Select

Re: [GENERAL] Help with a query

2004-02-27 Thread Bas Scheffers
If the user/groups you are talking about are postgres users and groups, this is it: select * from pg_catalog.pg_group where (select usesysid from pg_catalog.pg_user where usename = 'user') = any(grolist) The place to find this kind of thing is the Postgres Internals section (system catalogs) that

Re: [GENERAL] Help with a query

2004-02-26 Thread Klint Gore
On Thu, 26 Feb 2004 16:47:10 -0500, Alexander Cohen <[EMAIL PROTECTED]> wrote: > Im trying to get a list of all groups that a certain user is a member > of. Can anyone help me with the sql to get that? select groname >from pg_group where (select usesyside from pg_shadow where usename = 'postgres'

Re: [GENERAL] HELP with a Query

2004-02-21 Thread Martijn van Oosterhout
On Sat, Feb 21, 2004 at 05:20:51PM +0900, Alex wrote: > Hi, > I need some help with a query. > I use a reference table to lookup some codes. Everything works well if the > reference table contains a reference but the query fails if no reference > fails (Z.ref_code=123456). What I need to is eithe

[GENERAL] HELP with a Query

2004-02-21 Thread Alex
Hi, I need some help with a query. I use a reference table to lookup some codes. Everything works well if the reference table contains a reference but the query fails if no reference fails (Z.ref_code=123456). What I need to is either return 0 or null into Z.prim_exch if no reference can be found.