| От | Mr OCP |
|---|---|
| Тема | Please help me write this query or function |
| Дата | |
| Msg-id | 20011211125445.96186.qmail@web20609.mail.yahoo.com обсуждение |
| Ответы |
Re: Please help me write this query or function
|
| Список | pgsql-admin |
Hi We have a table like follows: id, account_name, amount, action_type The amount field has both debit and credit entires and action_type defines the type of transaction ( debit or credit), debit entries have negative '-' symbol before the amount. where there are multipble transaction for the same id, I need to write a query as under: select id, amount(credit), amount(debit), amount credit - amount debit from table where id is the same; Its making it difficult for me because the amount field has both debit and credit entries, your ideas, codes or sql will be much appreciated. Thanks Mike http://shopping.yahoo.com.au - Yahoo! Shopping - Free CDs for thousands of Priority Shoppers!
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера