Home » Developer & Programmer » Forms » view based form (oracle 10g)
view based form [message #583917] Tue, 07 May 2013 00:17 Go to next message
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 #583923 is a reply to message #583917] Tue, 07 May 2013 02:51 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Based on what you said, a view returns invalid data. Check the way it is written.
Re: view based form [message #583925 is a reply to message #583923] Tue, 07 May 2013 03:03 Go to previous messageGo to next message
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 #583926 is a reply to message #583925] Tue, 07 May 2013 03:06 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK.

Which part of "a view returns invalid data" did you not understand?
Re: view based form [message #583927 is a reply to message #583926] Tue, 07 May 2013 03:12 Go to previous messageGo to next message
furqan
Messages: 115
Registered: January 2012
Location: Hyderabad
Senior Member
data is not invalid,just showing duplicate.
my 3rd view showing duplicate records.
Re: view based form [message #583928 is a reply to message #583927] Tue, 07 May 2013 03:14 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
For me, it means that it is invalid. If it is valid, why do you complain?

Once again: rewrite query which returns invalid data. That might be by adding a DISTINCT into SELECT. Or including additional conditions into its WHERE clause. Or ... I don't know. You have those tables and data, not me.
Re: view based form [message #583930 is a reply to message #583928] Tue, 07 May 2013 03:23 Go to previous messageGo to next message
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 #583931 is a reply to message #583930] Tue, 07 May 2013 03:24 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
All I can say is "try harder".
Re: view based form [message #583934 is a reply to message #583931] Tue, 07 May 2013 03:27 Go to previous messageGo to next message
furqan
Messages: 115
Registered: January 2012
Location: Hyderabad
Senior Member
so no idea or help from your side sir ?
Re: view based form [message #583935 is a reply to message #583928] Tue, 07 May 2013 03:33 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Apart from what I previously said - no, sorry.

Littlefoot

Once again: rewrite query which returns invalid data. That might be by adding a DISTINCT into SELECT. Or including additional conditions into its WHERE clause. Or ... I don't know. You have those tables and data, not me.

Re: view based form [message #583941 is a reply to message #583935] Tue, 07 May 2013 04:02 Go to previous messageGo to next message
cookiemonster
Messages: 13920
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 #583972 is a reply to message #583941] Tue, 07 May 2013 07:59 Go to previous messageGo to next message
furqan
Messages: 115
Registered: January 2012
Location: Hyderabad
Senior Member
thanks really a lot dear sirs.i tried and solved it
and never the less encouragement from little is appreciated.

my approach itself was wrong with 3rd view.

used first 2 views in a form on different canvases and it got
easy and solved.

again thanks you all and this site.

warm regards.
Re: view based form [message #583973 is a reply to message #583972] Tue, 07 May 2013 08:08 Go to previous message
Littlefoot
Messages: 21808
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.
Previous Topic: for spell check need to switch window
Next Topic: Forms go_block doesn't seem to work
Goto Forum:
  


Current Time: Thu Apr 25 18:10:46 CDT 2024