logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

postgresql equivalent to ms access parameter query: msg#00063

db.postgresql.odbc

Subject: postgresql equivalent to ms access parameter query

What is the postgresql equivalent to an ms access 2002 parameter query?

Postgresql functions written in SQL that return sets from select queries
seem closest.

Table stores has columns of storeid, name, address, etc.

A postgresql SQL procedure retrieves records based on a single column
parameter:

CREATE OR REPLACE FUNCTION public.state(varchar)
RETURNS SETOF stores AS
'
SELECT * from stores where stateorprovince = $1;
'
LANGUAGE 'sql' VOLATILE;

The following SQL statement runs as expected from psql or the pgAdminIII
query window:

SELECT storeid,storename from state('TN');

How is a parameter passed from access to postgresql in a pass-through query
calling a function?

A standard access query (non pass-through) to the postgresql table can
reference a text box control on a form:

SELECT public_stores.storeid, public_stores.storename,
public_stores.address, public_stores.city, public_stores.stateorprovince,
public_stores.postalcode
FROM public_stores
WHERE (((public_stores.stateorprovince)=[Forms]![Form1]![Text0]));

Thanks,

David P. Lurie






---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
message can get through to the mailing list cleanly



<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo