Re: [GENERAL] Calcuate percentage.

1999-03-09 Thread Sze Yuen Wong
select count(*) into t2 from stations; FATAL 1: btree: failed to add item to the right sibling Any clue? ---Marcin Grondecki wrote: > > select count (*) into t1 from t; > select count(varl), varl into t2 from t group by varl; > select varl, (t2.count*100/t1.count) from t2, t1; > > and,

Re: [GENERAL] Calcuate percentage.

1999-03-09 Thread Sze Yuen Wong
f each number there is... > > I think the only way is to get the max and manually loop thru the rows and > calc the percentage. > > -----Original Message- > From: Sze Yuen Wong <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > Date: Tue

Re: [GENERAL] Calcuate percentage.

1999-03-09 Thread Sze Yuen Wong
==>language ==>to do it? > > -----Original Message- > From: Sze Yuen Wong <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > Date: Tuesday, March 09, 1999 9:48 AM > Subject: [GENERAL] Calcuate percentage. > > > >Hi, > > &

[GENERAL] pgsql crash when selecting a view

1999-03-09 Thread Sze Yuen Wong
Hi, Here's what I did to make it crash: CRATE VIEW tmpView AS SELECT count(*) FROM myTable; SELECT * FROM tmpView; - crash. Every single time. Anyone knows why and how to make it work? Thanks. Sze Wong _ DO YOU YAHOO!? Get your fr

[GENERAL] Calcuate percentage.

1999-03-09 Thread Sze Yuen Wong
Hi, I need to calcuate the percentage from my table: var1 -- 1 1 1 2 2 3 Desire result: var1 | percentage 1 |50% 2 |33% 3 |17% === Any clue? Please help. Sze Wong ___

[GENERAL] Callable Statement in JDBC

1999-01-08 Thread Sze Yuen Wong
Hi, I'm using Postgre in my Java program. The Java bean (JCDatasource from KL group) require callable statement when saving to the DB. But Postgre report Callable statement is not supported. Anybody knows if 6.4 support callable statement? Or anyother ways to work around? Thank you very much.