LTX_M2_ELISTS_EADRESS

Description:

This table keeps track of all opt-ins and opt-outs for patrons interacting with public and private lists for an organization, or organizations in a consrotium. All consortium members share this table. 

Schema:

[m2_list_no] [int] NOT NULL,
[address] [varchar](80) NOT NULL,
[status] [char](10) NOT NULL,
[created_by] [char](8) NULL,
[create_dt] [datetime] NULL,
[create_loc] [varchar](16) NULL,
[last_update_dt] [datetime] NULL,
[last_updated_by] [char](8) NULL

The [m2_list_no] field has a foreign key to the [id] column of LTR_M2_ELISTS. 
For each list that a patron is opted in to or out of for an organization, a row is created in this table. If the patron has never opted in or out for a particular list, they do not have a row in this table for that list. When a patron opts in to a list, the address is entered in this table along with the list id from the [id] field in LTR_M2_ELISTS. The [status] field is marked as 'active'. If a patron opts out of a list, the [status] field is marked as 'inactive'. This table is indexed by [address] and [m2_list_no]. 
This table will potentially have millions of rows, and periodic maintenance may be required to remove rows from this table for lists that have been made inactive in LTR_M2_ELISTS. In order to do this, you can run the following ad hoc query:

DELETE FROM LTX_M2_ELISTS_EADDRESS where (m2_list_no in(select id from LTR_M2_ELISTS WHERE active = 'N')
OR NOT EXISTS(SELECT * FROM LTR_M2_ELISTS WHERE id = m2_list_no))
DELETE FROM LTR_M2_ELISTS where active = 'N'

Still need help? Contact Us Contact Us