postgresql equivalent to ms access parameter query
От | David P. Lurie |
---|---|
Тема | postgresql equivalent to ms access parameter query |
Дата | |
Msg-id | c3ouup$n9p$1@sea.gmane.org обсуждение исходный текст |
Ответы |
Re: postgresql equivalent to ms access parameter query
|
Список | pgsql-odbc |
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
В списке pgsql-odbc по дате отправления: