Limit List in Query
Posted on 2013-12-13
I have a very large query and would like a better way to run it.
I have a query that is pulling 50 accountID's and based on those accountID's it pulls data for thousands and thousands of campaign for each accountID. It tends to crash the server because the query runs for a very long time to gather all of this information. If I run 5 accounts at a time, it seems to run ok.
So my question is, what would be the best way for me to run 5 accountID's at a time? The initial query returns 50 accountID
SELECT Account_ID, Account_Status, Account_Name, API_Vendor, ReferenceId
where referenceID IN('6250714423','4713441501','8946672149','2266698677','3483382931')
Any suggestions would be greatly appreciated