473,326 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 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 3518
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: js | last post by:
I am trying to create a primary key constraint on a view in the following statement. However, I got an error ORA-00907: missing right parenthesis. If the CONSTRAINT clause is removed, then the...
3
by: M. Mehta | last post by:
It seems that you can not create a materialized view if you are using outer joins...can someone please verify this? Thanks M. Mehta Please follow my example below: created 2 tables:
7
by: kackson | last post by:
Hi. I created a simple view with the following statements: CREATE VIEW dbo.VIEW1 AS SELECT dbo.VIEW_ALL.ID, dbo.VIEW_ALL.Code, Another.dbo.OTHER_VIEW.Label as SpecialCode FROM ...
4
by: MD | last post by:
I am trying to create a dynamic SQL statement to create a view. I have a stored procedure, which based on the parameters passed calls different stored procedures. Each of this sub stored procedure...
10
by: Zack Sessions | last post by:
Has anyone tried to create a SQL7 view using the CREATE VIEW command and ADO.NET? If so, is there a trick in trapping a SQL error when trying to create the view? I have a VB.NET app that, amoung...
2
by: Karsten | last post by:
Hi, I want to create dynamic reports with C# and MS SQL-Server 2005 Reporting Services. Since the reporting service uses a data-table or data-view, I want to create a view dynamically. How...
2
by: Curtiosity | last post by:
I have done a create or replace view called creditcard1. If I do a "select * from creditcard1" it retrieves the data just fine. If I try to do a statement where I am listing the column names it...
2
by: Shirley | last post by:
We are running DB2 on iSeries V5R2. Using AQUA DATA STUDIO with a connection to our iSeries, I created a view using SQL and I am trying to create an index on this view using the code below. ...
4
by: cognosqueen | last post by:
I need to create a view of a sql table, but change the data types. I know the syntax below is not correct, and can't figure out if it is wrong or if you just can't do this. I have only created...
7
by: alessandro menchini | last post by:
Hello, First of all: i apologize for my english...i'm still learning... If i create a view it seems that DB2 manage this view like an updateable view. But I need to create a view "read only",...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.