Table p_location
Diagram PartnerEdit 
Description:
Address and other data related to that address.
PRIMARY KEY
p_site_key_n
bigint default: 0 NOT NULL
This is the key that tell what site created this location, it will help to merge addresses when doing imports
p_location_key_i
integer default: 0 NOT NULL

p_building_1_c
varchar (100)
The name of the building
p_building_2_c
varchar (100)
The name of the building (continued)
p_street_name_c
varchar (100)
The name of the street that the house is located on
p_locality_c
varchar (100)
This is the first element of an address
p_suburb_c
varchar (100)
The name of the suburb
p_city_c
varchar (64)
This can be a post town or city
p_county_c
varchar (64)
This can be a county (UK), a state (US), province (CDN), canton (CH) etc.
p_postal_code_c
varchar (40)
This is the national post code
p_country_code_c
varchar (8)
This is a code which identifies a country. It is taken from the ISO 3166-1-alpha-2 code elements. p_country
p_address_3_c
varchar (100)
This is the third element of an address (if required)
p_geo_latitude_n
numeric (9, 6)
The latitude of the location; a number between -90 and +90; precision is 6 digits (11cm)
p_geo_longitude_n
numeric (9, 6)
The longitude of the location; a number between -180 and +180; precision is 6 digits (11cm)
p_geo_km_x_i
integer
The distance in km of this location to the location 0 if location 0 was on the same longitude; this is for improving query performance
p_geo_km_y_i
integer
The distance in km of this location to the location 0 if location 0 was on the same latitude; this is for improving query performance
p_geo_accuracy_i
integer default: -1
The accuracy of the stored geo data; -2: server did not respond; -1: not processed yet; 0: Unknown Location; 1: Country level accuracy; 2: Region; 3: Sub-Region; 4: Town/City/Village; 5: Post code; 6: Street; 7: Intersection; 8: Address level accuracy
p_restricted_l
boolean default: '0'
Indicates whether or not the location has restricted access. If it does then the access will be controlled by s_group_location.
s_date_created_d
date default: CURRENT_DATE
The date the record was created.
s_created_by_c
varchar (20)
User ID of who created this record. s_user
s_date_modified_d
date
The date the record was modified.
s_modified_by_c
varchar (20)
User ID of who last modified this record. s_user
s_modification_id_t
timestamp default: CURRENT_TIMESTAMP
This identifies the current version of the record.


FOREIGN KEY
p_location_fk1: p_country_code_c => p_country
p_location_fkcr: s_created_by_c => s_user
p_location_fkmd: s_modified_by_c => s_user


REFERENCED BY
p_partner_location, m_extract, s_group_location