Tuesday, December 27, 2011

SQLForce Saves Marketing Many Hours

Marketing had an interesting problem last week.
Marketing: We want to create a price book just like the "2012 Standard Price Book" but only include USD prices. Can we just clone the "2012 Standard Price Book" and have you fix it.
Any guesses about how much work it was to "fix" the cloned price book?  In sqlforce it took a single line:
SQLForce> DELETE FROM pricebookentry WHERE pricebook2.name='Distributor Price Book - 2012' and currencyIsoCode<>'USD';
Yes, using the DELETE statement is dangerous. The wrong WHERE clause (or no WHERE clause) can quickly destroy a lot of data. However, judiciously used, DELETE can save a lot of time.

No comments: