So we've decided to replace three of our existing attribute values with the contact restrictions on the general tab, which we currently aren't using. Before I get rid of those values I'd like to run an update statement to insert the restriction for those accounts that currently have the attribute. A SQL whiz I am not. So I'm able to update the value for one account, but how do I do it for a list of accounts?! I tried using commas to separate the account numbers, which didn't work. I'm trying this in test first of course.
Help!
Levi's right about the subquery. But I sense another question in there -- So if you have working code that is doing this for one account number and you want it to do it for three accounts, your working code probably ends with something like...
where customer_no = 123
and you tried
where customer_no = 123, 543, 986
but what you needed was
where customer_no in ( 123, 543, 986 )
Thanks! Levi's code worked. I thought we tried paranthesis around the list of account numbers in addition to single quotes and a few other things, but perhaps we didn't . Anyway, problem solved. Thanks!
I wish I only forgot them in forum posts :) I've wasted many an hour trying to untangle sub-sub-sub queries when all I needed was one more closing parenthesis.