Session Ready
Exercise

Multiple statement transactions

Now let's use multiple statements in a transaction to set a flag in FIELD48 based on if it holds US state government assets represented in RCON2203, foreign assets represented in RCON2236, or both.

The values for FIELD48 should be 'US-STATE-GOV', 'FOREIGN', or 'BOTH' respectively. Flag fields like this are common in government data sets, and are great for categorizing records.

Instructions
100 XP
  • Begin a transaction.
  • Build 3 update statements to detect each condition in the column and set the FIELD48 flag to the proper value.
  • End the transaction.
  • Select a count of records where the flag is set to 'BOTH'.