Home » SQL & PL/SQL » SQL & PL/SQL » Need help about ORA-01427: single-row subquery returns more than one row
Need help about ORA-01427: single-row subquery returns more than one row [message #298581] Wed, 06 February 2008 09:53 Go to next message
jyothsna1217
Messages: 9
Registered: February 2008
Location: hyderabad
Junior Member

HI

I'M HAVING PROBLEM WITH THIS JOIN CAN U HELP ME
select 'create'||uniqueness||
           'index &&owner'||index_name||
           'on'||table_name||
           '('||(select column_name from user_ind_columns)||
           ')'
     from user_indexes;


    ERROR IS
    old   2:        'index &&owner'||index_name||
     new   2:        'index system'||index_name||
       '('||(select column_name from user_ind_columns)||
             *
    ERROR at line 4:
     ORA-01427: single-row subquery returns more than one row


[Topic SPLIT by LF; added [code] tags to improve readability]

[Updated on: Wed, 06 February 2008 15:20] by Moderator

Report message to a moderator

Re: Help with this SQL join [message #298585 is a reply to message #298581] Wed, 06 February 2008 10:21 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is no join in your query.
Create your own topic.

In addition, I think the message is clear: your select (in select clause) returns more than one row.

Regards
Michel
Re: Help with this SQL join [message #298611 is a reply to message #298585] Wed, 06 February 2008 15:24 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
... and, as it is written, it would return a single row only if there was one and only one index in current schema, and it must be based on a single column only.

It seems that you'll have to rethink the logic.
Re: Help with this SQL join [message #298677 is a reply to message #298585] Thu, 07 February 2008 01:59 Go to previous messageGo to next message
jyothsna1217
Messages: 9
Registered: February 2008
Location: hyderabad
Junior Member

Yes,
Thank you ....I got it;
Re: Help with this SQL join [message #298678 is a reply to message #298677] Thu, 07 February 2008 02:05 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If you made it work, would you mind to post the solution so that other Forum members might benefit from it?
Re: Need help about ORA-01427: single-row subquery returns more than one row [message #298681 is a reply to message #298581] Thu, 07 February 2008 02:42 Go to previous message
pablolee
Messages: 2836
Registered: May 2007
Location: Scotland
Senior Member
Are you by any chance trying to build strings that will re-create indexes that you intend dropping?
If you are, then you could use DBMS_METADATA.GET_DEPENDENT_DDL
Previous Topic: How to create partition on an existing table with range on a timestamp
Next Topic: about sequence
Goto Forum:
  


Current Time: Sat Dec 10 01:06:45 CST 2016

Total time taken to generate the page: 0.05034 seconds