Hi all! I am trying to do a cleanup of all of our workers by making around ~175 of them inactive, and as a beginner SQL user I'd appreciate the community's review/advice on my code.
Here is what I'm trying to update on these constituent records:
And I have a static list of all of the workers that need to be made inactive (list # 133113).
So the SQL script I came up with is as follows:
Use impresarioselect *from T_LIST_CONTENTS a left outer join TX_CUST_WORKER_TYPE bon a.customer_no=b.worker_customer_nowhere a.list_no='133113' and b.inactive = 'n'
--below is a separate part of the code to run. begin transactionupdate TX_CUST_WORKER_TYPEset inactive = 'y'where worker_customer_no in (select b.worker_customer_no from T_LIST_CONTENTS aleft outer join TX_CUST_WORKER_TYPE b on a.customer_no=b.worker_customer_nowhere a.list_no='133113') commit
I tried this in Test, but I must have done something wrong; afterwards, opening any of the affected accounts would cause Test to crash. (I did a Prod to Test copy last night, so Test is now working properly again).
Many thanks in advance for any tips or advice!
Liz
Hi Liz,
You might want to try a capital Y, rather than lower case. Recently, I was testing updating membership levels and when I used a lowercase y, the check box didn't show as checked. However, when I switched it to an uppercase Y it did. Not sure it that's the issue, but worth a try.
T.C.