Home > database >  Strange questions, can execute the SQL statement in the SQL window, but the storage process error
Strange questions, can execute the SQL statement in the SQL window, but the storage process error

Time:09-25

SQL statements below
Insert into tb_customer_info (id, CUSTOMER_NAME, system_customer_no CUSTOMER_TYPE)
Select
TAX_SEQUENCE NEXTVAL,
A.C USTOMER_NAME,
A.s ystem_customer_no,
3 the from (select
Fund. Sys_code | | 'virtual clients' as CUSTOMER_NAME,
'XN' | | fund. Sys_code as system_customer_no
The from tb_output_fund_product fund
Where fund. Fundraising_channel='3'
And 'XN' | | fund. Sys_code not in
(the select cust. System_customer_no from tb_customer_info cust)) a;

An error in the storage process, perform well in the SQL window

CodePudding user response:

Oracle version is 11 g

CodePudding user response:

, as well as the data,,

CodePudding user response:

'XN' | | fund. Sys_code as system_customer_no


The results, there are repeated, it is recommended that check

CodePudding user response:

Print SQL stored procedures, will find that secret

CodePudding user response:

The
reference 3 floor wmxcn2000 response:
'XN' | | fund. Sys_code as system_customer_no


The results, there are repeated, it is recommended that check


The column group by, article found that the number is the same, result shows that there is no repeat,,

CodePudding user response:

reference 4 floor splendid_java response:
print SQL stored procedures, will find mystery

The younger brother pretty, don't know how to print the SQL

CodePudding user response:

refer to the second floor acen_chen response:
, as well as the data,,

The same

CodePudding user response:

refer to 6th floor q769523503 response:
Quote: refer to 4th floor splendid_java response:

Print the SQL stored procedures, will find mystery

The younger brother pretty, don't know how to print the SQL

The DBMS functions can be

CodePudding user response:

Do not repeat and database of the existing data?
And I see you behind the process also have the table statements, make sure no problem?

CodePudding user response:

Delete the only index (constraints) first, and then perform this process, you submit completed, you check the duplicate values again, should be able to quickly find the problem,

CodePudding user response:

references 9 f acen_chen response:
and database data has not repeat?
And I see you behind the process also have the table statements, make sure no problem?

Thanks to answer, can insert in the SQL window above, SQL window just test, insert the data submitted

CodePudding user response:

references to the tenth floor wmxcn2000 response:
delete the only index (constraints) first, and then perform this process, you submit completed, you check the duplicate values again, should be able to find the problem quickly,

Find a problem, remove the unique index after the query, there are duplicate records, adjusted the SQL statements, problem solving

CodePudding user response:

Yes, it is good to solve the,

PS: CSDN recommend content is a little unusual,
  • Related