Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Q: How to add new or edit / delete existing Customer Code / Delivery Locations in SCSB application?

A: The Customer Code and Delivery Locations are part of the customer_code_t table (columns CUSTOMER_CODE and DELIVERY_RESTRICTIONS). New additions, modifications or deletions needs to be handled by using appropriate SQL scripts to insert, update or delete the data.

Code Block
languagesql
titleInsert query
INSERT INTO `recap`.`customer_code_t` (`CUSTOMER_CODE_ID`, `CUSTOMER_CODE`, `DESCRIPTION`, `OWNING_INST_ID`, `DELIVERY_RESTRICTIONS`, `PWD_DELIVERY_RESTRICTIONS`, `RECAP_DELIVERY_RESTRICTIONS`, `CIRC_DESK_LOCATION`) VALUES ('100', 'ZZ', 'ZZ', '1', 'ZZ', 'ZZ', 'ZZ', 'ZZ');


Code Block
languagesql
titleUpdate query
UPDATE `recap`.`customer_code_t` 
SET 
    `CUSTOMER_CODE_ID` = '11',
    `CUSTOMER_CODE` = 'SZ',
    `DESCRIPTION` = 'ZZ',
    `DELIVERY_RESTRICTIONS` = 'ZZ',
    `PWD_DELIVERY_RESTRICTIONS` = 'ZZ',
    `RECAP_DELIVERY_RESTRICTIONS` = 'ZZ',
    `CIRC_DESK_LOCATION` = 'ZZ'
WHERE
    `CUSTOMER_CODE_ID` = '10';


Code Block
languagesql
titleDelete query
DELETE FROM `recap`.`customer_code_t` WHERE `CUSTOMER_CODE_ID`='9';