Connecting Tech Pros Worldwide Forums | Help | Site Map

How to create Function for executing query ....

Newbie
 
Join Date: Aug 2007
Posts: 3
#1: Aug 22 '07
Hi michaelb,
Hel me please.
1.I have table "Master" with fields : Id,description,HD8,Hd6,name.
How to create FUNCTION for executing query :
SELECT Id,description FROM Master ( only 2 fields)
2.Can I execute saved query(example : SeleMaster) in C# ?
Thank you very much

Moderator
 
Join Date: Nov 2006
Location: Boston, USA
Posts: 505
#2: Aug 30 '07

re: How to create Function for executing query ....


Hi, hlnet,
you need to look at the Postgresql manual. These links will show you how to write functions in SQL and plpgsql.

If you have problems and your code is not working as expected post it here and we'll help you.
Good luck!

SQL Functions
http://www.postgresql.org/docs/8.1/s...ment-tips.html
http://www.postgresql.org/docs/8.1/s...larations.html
http://www.postgresql.org/docs/8.1/s...pressions.html
Reply