Jaspreet Singh
Jaspreet Singh

Reputation: 195

Update 10000 records at a time

I want to update 10000 records at a time.This is the query that I'm using

UPDATE CUSTOMERS SET CUST_HOME_PHONE = 
REGEXP_REPLACE(CUST_HOME_PHONE,'([0-9]{3})([0-9]{3})([0-9]{4})', '(\1)-\2-\3',1,0 )
where cust_id in (10000 cust id);

However, the problem is that using IN condition I can't enter more than 1000 records because that's the limit of IN condition. Please let me know the solution.

Upvotes: 0

Views: 481

Answers (1)

Pranav Sri
Pranav Sri

Reputation: 91

Put the 10000 values in a temporary table and then do a select where id in (select id from temptable)

Upvotes: 4

Related Questions