Home » Developer & Programmer » Forms » view based form (oracle 10g)
view based form [message #583917] |
Tue, 07 May 2013 00:17 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/c86fedf38fdae46febdd4144bf66e65d?s=64&d=mm&r=g) |
furqan
Messages: 115 Registered: January 2012 Location: Hyderabad
|
Senior Member |
|
|
hello sirs
i have a form based on view just to display.
when i execute query,records are getting displayed
more than once.
please guide me to make them get displayed just once.
thanks a lot in advance and really appreciate your help.
regards.
|
|
|
|
Re: view based form [message #583925 is a reply to message #583923] |
Tue, 07 May 2013 03:03 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/c86fedf38fdae46febdd4144bf66e65d?s=64&d=mm&r=g) |
furqan
Messages: 115 Registered: January 2012 Location: Hyderabad
|
Senior Member |
|
|
the view iam talking about is created using two other views.
4 tables.
1st view tab1+tab2
2nd view tab3+tab4
view about which iam talking is 3rd view.it is 1st view+ 2nd view.like this
records and inserted in tab1,tab2,tab3,tab4 .
i created a form based on 3rd view.but when execute query is displaying
some duplicate records.just want to make it display duplicate records once.
regards
[Updated on: Tue, 07 May 2013 03:03] Report message to a moderator
|
|
|
|
|
|
Re: view based form [message #583930 is a reply to message #583928] |
Tue, 07 May 2013 03:23 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/c86fedf38fdae46febdd4144bf66e65d?s=64&d=mm&r=g) |
furqan
Messages: 115 Registered: January 2012 Location: Hyderabad
|
Senior Member |
|
|
first view:
--------------
CREATE OR REPLACE VIEW MCRS
(REQ_NO, REQ_DATE, REQ_FROM, RSTAFF_ID, RSTAFF_NAME,
RSITE_NAME, RM_REMARKS, MATCODE, DESCRIPTION, PARTNO,
TC_NO, REQ_QTY, RD_REMARKS, STATUS)
AS
SELECT
S.REQ_NO,s.req_date,s.req_from,s.rstaff_no,s.rname,s.rsite_name,s.remarks,
B.matcode,B.description,B.partno,B.tc_no,B.qnty,B.remarks,B.status
from REQUI_MSTR S,REQUI_DTL B WHERE S.REQ_NO=B.DREQ_NO
second view:
-------------------
CREATE OR REPLACE VIEW REQ_SB
(BILL_ID, BILL_DATE, PLACE_TO, SHIPPER_ID, SHIPPER_NAME,
SM_REMARKS, SEND_QTY, SD_REMARKS, REQ_NO)
AS
SELECT
S.BILL_ID,S.BILL_DATE,S.PLACE_TO,S.SSTAFF_ID,S.SSTAFF_NAME,S.REMARKS,
B.SEND_QTY,B.TRANSACT_NOTE,B.REQ_NO
from SHIP_MSTR S,SHIP_DTL B WHERE S.BILL_ID=B.BILL_ID
third view:
---------------
CREATE OR REPLACE VIEW STATUS_REQUI
(REQ_NO, REQ_DATE, REQ_FROM, RSTAFF_ID, RSTAFF_NAME,
RSITE_NAME, RM_REMARKS, MATCODE, DESCRIPTION, PARTNO,
TC_NO, REQ_QTY, RD_REMARKS, STATUS, BILL_ID,
BILL_DATE, PLACE_TO, SHIPPER_ID, SHIPPER_NAME, SM_REMARKS,
SEND_QTY, SD_REMARKS)
AS
SELECT
S.REQ_NO,S.REQ_DATE,S.REQ_FROM,S.RSTAFF_ID,S.RSTAFF_NAME,S.RSITE_NAME,S.RM_REMARKS,S.MATCODE,S.DESCRIPTION,S.PARTNO,S.TC_NO,S.REQ_QTY ,S.RD_REMARKS,S.STATUS,
B.BILL_ID,B.BILL_DATE,B.PLACE_TO,B.SHIPPER_ID,B.SHIPPER_NAME,B.SM_REMARKS,B.SEND_QTY,B.SD_REMARKS FROM MCRS S,REQ_SB B WHERE S.REQ_NO=B.REQ_NO
still trying to change my where clause in my third view,but no success.
|
|
|
|
|
|
Re: view based form [message #583941 is a reply to message #583935] |
Tue, 07 May 2013 04:02 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
We don't have your tables or your data.
We don't know what the relationships between your tables are.
Without knowing these things we can't tell what the sql should be to avoid duplicates.
|
|
|
|
Re: view based form [message #583973 is a reply to message #583972] |
Tue, 07 May 2013 08:08 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I thought that you'd rewrite 3rd view SELECT statement; however, if you are satisfied with that solution, that's OK with me. I'm glad you managed to solve it all by yourself.
|
|
|
Goto Forum:
Current Time: Thu Sep 12 06:44:40 CDT 2024
|