Hi, I have a number of Updates I'm running sequentially. When I add new data to the dataset I'd like the whole code to run in 1 go rather than each Update individually.
Here's a snippet of my code. I'm new to SQL, and am sure this is not the optimal way of writing it...!! (The reason for the final line in each Update is I don't want to overrwrite a previously categorised FullDesc).
update bankstatements.transactions set sandpit2 = 'Health' where FullDesc like '%Mcare%' and sandpit2 is null; update bankstatements.transactions set sandpit2 = 'Centrelink' where FullDesc like '%Ctrlink%' and sandpit2 is null; update bankstatements.transactions set sandpit2 = 'Rental Bond' where FullDesc like '%residential tena%' and sandpit2 is null; update bankstatements.transactions set sandpit2 = 'Auto' where FullDesc like '%7-eleven%' and sandpit2 is null; update bankstatements.transactions set sandpit2 = 'ATM' where fulldesc like '%cash out%' and sandpit2 is null; update bankstatements.transactions set sandpit2 = 'Auto' where fulldesc like '%coles express%' and sandpit2 is null; update bankstatements.transactions set sandpit2 = 'Groceries' where fulldesc like '%Coles%' and sandpit2 is null;