I'm getting an error [ORA-01427: Single-line sub-quote returns more than one line] I execute I have such a query:
SELECT LV.PRICE, (SELECT C.MODEL_NAME CARS C WHERE to C.MODEL_ID = LV.MODEL_ID) LEDGER_VIEW LV WHERE as MODEL_NAME LV.PRICE & lt; 500
It's breaking on the nested selection. I know both in logic and in this question it is right, and there is no possibility of returning nested selection to more than one line. MODEL_ID of the table of cars is a unique field. If I execute a query without nested selection, then this error does not return.
LEDGER_VIEW A view is made at the top of the second view Is it possible that these stacked scenes are rugged in Oracle 10G? I do not know how to debug this problem.
I know that I can replace this special query rather than nested selection, but I would like to know why this is happening because I use nested queries at other places where it is very easy Is not replaceable from.
Edit : Here's really funny as I said, LEDGER_VIEW is built on top of another view. As a test, I copied the SQL of Nested View to SECL's SECL in place of the LEDGER_VIEW, Nested View of SECL, and it was returned with no error (expected). This confirms to me that some buggy behavior is accompanied by a combination of nested ideas or nested visual + database links.
I am unable to rebuild the creation of a stacked view. (Althong Redfilter criminals will get)
Make Table T1 (T1_ID number, TCTC VARCHAR2 (50), Contract T1_PK Primary Key (T1_ID)); Create table T2 (T2_ID number, T1_ID number, value number (10, 4), contract T2_pk primary key (T2_ID), contract T2_fac foreign key (T1_ID) reference T1 (T1_ID)); Insert T1 (T1_ID, TCTE) value (1, 'Fit'); Insert T1 (T1_ID, TCTE) values (2, 'Focus'); Put in T1 (T1_ID, TCTE) value (3, 'golf'); Put in T1 (T1_ID, TCTE) values (4, 'explorer'); Insert T1 (T1_ID, TCTE) values (5, 'Corolla'); Insert T2 (T2_ID, T1_Id, Price) Price (1,1, 17, 000); Insert T2 (T2_ID, T1_Id, Price) Price (2,2, 16, 000); Insert T2 (T2_ID, T1_Id, Price) Price (3,3, 22, 000); Insert T2 (T2_ID, T1_Id, Price) Price (4,431,000); Insert T2 (T2_ID, T1_Id, Price) Price (5,517000); Create t1_view to view as T1 * *; Create t2_view to view T2 as a selection * Select visual t_stacked_view as t1_view.txt, t2_view.price, t1_view.t1_id to t1_view t2_view at t1_view.t1_id = t2_view .t1_id; --Select Staid View Tester t1_view.txt, (t_stacked_view.price from t_stacked_view, select t1_view.t1_id = t_stacked_view .t1_id) value from t1_view; - or better yet, just leave the row-level query, select t1_view.txt, t2_view.price from t1_view left t2_view at t1_view.t1_id = t2_view .t1_id;
But she asks the question, why are you doing a line level query here? While 10G should adapt them, I have always been easy to write questions easily, readability, maintenance, and especially to avoid the error that you have (always, that's 3 years down the road, By guaranteed application (in both DB and calling app) that you do not have any such condition which can cause this error? A rouge goes into statement and your entire app dies?
SELECT LV.PRICE , C. MODL_ID = LV.MODL_ID = LAV.PRIECEEES500 /
Comments
Post a Comment