Query by Party in SQL clause IN

Asked

Viewed 117 times

0

I have to make an appointment with more than 400,000 entries in the clause IN. Turns out I can’t do everything at once because I can crash my company’s system. So I have to run at a specific time and every time 5,000 at a time. However I do not know of an effective way to do this. I wanted to do a JOB, but would have to do many JOBS.

I can make one WHILE for it to run 5,000 on 5,000? I use the SQL Server.

  • you cannot replace the IN with a JOIN/LEFT ?

  • I can’t get Andreia, I’ll put about phone numbers on Where and I’ll extract information from those numbers. But if I put it all in, the operation in the company can stop.

  • You have a list of 400,000 phones and need to do an action on them ? The problem was unclear at least to me.

  • if you can place an example or an image it is easier to view your problem..

  • 1

    Hello @Ricardob had a situation similar to a table of requests, in my situation I created a new table only with the fields that were useful to me and used in the query, and this new table I load the new data generated in the original every 1h through a JOB, Only the initial load I carried out at dawn to not take risk, although it was "INSERT/SELECT", already the execution time of JOB you will choose the one that fits best. It’s just an idea you can test.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.