DLookup('field', 'table', ['condition']) - Mailing list pgsql-sql

From Herbert Ambos
Subject DLookup('field', 'table', ['condition'])
Date
Msg-id Pine.LNX.4.21.0102271158210.9300-100000@hindang.msuiit.edu.ph
Whole thread Raw
In response to Re: Urgent help  (Jie Liang <jliang@ipinc.com>)
Responses Re: DLookup('field', 'table', ['condition'])  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-sql
Hi,

I'm trying to create Domain Aggregate function that mimic Access' Dlookup
function, but without any luck, after digging (i think) all the docs
don't have the solution yet.

Syntax:
DLookup ('field', 'table|view', ['condition'])
where:field --               column name or calculation       table|view --condition (optional) -- SQL WHERE condition
withoutthe                 WHERE keywordIf the query returns multiple rows then it will only get thetopmost column.If
thequery retuns 0 rows then NULL would be returned
 


An example argument to the function would be
DLookup ('id', 'student', 'name=\'Bill Gates\'') --> '2001-432'


For now, I use some workaround for this, and it would be easier for me if
this function is present.


Hope u guys can help ;).  Thank u in advance



Herbert

--

MSU - Iligan Institute of Technology
Iligan City, Philippines



pgsql-sql by date:

Previous
From: Jie Liang
Date:
Subject: Re: Urgent help
Next
From: Stephan Szabo
Date:
Subject: Re: DLookup('field', 'table', ['condition'])