pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Good <tomg@admin.nrnet.org>
To: Andreas Joseph Krogh <andreak@officenet.no>
Cc: pgsql-sql@postgresql.org
Subject: Re: Referencing named attribute in where clause doesn't work with 7.1.2?
Date: Wed, 8 Aug 2001 09:14:19 -0400 (EDT)
Message-ID: <Pine.LNX.4.05.10108080912580.16138-100000@admin.nrnet.org> (raw)
In-Reply-To: <3B713729.62D20CCB@officenet.no>

On Wed, 8 Aug 2001, Andreas Joseph Krogh wrote:

> Hi, this is my first post to this list so please...
> I have problems getting this query to work, any ideas?
> 
> select article.title_text_key,
> (select on_text.text_value from on_text where
> 	on_text.text_key = title_text_key
> 	AND NOT title_text_key is NULL
> 	AND on_text.lang_id = (select code.id from code, code_group where
> 	     code.code_group_id = code_group.id
> 	      AND code_group.description = 'lang' AND code.code_key = 'lang.NO'
> 	      )
> 	)
> as title_text_value from article where NOT title_text_value is NULL;
> 
> ERROR:  Attribute 'title_text_value' not found

Hallo Andreas,

Relocating your AS clause to the topmost string?  BTW, table aliasing
would make for less typing.

Best of luck!

> Issuing the same query without the where-clause does work tho, but
> return tupples with null in them which I don't want.
> 
> --
> Andreas Joseph Krogh <andreak@officenet.no>
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 


--------------------------------------------------------------------
               SVCMC - Center for Behavioral Health                  
--------------------------------------------------------------------
Thomas Good                          tomg@ { admin | q8 } .nrnet.org
Programmer/Analyst                              Phone:  718-354-5528 
Residential Services                            Mobile: 917-282-7359  
--------------------------------------------------------------------
/*           Die Wahrheit Ist Irgendwo Da Draussen...             */
--------------------------------------------------------------------




view thread (7+ messages)  latest in thread

Message-ID: <Pine.LNX.4.05.10108080912580.16138-100000@admin.nrnet.org>
Permalink:  ../Pine.LNX.4.05.10108080912580.16138-100000@admin.nrnet.org/
Also on:    postgresql.org/message-id/Pine.LNX.4.05.10108080912580.16138-100000@admin.nrnet.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tomg@admin.nrnet.org, andreak@officenet.no
  Subject: Re: Referencing named attribute in where clause doesn't work with 7.1.2?
  In-Reply-To: <Pine.LNX.4.05.10108080912580.16138-100000@admin.nrnet.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox