Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Sql query error: [Err] ORA-00913: how to solve too many values

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the knowledge of "sql query reporting error: [Err] ORA-00913: how to solve too many values". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Query sql:

SELECT * from T_QL_CASE Q where q.CASE_OID IN (select f. CASEN OID from T_QL_CASE_APPROVAL_FINAL f. FINALLOSTATUS f where FINAL_STATUS='2' OR FINAL_STATUS='33' OR FINAL_STATUS='43' OR FINAL_STATUS='34' OR FINAL_STATUS='5')

The cause of the problem:

SELECT * from T_QL_CASE Q

Where q.CASE_OID IN (

Select f.CASE_OID,f.FINAL_STATUS

From T_QL_CASE_APPROVAL_FINAL f

Where FINAL_STATUS='2'

OR FINAL_STATUS='33'

OR FINAL_STATUS='43'

OR FINAL_STATUS='34'

OR FINAL_STATUS='5')

In the two red places, the number of columns after where should be the same as the number of columns in select in in (select cloum1,clounm2).

When INSERT reports this error, it is generally due to an inconsistent number of columns inserted into the data.

Original sql:insert into abc.employees select * from employees where employee_id=100; error report: Error starting at line 1 in command:insert into abc.employees select * from employees where employee_id=100; Error at Command Line:1 Column:25Error report:SQL Error: ORA-00913: too many values00913. 00000-"too many values" * Cause: * Action: solution: the column name insert into abc.employees (col1,col2) select col1,col2 from employees where employee_id=100; should be specified as follows if employees has 112 columns (original text)! ) try to run below to select the column select * from ALL_TAB_COLUMNS ATC1left join ALL_TAB_COLUMNS ATC2 on ATC1.COLUMN_NAME = ATC1.COLUMN_NAME and ATC1.owner = UPPER ('2nd owner') where ATC1.owner = UPPER (' abc') and ATC2.COLUMN_NAME is nullAND ATC1.TABLE_NAME = 'employees', then you should upgrade the table to have the same structure "sql This is the end of the query error report: [Err] ORA-00913: how to solve the too many values? Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report