Re: [SQL] URGENT: Using function inside query

2005-01-18 Thread Michael Fuhr
On Tue, Jan 18, 2005 at 02:51:01PM -0600, Bradley Miller wrote: > select account_id from roll_account(1186) where hierarchy_type_id = 2 > > The problem is I have data like this: > > account idname > > 1Company A > 2Company B > 3Company C > 4Person 1 (in Company A

Re: [SQL] mail + rfc822, rfc2822 + schema

2005-01-18 Thread Ron Peterson
On Tue, Jan 18, 2005 at 05:05:55PM +0200, Achilleus Mantzios wrote: > i am thinking of doing a remote MUA web-based system, based on > postgresql. > ... > So, i'd like to know if any of you has designed a schema serving as an > mail storage. If anything of caution arrose to you, and if you had >

[SQL] URGENT: Using function inside query

2005-01-18 Thread Bradley Miller
I need some help on the following problem. I have an account info table that has a hierarchy of accounts. The grouping goes from end user to organization to reseller. I have a PL/SQL function written that gives me the tree, so I just whittle it down by selecting the one id for a reseller: selec

[SQL] postgres stored procedures

2005-01-18 Thread Joel Fradkin
Any advice on converting my mssql to postgres? Points of reference would be great! All 290 tables moved over ok, some data loss, and I will look at that much closer next time I run my conversion app. Now Views and Stored procedures. Joel Fradkin   Wazagua, LLC 2520 Trailmate Dr Sarasota, Florida

Re: [SQL] Returning a bool on DELETE in a proc.

2005-01-18 Thread Michael Fuhr
On Tue, Jan 18, 2005 at 05:04:58PM +0100, KÖPFERL Robert wrote: > I'm currently writing a function which encapsulates a delete and should > return a bool as indicator for success. How do you define success? When the delete affects one or more rows? > DELETE FROM "TariffDetails" WHERE "Tari

Re: [SQL] Returning a bool on DELETE in a proc.

2005-01-18 Thread Keith Worthington
> Hi, > > I'm currently writing a function which encapsulates a delete and should > return a bool as indicator for success. > > I tried: > > DELETE FROM "TariffDetails" WHERE "TariffId"=$1 and "BNumberPrefix"=$2; > SELECT TRUE; > > but this makes me not happy. > How can I distingruish

[SQL] Returning a bool on DELETE in a proc.

2005-01-18 Thread KÖPFERL Robert
Hi, I'm currently writing a function which encapsulates a delete and should return a bool as indicator for success. I tried: DELETE FROM "TariffDetails" WHERE "TariffId"=$1 and "BNumberPrefix"=$2; SELECT TRUE; but this makes me not happy. How can I distingruish wehter DELETE affected

Re: [SQL] query configuration for validate empty quote to zero

2005-01-18 Thread KÖPFERL Robert
Did you try to explicitly give the type for the literal? e.g.  ''::varchar     -Original Message-From: Yudie [mailto:[EMAIL PROTECTED]Sent: Montag, 17. Jänner 2005 19:44To: pgsql-sql@postgresql.orgSubject: [SQL] query configuration for validate empty quote to zero We just changed

[SQL] mail + rfc822, rfc2822 + schema

2005-01-18 Thread Achilleus Mantzios
Hi, i am thinking of doing a remote MUA web-based system, based on postgresql. The idea is to let uucp/sendmail do the job of transporting the smtp mail to the remote site, and then using an mbox parser at the site (i have already done that in java), to offload (remotely) the mail messages to t