DLookup('field', 'table', ['condition'])

From: Herbert Ambos <herbert(at)hindang(dot)msuiit(dot)edu(dot)ph>
To: pgsql-sql(at)postgresql(dot)org
Subject: DLookup('field', 'table', ['condition'])
Date: 2001-02-27 12:20:01
Message-ID: Pine.LNX.4.21.0102271158210.9300-100000@hindang.msuiit.edu.ph
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 without the
WHERE keyword

If the query returns multiple rows then it will only get the
topmost column.
If the query 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message postgresql 2001-02-27 12:43:11 underscore problem
Previous Message Stephan Szabo 2001-02-27 04:27:37 Re: DLookup('field', 'table', ['condition'])