Dear All,I have problem to calculation
balance from debet and credit.my transaction table:
id |
trx_timestamptz |
account | trx_type_id |
amount++--+-+-
3 | 2005-04-14 17:16:49+08 | 01.2010100.2
There is an easy way to do this; write a plpgsql set returning
function which adds the balance to the last column of the table. That
query will always have a cost in both time and memory proportional to
the size of the table, and the memory cost may bite you as table size
grows...
--
Can you give
There is an easy way to do this; write a plpgsql set returning
function which adds the balance to the last column of the table. That
query will always have a cost in both time and memory proportional to
the size of the table, and the memory cost may bite you as table size
grows...
--
Can you give
Dear All,I have problem to calculation
balance from debet and credit.my transaction table:
id |
trx_timestamptz |
account | trx_type_id |
amount++--+-+-
3 | 2005-04-14 17:16:49+08 | 01.2010100.2
|
-02-12 2004-02-13 2004-02-14 2004-02-15 2004-02-16 2004-02-17 2004-02-18 2004-02-19 2004-02-20 2004-02-21 2004-02-22 2004-02-23 2004-02-24 2004-02-25 2004-02-26 2004-02-27 2004-02-28 2004-02-29
- Original Message -
From:
Franco Bruno Borghesi
To: Muhyiddin A.M Hayat
Cc
Dear All,
How to create Calendar Function or Query. I would
like to display date form -mm-dd to -mm-dd or display date in one
Month
e.g:
date 2005-01-01 2005-01-02 2005-01-03 2005-01-04 2005-01-05 2005-01-06 2005-01-07 2005-01-08 2005-01-09 2005-01-10 2005-01-11
Dear All,
How to create Calendar using Function/View.
For example i would like to display date 2004-12-01
to 2004-12-20.
date
--
2004-12-01
2004-12-02
2004-12-03
2004-12-04
2004-12-05
..
..
2004-12-20
Stark" <[EMAIL PROTECTED]>
To: "Muhyiddin A.M Hayat" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, October 20, 2004 2:35 PM
Subject: Re: [SQL] Cross tabulations
> "Muhyiddin A.M Hayat" <[EMAIL PROTECTED]> writes:
>
> &g
Dear all,I need to do something similar to
a cross tabulation, but without anyaggregation.I have below
table id | employee_id | state
|
check_time+-+---+ 21
| 1 |
In | 2004-10-12 21:37:13 22
| 1 | Break Out |
Dear All,
I Have below table
id | site_name | point+---+--- 1 | Site
A | 40 2 | Site
B | 90 3 | Site
D | 22 4 | Site
X | 98
Would like to calc that Rank for each site, and look like
id | site_name | point |
rank+---+---
Dear All,
I Have below table
id | site_name | point+---+--- 1 | Site
A | 40 2 | Site
B | 90 3 | Site
D | 22 4 | Site
X | 98
Would like to calc that Rank for each site, and look like
id | site_name | point |
rank+---+-
> > trx_date | trx_time | descriptions|
> > payment_method | debet | credit | creator
> > +--+--+
> >- ---+---+--+-
> > 2003-10-09 | 21:55:02 | Resto Biling : 13,800, Paid : 10,00
> Something like this:
>
> select id,db,cr,(select sum(cr-db) from calc sub where sub.id <=
> calc.id) from calc;
>
> This of course assumes that ID indicates the correct order of the
> entries and it will blow up if you allow nulls for cr or db (which
> you shouldn't since that would literally be
Dear all,
I have below table
+-++-+
| id |
db
|cr
|
+-++-+
|1
|
| 200
|
|2
| 100
Dear all,
I Have This table
Table Billing:
id
trx_date trx_time depart payment_method
billing_amount amount_paid
balance creator
1 10/09/2003
21:55:02 Resto
Visa 13.800,00
Where can i find a complete full terminated database
schema in SQL?I want to see a real complete database schema with views,
triggers.. etc,...
52 |
Resto | Cash
| 10 |3600| 36000. | 32400
| 2.00 | middink 2
| 1 | 2003-09-29 | 07:50:17 |
Resto | Visa
| 10 |1200| 12000. | 10800
| 1.00 | middinkbut i have another problem
: - how to simple below statment :
(SUM(("public".it
1 | 2003-09-28 | 16:08:52 | Resto | Cash | 10 |3600
| 36000. | 32400 |2.00 | middink
2 |1 | 2003-09-29 | 07:50:17 | Resto | Visa | 10 |1200
| 12000. | 10800 |1.00 | middink
but i have another problem :
- how to simple below statme
hotel=# SELECThotel-#
"public".billing.id,hotel-#
"public".billing.guest_id,hotel-#
"public".billing.trx_date,hotel-#
"public".billing.trx_time,hotel-#
"public".billing.payment_method,hotel-#
"public".billing.tax,hotel-#
"public".billing.dep_id,hotel-#
"public".departme
;public"."guest" FOR EACH ROW
EXECUTE PROCEDURE "public"."generate_guest_id"();
but error
- Original Message -
From: "Richard Huxton" <[EMAIL PROTECTED]>
To: "Muhyiddin A.M Hayat" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED
Ok, but if i do rollback, the auto_increment don't roolback.
How to use nextval(), currval() and setval()
functions.
- Original
Message -
From:
Cavit Keskin
To: 'Muhyiddin A.M Hayat'
Sent: Saturday, September 20, 2003 2:15
PM
Subject: RE: [SQL]
How to Create auto_increment field in
PostreSQL.
Can I create them using
Trigger.
If in MySQL i'm using type EMUN what type in
Postgres?
24 matches
Mail list logo