471,316 Members | 1,059 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,316 software developers and data experts.

How to Create View

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 10.000,00 3.800,00 middink

Table Payment

id r trx_date trx_time descriptions payment_method amount creator
1 10/08/2003 18:17:40 Payment Cash 2.000,00 middink
I would like to create "View " from above table with result look like:
trx_date trx_time descriptions payment_method debet credit balance creator
10/09/2003 21:55:02 Resto Billing 13.800,00 Paid: 10.000,00 Visa 3.800,00 3.800,00middink
10/08/2003 18:17:40 Payment Cash 2..000,00 1.800,00 middink
How can I create View like above?

Nov 12 '05 #1
1 3416
Muhyiddin A.M Hayat wrote:
Dear all,

I Have This table

trx_date trx_time descriptions

payment_method debet credit balance creator
10/09/2003 21:55:02 Resto Billing 13.800,00 Paid:
10.000,00 Visa 3.800,00 3.800,00 middink
10/08/2003 18:17:40 Payment
Cash
2.000,00 1.800,00 middink
How can I create View like above?


Have you created a SQL statement to get this recordset yet? When you
have your SQL query working the way you want, you just run

CREATE VIEW view_name AS your sql query;

then you can perform a SELECT * FROM view_name;


--
Robby Russell, | Sr. Administrator / Lead Programmer
Command Prompt, Inc. | http://www.commandprompt.com
rr******@commandprompt.com | Telephone: (503) 222.2783
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by js | last post: by
3 posts views Thread by M. Mehta | last post: by
7 posts views Thread by kackson | last post: by
10 posts views Thread by Zack Sessions | last post: by
2 posts views Thread by Karsten | last post: by
2 posts views Thread by Shirley | last post: by
7 posts views Thread by alessandro menchini | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.