Ninjakreborn Posted July 25, 2011 Share Posted July 25, 2011 Here is the SQL: CREATE TABLE Areas ( Short varchar (3), Long varchar (50), Town smallint, Mappable bit ) CREATE TABLE BU ( LIST_NO int, BASEMENT_FEATURE varchar (10), BLDG_SQ_FEET numeric(12, 0), BUILDING_CONSTRUCTION varchar (20), BUSINESS_HRS varchar (10), BU_TYPE varchar (1), DOCUMENTS_ON_FILE varchar (40), ELEVATOR varchar (1), EQUIP_LIST_AVAIL varchar (1), FACILITIES varchar (20), FORM varchar (10), GROSS_ANNUAL_EXP numeric(12, 0), GROSS_ANNUAL_INCOME numeric(12, 0), HANDICAP_ACCESS varchar (1), INVENTORY_AVAIL varchar (1), LOCATION varchar (30), NET_OPERATING_INC numeric(12, 0), NO_OF_DRIVING_DOORS tinyint, NO_OF_LOADING_DOCKS tinyint, NO_OF_RESTROOMS tinyint, OWNER_TRAINING varchar (1), PARKING_SPCS smallint, REAL_ESTATE_INCLD varchar (1), REAL_ESTATE_LN varchar (, REASON_FOR_SELL varchar (20), SPECIAL_FINANCING varchar (1), SPECIAL_LICENSES varchar (10), SYSTEM varchar (20), TENANT_EXPENSES varchar (30), TERMS_FEATURE varchar (20), TRAFFIC_COUNT int, UTILITIES varchar (30), ZONE_DESCRIPTION varchar (10) ) CREATE TABLE CC ( LIST_NO int, AMENITIES varchar (21), APPLIANCES varchar (29), ASSC_FEE_INCLUDES varchar (65), ASSC_POOL varchar (1), ASSOC_SECURITY varchar (13), BEACH_DESCRIPTION varchar (13), BEACH_MILES_TO varchar (9), BEACH_OWNERSHIP varchar (9), BED2_DIMEN varchar (5), BED2_DSCRP varchar (39), BED2_LEVEL varchar (1), BED3_DIMEN varchar (5), BED3_DSCRP varchar (39), BED3_LEVEL varchar (1), BED4_DIMEN varchar (5), BED4_DSCRP varchar (39), BED4_LEVEL varchar (1), BTH1_DIMEN varchar (5), BTH1_DSCRP varchar (39), BTH1_LEVEL varchar (1), BTH2_DIMEN varchar (5), BTH2_DSCRP varchar (39), BTH2_LEVEL varchar (1), CC_TYPE varchar (1), COMPLEX_COMPLETE varchar (1), CONDOMINIUM_NAME varchar (40), CONDO_ASSOCIATION varchar (1), CONSTRUCTION varchar (15), COOLING varchar (23), COOLING_ZONES tinyint, DIN_DIMEN varchar (5), DIN_DSCRP varchar (39), DIN_LEVEL varchar (1), DOCUMENTS_ON_FILE varchar (17), ELECTRIC_FEATURE varchar (17), ENERGY_FEATURES varchar (17), EXTERIOR varchar (25), EXTERIOR_UNIT_FEATURES varchar (53), FAM_DIMEN varchar (5), FAM_DSCRP varchar (39), FAM_LEVEL varchar (1), FLOORING varchar (19), GARAGE_PARKING varchar (25), GARAGE_SPACES tinyint, HEATING varchar (41), HEAT_ZONES tinyint, HOA_FEE numeric(12, 2), HOT_WATER varchar (19), INSULATION_FEATURE varchar (19), INTERIOR_FEATURES varchar (19), KIT_DIMEN varchar (5), KIT_DSCRP varchar (39), KIT_LEVEL varchar (1), LAUNDRY_DIMEN varchar (5), LAUNDRY_DSCRP varchar (39), LAUNDRY_LEVEL varchar (1), LEAD_PAINT varchar (7), LIV_DIMEN varchar (5), LIV_DSCRP varchar (39), LIV_LEVEL varchar (1), MANAGEMENT varchar (15), MASTER_BOOK varchar (6), MASTER_PAGE varchar (4), MBR_DIMEN varchar (5), MBR_DSCRP varchar (39), MBR_LEVEL varchar (1), NO_LIVING_LEVELS smallint, NO_UNITS smallint, NO_UNITS_OWNER_OCC smallint, OPTIONAL_FEE numeric(12, 2), OPT_FEE_INCLUDES varchar (63), OTH1_DIMEN varchar (5), OTH1_DSCRP varchar (39), OTH1_LEVEL varchar (1), OTH1_ROOM_NAME varchar (3), OTH1_ROOM_NAME_LONG varchar (13), OTH2_DIMEN varchar (5), OTH2_DSCRP varchar (39), OTH2_LEVEL varchar (1), OTH2_ROOM_NAME varchar (3), OTH2_ROOM_NAME_LONG varchar (13), OTH3_DIMEN varchar (5), OTH3_DSCRP varchar (39), OTH3_LEVEL varchar (1), OTH3_ROOM_NAME_LONG varchar (3), OTH3_ROOM_NAME varchar (13), OTH4_DIMEN varchar (5), OTH4_DSCRP varchar (39), OTH4_LEVEL varchar (1), OTH4_ROOM_NAME varchar (3), OTH4_ROOM_NAME_LONG varchar (13), OTH5_DIMEN varchar (5), OTH5_DSCRP varchar (39), OTH5_LEVEL varchar (1), OTH5_ROOM_NAME varchar (3), OTH5_ROOM_NAME_LONG varchar (13), OTH6_DIMEN varchar (5), OTH6_DSCRP varchar (39), OTH6_LEVEL varchar (1), OTH6_ROOM_NAME varchar (3), OTH6_ROOM_NAME_LONG varchar (13), OWNER_OCC_SOURCE varchar (11), PARKING_FEATURE varchar (15), PARKING_SPACES smallint, POOL_DESCRIPTION varchar (9), RESTRICTIONS varchar (9), ROOF_MATERIAL varchar (17), SEWAGE_DISTRICT varchar (5), SEWER_AND_WATER varchar (17), STYLE varchar (39), TERMS_FEATURE varchar (15), UFFI varchar (1), UNIT_BUILDING varchar (11), UNIT_LEVEL tinyint, UNIT_PLACEMENT varchar (16), UTILITY_CONNECTIONS varchar (17), WARRANTY varchar (1), WATERFRONT varchar (25), YEAR_CONVERTED smallint, YEAR_ROUND varchar (1), BED5_DIMEN varchar (5), BED5_DSCRP varchar (39), BED5_LEVEL varchar (1), BTH3_DIMEN varchar (5), BTH3_DSCRP varchar (39), BTH3_LEVEL varchar (1), PETS_ALLOWED varchar (1) ) CREATE TABLE CI ( LIST_NO int, ON_FILE_21E varchar (1), ASSC_FEE_INCLUDES varchar (65), ASSESSED_VALUE_BLDG numeric(12, 0), ASSESSED_VALUE_LAND numeric(12, 0), CEILING_HEIGHT tinyint, CI_TYPE varchar (1), CONDO_ASSOCIATION varchar (1), CONSTRUCTION varchar (15), DEPTH int, DIVIDABLE varchar (1), EASEMENTS varchar (1), ELEVATOR varchar (1), EXCHANGE varchar (1), EXPANDABLE varchar (1), GROSS_ANNUAL_EXP numeric(12, 0), GROSS_ANNUAL_INCOME numeric(12, 0), HANDICAP_ACCESS varchar (1), HOA_FEE numeric(12, 2), LEASE varchar (1), LEASE_PRICE_INCLUDES varchar (9), LEASE_TYPE varchar (3), LIEN_AND_ENCUMBENT varchar (1), LOCATION varchar (27), MAF_BLDG_SF numeric(12, 0), MAU_UNITS tinyint, MILL_RATE numeric(12, 2), NET_OPERATING_INC numeric(12, 0), NO_BUILDINGS smallint, NO_OF_DRIVING_DOORS tinyint, NO_OF_LOADING_DOCKS tinyint, NO_OF_RESTROOMS tinyint, NO_STORIES smallint, NO_UNITS smallint, OFF_BLDG_SF numeric(12, 0), OFU_UNITS tinyint, PARKING_FEATURE varchar (15), PARKING_SPACES smallint, PLAT_PLAN varchar (1), RAILROAD_SIDING varchar (1), REF_BLDG_SF numeric(12, 0), REU_UNITS smallint, ROOF_MATERIAL varchar (11), RSF_BLDG_SF numeric(12, 0), RSU_UNITS smallint, SITE_CONDITION varchar (13), SPACE_AVAILABLE varchar (5), SPECIAL_FINANCING varchar (1), SPRINKLERS varchar (1), SUBLET varchar (1), SUB_DIVIDABLE varchar (1), SURVEY varchar (1), TOTAL_ASSESSED_VALUE numeric(12, 0), TOTAL_BLDG_SF numeric(12, 0), TOTAL_UNITS smallint, TRAFFIC_COUNT int, UNDRGRND_TANK varchar (1), UTILITIES varchar (25), WAF_BLDG_SF numeric(12, 0), WAU_UNITS tinyint, ZONE_DESCRIPTION varchar (5) ) CREATE TABLE Counties ( Short varchar (4), Long varchar (50) ) CREATE TABLE Field_Reference ( id int, sf bit, cc bit, mf bit, ld bit, ci bit, bu bit, rn bit, Field varchar (32), Short varchar (3), Medium varchar (5), Long varchar (50), mh bit ) CREATE TABLE HISTORY_BULK( KeyId int, Change_Date smalldatetime, LIST_NO int, Old_Value varchar(64), New_Value varchar(64), Who varchar(12), Field varchar(50), Update_Date smalldatetime, Active_Flag bit ) CREATE TABLE IDX_Optout ( Office ID nvarchar (6), Opt_Out_Date smalldatetime, msrepl_tran_version uniqueidentifier ) CREATE TABLE IDX_Optout_Listings ( LIST_NO char (, msrepl_tran_version uniqueidentifier ) CREATE TABLE LD ( LIST_NO int, AMENITIES varchar (21), BEACH_DESCRIPTION varchar (13), BEACH_MILES_TO varchar (9), BEACH_OWNERSHIP varchar (9), CABLE_AVAILABLE varchar (1), CULTIVATION_ACRES numeric(12, 2), DEQE varchar (10), DOCUMENTS_ON_FILE varchar (42), ELECTRIC_FEATURE varchar (11), GAS varchar (9), HOA_FEE numeric(12, 2), HOME_OWN_ASSOCIATION varchar (1), IMPROVEMENTS varchar (20), LAND_DESC varchar (30), LD_TYPE varchar (1), NO_LOTS smallint, PASTURE_ACRES numeric(12, 2), PERC_TEST varchar (1), PERC_TEST_DATE smalldatetime, REQD_OWN_ASSOCIATION varchar (1), ROAD_TYPE varchar (32), SEWAGE_DISTRICT varchar (5), SEWER varchar (11), TIMBER_ACRES numeric(12, 2), WATER varchar (11), WATERFRONT varchar (26), ZONE_USAGE varchar ( ) CREATE TABLE MF ( LIST_NO int, AMENITIES varchar (21), APOD_AVAILABLE varchar (1), APP_COMMON varchar (29), APP_DSCRP_1 varchar (29), APP_DSCRP_2 varchar (29), APP_DSCRP_3 varchar (29), APP_DSCRP_4 varchar (29), BASEMENT_FEATURE varchar (27), BEACH_DESCRIPTION varchar (13), BEACH_MILES_TO varchar (9), BEACH_OWNERSHIP varchar (9), BEDRMS_1 tinyint, BEDRMS_2 tinyint, BEDRMS_3 tinyint, BEDRMS_4 tinyint, COLOR varchar (10), COL_COMMON varchar (23), COL_DSCRP_1 varchar (23), COL_DSCRP_2 varchar (23), COL_DSCRP_3 varchar (23), COL_DSCRP_4 varchar (23), CONSTRUCTION varchar (15), COOLING_UNITS tinyint, COOLING_ZONES tinyint, ELEC smallint, ELECTRIC_FEATURE varchar (23), ENERGY_FEATURES varchar (19), EXPENSES_SOURCE varchar (17), EXPENSES_YEAR_END varchar (5), EXTERIOR varchar (27), EXTERIOR_FEATURES varchar (55), FLOORING varchar (19), FLRS_1 tinyint, FLRS_2 tinyint, FLRS_3 tinyint, FLRS_4 tinyint, FOUNDATION varchar (13), FOUNDATION_SIZE varchar (15), FRPLCS_1 tinyint, FRPLCS_2 tinyint, FRPLCS_3 tinyint, FRPLCS_4 tinyint, F_BTHS_1 tinyint, F_BTHS_2 tinyint, F_BTHS_3 tinyint, F_BTHS_4 tinyint, GARAGE_SPACES tinyint, GOI int, GRE int, GSE smallint, HEAT_UNITS tinyint, HEAT_ZONES tinyint, HEA_COMMON varchar (41), HEA_DSCRP_1 varchar (41), HEA_DSCRP_2 varchar (41), HEA_DSCRP_3 varchar (41), HEA_DSCRP_4 varchar (41), HOT_WATER varchar (21), HTE smallint, H_BTHS_1 tinyint, H_BTHS_2 tinyint, H_BTHS_3 tinyint, H_BTHS_4 tinyint, IFE_COMMON varchar (31), IFE_DSCRP_1 varchar (31), IFE_DSCRP_2 varchar (31), IFE_DSCRP_3 varchar (31), IFE_DSCRP_4 varchar (31), INSC smallint, LEAD_PAINT varchar (7), LEASE_1 varchar (1), LEASE_2 varchar (1), LEASE_3 varchar (1), LEASE_4 varchar (1), LEVELS tinyint, LEVELS_1 tinyint, LEVELS_2 tinyint, LEVELS_3 tinyint, LEVELS_4 tinyint, LOT_DESCRIPTION varchar (23), MF_TYPE varchar (1), MGF smallint, MSE smallint, NOI int, NO_UNITS smallint, PARKING_FEATURE varchar (11), PARKING_SPACES smallint, RENT1 smallint, RENT2 smallint, RENT3 smallint, RENT4 smallint, RFS smallint, RME smallint, RMS_1 tinyint, RMS_2 tinyint, RMS_3 tinyint, RMS_4 tinyint, RMS_COMMON varchar (11), RMS_DSCRP_1 varchar (11), RMS_DSCRP_2 varchar (11), RMS_DSCRP_3 varchar (11), RMS_DSCRP_4 varchar (11), RNT_DSCRP_1 varchar (13), RNT_DSCRP_2 varchar (13), RNT_DSCRP_3 varchar (13), RNT_DSCRP_4 varchar (13), ROAD_TYPE varchar (19), ROOF_MATERIAL varchar (17), SEW smallint, SEWAGE_DISTRICT varchar (5), SEWER_AND_WATER varchar (17), TERMS_FEATURE varchar (13), TOTAL_BRS tinyint, TOTAL_FBH tinyint, TOTAL_FLRS tinyint, TOTAL_FRPLCS tinyint, TOTAL_HBH tinyint, TOTAL_LEVELS tinyint, TOTAL_RENT smallint, TOTAL_RMS tinyint, TOTAL_ROOMS tinyint, UFFI varchar (1), UTILITY_CONNECTIONS varchar (17), WARRANTY varchar (1), WATERFRONT varchar (25), WSE smallint, YEAR_ROUND varchar (1) ) CREATE TABLE Member ( Member_Number int, Last_Name varchar(30), First_Name varchar(12), Middle_Initial varchar(1), Generation varchar(3), Full_Name varchar(34), Nickname varchar(12), Office_Number int, Title varchar(4), Salutation varchar(24), Designations varchar(1), Care_of varchar(30), Street_Address varchar(30), City varchar(21), State varchar(2), Home_Zip_Code varchar(5), Home_Zip_Plus_4 varchar(4), MLS_ID varchar(12), Home_Phone_Area varchar(3), Home_Phone_Number varchar(7), Preferred_Mail varchar(1), Last_Modify_Date char(, Office_ID varchar(12), Personal_Fax_Area varchar(3), Personal_Fax_Phone varchar(7), ) CREATE TABLE Member_Association ( Member_Number int, Association_ID varchar (4), Member_Type_Code varchar (3), Status varchar (1), Status_Date char (, Last_Modify_Date char (, Online_Status varchar (1) ) CREATE TABLE MH ( LIST_NO int, AMENITIES varchar (22), APPLIANCES varchar (29), BASEMENT_FEATURE varchar (27), BEACH_DESCRIPTION varchar (13), BEACH_MILES_TO varchar (9), BEACH_OWNERSHIP varchar (9), BED2_DIMEN varchar (5), BED2_DSCRP varchar (39), BED2_LEVEL varchar (1), BED3_DIMEN varchar (5), BED3_DSCRP varchar (39), BED3_LEVEL varchar (1), BED4_DIMEN varchar (5), BED4_DSCRP varchar (39), BED4_LEVEL varchar (1), BED5_DIMEN varchar (5), BED5_DSCRP varchar (39), BED5_LEVEL varchar (1), BTH1_DIMEN varchar (5), BTH1_DSCRP varchar (39), BTH1_LEVEL varchar (1), BTH2_DIMEN varchar (5), BTH2_DSCRP varchar (39), BTH2_LEVEL varchar (1), BTH3_DIMEN varchar (5), BTH3_DSCRP varchar (39), BTH3_LEVEL varchar (1), COLOR varchar (10), CONSTRUCTION varchar (15), COOLING varchar (15), COOLING_ZONES tinyint, DIN_DIMEN varchar (5), DIN_DSCRP varchar (39), DIN_LEVEL varchar (1), ELECTRIC_FEATURE varchar (17), ENERGY_FEATURES varchar (17), EXTERIOR varchar (25), EXTERIOR_FEATURES varchar (53), FAM_DIMEN varchar (5), FAM_DSCRP varchar (39), FAM_LEVEL varchar (1), FLOORING varchar (19), FOUNDATION varchar (13), FOUNDATION_SIZE varchar (15), GARAGE_PARKING varchar (25), GARAGE_SPACES tinyint, HEATING varchar (41), HEAT_ZONES tinyint, HOA_FEE numeric(12, 2), HOME_OWN_ASSOCIATION varchar (1), HOT_WATER varchar (21), INSULATION_FEATURE varchar (21), INTERIOR_FEATURES varchar (21), KIT_DIMEN varchar (5), KIT_DSCRP varchar (39), KIT_LEVEL varchar (1), LAUNDRY_DIMEN varchar (5), LAUNDRY_DSCRP varchar (39), LAUNDRY_LEVEL varchar (1), LEAD_PAINT varchar (7), LIV_DIMEN varchar (5), LIV_DSCRP varchar (39), LIV_LEVEL varchar (1), LOT_DESCRIPTION varchar (23), MBR_DIMEN varchar (5), MBR_DSCRP varchar (39), MBR_LEVEL varchar (1), OTH1_DIMEN varchar (5), OTH1_DSCRP varchar (39), OTH1_LEVEL varchar (1), OTH1_ROOM_NAME varchar (13), OTH2_DIMEN varchar (5), OTH2_DSCRP varchar (39), OTH2_LEVEL varchar (1), OTH2_ROOM_NAME varchar (13), OTH3_DIMEN varchar (5), OTH3_DSCRP varchar (39), OTH3_LEVEL varchar (1), OTH3_ROOM_NAME varchar (13), OTH4_DIMEN varchar (5), OTH4_DSCRP varchar (39), OTH4_LEVEL varchar (1), OTH4_ROOM_NAME varchar (13), OTH5_DIMEN varchar (5), OTH5_DSCRP varchar (39), OTH5_LEVEL varchar (1), OTH5_ROOM_NAME varchar (13), OTH6_DIMEN varchar (5), OTH6_DSCRP varchar (39), OTH6_LEVEL varchar (1), OTH6_ROOM_NAME varchar (13), PARKING_FEATURE varchar (9), PARKING_SPACES smallint, REQD_OWN_ASSOCIATION varchar (1), ROAD_TYPE varchar (19), ROOF_MATERIAL varchar (17), SEWAGE_DISTRICT varchar (5), SEWER_AND_WATER varchar (15), STYLE varchar (35), TERMS_FEATURE varchar (13), UFFI varchar (1), UTILITY_CONNECTIONS varchar (17), WARRANTY varchar (1), WATERFRONT varchar (25), YEAR_ROUND varchar (1) ) CREATE TABLE Office ( Office_Number int, Office_Name varchar (30), MLS_Number varchar (12), Street_Care_of varchar (30), Street_Address varchar (30), Street_City varchar (21), Street_State varchar (2), Street_Zip_Code varchar (5), Street_Zip_Plus_4 varchar (4), Street_Country_Code varchar (2), Mail_Care_of varchar (30), Mail_Address varchar (30), Mail_City varchar (21), Mail_State varchar (2), Mail_Zip_Code varchar (5), Mail_Zip_Plus_4 varchar (4), Mail_Country_Code varchar (2), Office_Area_Code varchar (3), Office_Phone varchar (7), Fax_Area_Code varchar (3), Fax_Phone varchar (7), Responsible_Member int, Office_Contact_Member int, Main_Office_Number int, Last_Modify_Date char (, Long_Name varchar (100) ) CREATE TABLE Office_Association ( Association_ID varchar (4), Office_Number int, Office_Type varchar (4), Status varchar (1), Status_Date char (, Last_Modify_Date char (, Online_Status varchar (1) ) CREATE TABLE Open_Houses ( LIST_NO int, Comments varchar (500), Start_Date smalldatetime, End_Date smalldatetime, Duration int, DateModified smalldatetime ) CREATE TABLE PAll ( LIST_NO int, ACRE numeric(12, 2), ANT_SOLD_DATE smalldatetime, AREA varchar (3), ASSESSMENTS numeric(12, 0), BASEMENT varchar (1), BEACHFRONT_FLAG varchar (1), BLOCK varchar (6), BOOK varchar (6), BUYER_BROKER_COMP varchar (10), CERTIFICATE_NUMBER varchar (10), DIRECTION varchar (100), DISCLOSURE varchar (1), ENTRY_ONLY varchar (1), FIN_CODE tinyint, FIRE_PLACES tinyint, FIRM_RMK1 varchar (100), TEAM_MEMBER varchar (60), FRONTAGE numeric(12, 0), GRADE_SCHOOL varchar (15), HIGH_SCHOOL varchar (15), LISTING_AGREEMENT varchar (19), LIST_AGENT varchar (, LIST_DATE smalldatetime, LIST_DATE_RCVD smalldatetime, LIST_OFFICE varchar (6), LIST_PRICE numeric(12, 2), LOT varchar (6), MAIN_LO varchar (6), MAIN_SO varchar (6), MAP varchar (6), MASTER_BATH varchar (1), MIDDLE_SCHOOL varchar (15), NO_BEDROOMS smallint, NO_FULL_BATHS smallint, NO_HALF_BATHS smallint, NO_ROOMS smallint, OFF_MKT_DATE smalldatetime, ORIG_PRICE numeric(12, 2), OTHER_AGENT_COMP varchar (10), PAGE varchar (4), PARCEL_NUMBER varchar (36), PHOTO_COUNT smallint, PHOTO_DATE smalldatetime, PHOTO_MASK int, PROP_TYPE varchar (2), REMARKS varchar (500), SALE_AGENT varchar (, SALE_OFFICE varchar (6), SALE_PRICE numeric(12, 2), SELLER_DISCOUNT_PTS varchar (10), SELLING_BROKER_COMP varchar (10), SETTLED_DATE smalldatetime, SHOW_INSTRUCTION varchar (100), SOLD_VS_RENT varchar (2), SQUARE_FEET numeric(12, 0), SQUARE_FEET_SOURCE varchar (2), STATUS varchar (3), STATUS_DATE smalldatetime, STREET_NO varchar (10), STREET_NAME varchar (30), SUB_AREA varchar (4), TAX_YEAR varchar (4), TAXES numeric(12, 2), TOWN_NUM smallint, UPDATE_DATE smalldatetime, WATERFRONT_FLAG varchar (1), YEAR_BUILT smallint, YEAR_BUILT_DESCRP varchar (16), YEAR_BUILT_SOURCE varchar (2), ZIP_CODE varchar (5), ZIP_CODE_4 varchar (4), ZONING varchar (10), LISTING_ALERT varchar (1), ALERT_COMMENTS varchar (100), RENT_PRICE decimal(11, 2), NEIGHBORHOOD varchar (100), STREET_NUM int, ADULT_COMMUNITY varchar (1), DISCLOSURES varchar (100), EXCLUSIONS varchar (100), HOW_SHOWN_BB varchar (25), HOW_SHOWN_FB varchar (25), HOW_SHOWN_SB varchar (25), LOT_SIZE numeric(12, 2), SHOWINGS_DEFERRAL_DATE smalldatetime, SQUARE_FEET_OTHER numeric(12, 2), SUB_AGENCY_OFFERED varchar (1), SELLER_CONCESSIONS_AT_CLOSING numeric(12, 2), UNIT_NO varchar (11), MARKET_TIME_BROKER int, MARKET_TIME_PROPERTY int, SQUARE_FEET_INCL_BASE varchar (1), SQUARE_FEET_DISCLOSURES varchar (100), LENDER_OWNED char (1), SHORT_SALE_LENDER_APP_REQD char (1) ) CREATE TABLE RN ( LIST_NO int, AIR_CONDITION varchar (1), AMENITIES varchar (21), APPLIANCES varchar (30), BEACH_MILES_TO varchar (10), CONDO_ASSOCIATION varchar (1), COOP_COMP varchar (10), DEPOSIT_REQD varchar (1), EXTERIOR_FEATURES varchar (53), FOR_SALE varchar (1), HEATING varchar (10), INSURANCE_REQD varchar (1), INTERIOR_BLDG_FEAT varchar (15), LAST_MON_REQD varchar (1), LEAD_PAINT varchar (10), LEASE_TERMS varchar (6), PARKING_SPACES smallint, PETS_ALLOWED varchar (1), POSSESSION varchar (11), REFERENCES_REQD varchar (1), RENTAL_TERMS varchar (10), RENT_FEE_INCLUDES varchar (41), RN_TYPE varchar (1), SEC_DEPOSIT numeric(12, 0), TERM_OF_RENTAL varchar (6), UFFI varchar (1), UNIT_BUILDING varchar (11), UNIT_LEVEL tinyint, YEAR_ROUND varchar (1), FIRST_MON_REQD varchar (1) ) CREATE TABLE Reference_Updates ( table_name varchar (50), Updated smalldatetime ) CREATE TABLE SF ( LIST_NO int, AMENITIES varchar (22), APPLIANCES varchar (29), BASEMENT_FEATURE varchar (27), BEACH_DESCRIPTION varchar (13), BEACH_MILES_TO varchar (9), BEACH_OWNERSHIP varchar (9), BED2_DIMEN varchar (5), BED2_DSCRP varchar (39), BED2_LEVEL varchar (1), BED3_DIMEN varchar (5), BED3_DSCRP varchar (39), BED3_LEVEL varchar (1), BED4_DIMEN varchar (5), BED4_DSCRP varchar (39), BED4_LEVEL varchar (1), BED5_DIMEN varchar (5), BED5_DSCRP varchar (39), BED5_LEVEL varchar (1), BTH1_DIMEN varchar (5), BTH1_DSCRP varchar (39), BTH1_LEVEL varchar (1), BTH2_DIMEN varchar (5), BTH2_DSCRP varchar (39), BTH2_LEVEL varchar (1), BTH3_DIMEN varchar (5), BTH3_DSCRP varchar (39), BTH3_LEVEL varchar (1), COLOR varchar (10), CONSTRUCTION varchar (15), COOLING varchar (15), COOLING_ZONES tinyint, DIN_DIMEN varchar (5), DIN_DSCRP varchar (39), DIN_LEVEL varchar (1), ELECTRIC_FEATURE varchar (17), ENERGY_FEATURES varchar (17), EXTERIOR varchar (25), EXTERIOR_FEATURES varchar (53), FAM_DIMEN varchar (5), FAM_DSCRP varchar (39), FAM_LEVEL varchar (1), FLOORING varchar (19), FOUNDATION varchar (13), FOUNDATION_SIZE varchar (15), GARAGE_PARKING varchar (25), GARAGE_SPACES tinyint, HEATING varchar (41), HEAT_ZONES tinyint, HOA_FEE numeric(12, 2), HOME_OWN_ASSOCIATION varchar (1), HOT_WATER varchar (21), INSULATION_FEATURE varchar (21), INTERIOR_FEATURES varchar (21), KIT_DIMEN varchar (5), KIT_DSCRP varchar (39), KIT_LEVEL varchar (1), LAUNDRY_DIMEN varchar (5), LAUNDRY_DSCRP varchar (39), LAUNDRY_LEVEL varchar (1), LEAD_PAINT varchar (7), LIV_DIMEN varchar (5), LIV_DSCRP varchar (39), LIV_LEVEL varchar (1), LOT_DESCRIPTION varchar (23), MBR_DIMEN varchar (5), MBR_DSCRP varchar (39), MBR_LEVEL varchar (1), OTH1_DIMEN varchar (5), OTH1_DSCRP varchar (39), OTH1_LEVEL varchar (1), OTH1_ROOM_NAME varchar (13), OTH2_DIMEN varchar (5), OTH2_DSCRP varchar (39), OTH2_LEVEL varchar (1), OTH2_ROOM_NAME varchar (13), OTH3_DIMEN varchar (5), OTH3_DSCRP varchar (39), OTH3_LEVEL varchar (1), OTH3_ROOM_NAME varchar (13), OTH4_DIMEN varchar (5), OTH4_DSCRP varchar (39), OTH4_LEVEL varchar (1), OTH4_ROOM_NAME varchar (13), OTH5_DIMEN varchar (5), OTH5_DSCRP varchar (39), OTH5_LEVEL varchar (1), OTH5_ROOM_NAME varchar (13), OTH6_DIMEN varchar (5), OTH6_DSCRP varchar (39), OTH6_LEVEL varchar (1), OTH6_ROOM_NAME varchar (13), PARKING_FEATURE varchar (9), PARKING_SPACES smallint, REQD_OWN_ASSOCIATION varchar (1), ROAD_TYPE varchar (19), ROOF_MATERIAL varchar (17), SEWAGE_DISTRICT varchar (5), SEWER_AND_WATER varchar (15), SF_TYPE varchar (1), STYLE varchar (39), TERMS_FEATURE varchar (13), UFFI varchar (1), UTILITY_CONNECTIONS varchar (17), WARRANTY varchar (1), WATERFRONT varchar (25), YEAR_ROUND varchar (1) ) CREATE TABLE Status ( Short varchar (4), Long varchar (50), STAT_SORT int, CMA_Sort int ) CREATE TABLE Towns ( Number smallint, Long varchar (64), Board varchar (4), County varchar (4), Short varchar (4), TaxNum smallint, State char (2), Region tinyint ) CREATE TABLE Virtual_Tour_Reference ( TOUR_TYPE smallint, ICON varchar (255), TOOLTIP varchar (255) ) CREATE TABLE Virtual_Tours ( id int, LIST_NO int, TOUR_URL varchar (255), TOUR_TYPE smallint, UPDATE_DATE smalldatetime ) CREATE TABLE PAll_Coords ( List_no int, Lat decimal(11, 6), Long decimal(11, 6), Coord_Source varchar(4), Prop_Id int ) CREATE TABLE Teams ( id int, AgentId varchar (, TeamId varchar ( ) Error #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Long varchar (50), Town smallint, Mappable bit ) CREATE TABLE BU ( LIS' at line 3 Any advice would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/242753-syntax-errors/ Share on other sites More sharing options...
fenway Posted July 25, 2011 Share Posted July 25, 2011 Reserved keywords are a no-no. Quote Link to comment https://forums.phpfreaks.com/topic/242753-syntax-errors/#findComment-1246816 Share on other sites More sharing options...
Maq Posted July 25, 2011 Share Posted July 25, 2011 'Long' is a MySQL reserved word. I would suggest changing your column name since it hasn't been created yet. Otherwise, you have to use backticks `Long` wherever you reference it. http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html Quote Link to comment https://forums.phpfreaks.com/topic/242753-syntax-errors/#findComment-1246817 Share on other sites More sharing options...
Ninjakreborn Posted July 25, 2011 Author Share Posted July 25, 2011 Bah, this MLS system is killing me. I am trying to tap into an MLS and they have this database not setup right. I guess I will have to use Backticks, since I have to replicate the exact same data. So the keywords..I had a feeling, I already knew Long was a keyword..not sure why I didn't realize that to begin with. Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/242753-syntax-errors/#findComment-1246835 Share on other sites More sharing options...
Ninjakreborn Posted July 25, 2011 Author Share Posted July 25, 2011 CREATE TABLE Areas ( Short varchar (3), `Long` varchar (50), Town smallint, Mappable bit ) CREATE TABLE BU ( LIST_NO int, BASEMENT_FEATURE varchar (10), BLDG_SQ_FEET numeric(12, 0), BUILDING_CONSTRUCTION varchar (20), BUSINESS_HRS varchar (10), BU_TYPE varchar (1), DOCUMENTS_ON_FILE varchar (40), ELEVATOR varchar (1), EQUIP_LIST_AVAIL varchar (1), FACILITIES varchar (20), FORM varchar (10), GROSS_ANNUAL_EXP numeric(12, 0), GROSS_ANNUAL_INCOME numeric(12, 0), HANDICAP_ACCESS varchar (1), INVENTORY_AVAIL varchar (1), LOCATION varchar (30), NET_OPERATING_INC numeric(12, 0), NO_OF_DRIVING_DOORS tinyint, NO_OF_LOADING_DOCKS tinyint, NO_OF_RESTROOMS tinyint, OWNER_TRAINING varchar (1), PARKING_SPCS smallint, REAL_ESTATE_INCLD varchar (1), REAL_ESTATE_LN varchar (, REASON_FOR_SELL varchar (20), SPECIAL_FINANCING varchar (1), SPECIAL_LICENSES varchar (10), SYSTEM varchar (20), TENANT_EXPENSES varchar (30), TERMS_FEATURE varchar (20), TRAFFIC_COUNT int, UTILITIES varchar (30), ZONE_DESCRIPTION varchar (10) ) CREATE TABLE CC ( LIST_NO int, AMENITIES varchar (21), APPLIANCES varchar (29), ASSC_FEE_INCLUDES varchar (65), ASSC_POOL varchar (1), ASSOC_SECURITY varchar (13), BEACH_DESCRIPTION varchar (13), BEACH_MILES_TO varchar (9), BEACH_OWNERSHIP varchar (9), BED2_DIMEN varchar (5), BED2_DSCRP varchar (39), BED2_LEVEL varchar (1), BED3_DIMEN varchar (5), BED3_DSCRP varchar (39), BED3_LEVEL varchar (1), BED4_DIMEN varchar (5), BED4_DSCRP varchar (39), BED4_LEVEL varchar (1), BTH1_DIMEN varchar (5), BTH1_DSCRP varchar (39), BTH1_LEVEL varchar (1), BTH2_DIMEN varchar (5), BTH2_DSCRP varchar (39), BTH2_LEVEL varchar (1), CC_TYPE varchar (1), COMPLEX_COMPLETE varchar (1), CONDOMINIUM_NAME varchar (40), CONDO_ASSOCIATION varchar (1), CONSTRUCTION varchar (15), COOLING varchar (23), COOLING_ZONES tinyint, DIN_DIMEN varchar (5), DIN_DSCRP varchar (39), DIN_LEVEL varchar (1), DOCUMENTS_ON_FILE varchar (17), ELECTRIC_FEATURE varchar (17), ENERGY_FEATURES varchar (17), EXTERIOR varchar (25), EXTERIOR_UNIT_FEATURES varchar (53), FAM_DIMEN varchar (5), FAM_DSCRP varchar (39), FAM_LEVEL varchar (1), FLOORING varchar (19), GARAGE_PARKING varchar (25), GARAGE_SPACES tinyint, HEATING varchar (41), HEAT_ZONES tinyint, HOA_FEE numeric(12, 2), HOT_WATER varchar (19), INSULATION_FEATURE varchar (19), INTERIOR_FEATURES varchar (19), KIT_DIMEN varchar (5), KIT_DSCRP varchar (39), KIT_LEVEL varchar (1), LAUNDRY_DIMEN varchar (5), LAUNDRY_DSCRP varchar (39), LAUNDRY_LEVEL varchar (1), LEAD_PAINT varchar (7), LIV_DIMEN varchar (5), LIV_DSCRP varchar (39), LIV_LEVEL varchar (1), MANAGEMENT varchar (15), MASTER_BOOK varchar (6), MASTER_PAGE varchar (4), MBR_DIMEN varchar (5), MBR_DSCRP varchar (39), MBR_LEVEL varchar (1), NO_LIVING_LEVELS smallint, NO_UNITS smallint, NO_UNITS_OWNER_OCC smallint, OPTIONAL_FEE numeric(12, 2), OPT_FEE_INCLUDES varchar (63), OTH1_DIMEN varchar (5), OTH1_DSCRP varchar (39), OTH1_LEVEL varchar (1), OTH1_ROOM_NAME varchar (3), OTH1_ROOM_NAME_LONG varchar (13), OTH2_DIMEN varchar (5), OTH2_DSCRP varchar (39), OTH2_LEVEL varchar (1), OTH2_ROOM_NAME varchar (3), OTH2_ROOM_NAME_LONG varchar (13), OTH3_DIMEN varchar (5), OTH3_DSCRP varchar (39), OTH3_LEVEL varchar (1), OTH3_ROOM_NAME_LONG varchar (3), OTH3_ROOM_NAME varchar (13), OTH4_DIMEN varchar (5), OTH4_DSCRP varchar (39), OTH4_LEVEL varchar (1), OTH4_ROOM_NAME varchar (3), OTH4_ROOM_NAME_LONG varchar (13), OTH5_DIMEN varchar (5), OTH5_DSCRP varchar (39), OTH5_LEVEL varchar (1), OTH5_ROOM_NAME varchar (3), OTH5_ROOM_NAME_LONG varchar (13), OTH6_DIMEN varchar (5), OTH6_DSCRP varchar (39), OTH6_LEVEL varchar (1), OTH6_ROOM_NAME varchar (3), OTH6_ROOM_NAME_LONG varchar (13), OWNER_OCC_SOURCE varchar (11), PARKING_FEATURE varchar (15), PARKING_SPACES smallint, POOL_DESCRIPTION varchar (9), RESTRICTIONS varchar (9), ROOF_MATERIAL varchar (17), SEWAGE_DISTRICT varchar (5), SEWER_AND_WATER varchar (17), STYLE varchar (39), TERMS_FEATURE varchar (15), UFFI varchar (1), UNIT_BUILDING varchar (11), UNIT_LEVEL tinyint, UNIT_PLACEMENT varchar (16), UTILITY_CONNECTIONS varchar (17), WARRANTY varchar (1), WATERFRONT varchar (25), YEAR_CONVERTED smallint, YEAR_ROUND varchar (1), BED5_DIMEN varchar (5), BED5_DSCRP varchar (39), BED5_LEVEL varchar (1), BTH3_DIMEN varchar (5), BTH3_DSCRP varchar (39), BTH3_LEVEL varchar (1), PETS_ALLOWED varchar (1) ) CREATE TABLE CI ( LIST_NO int, ON_FILE_21E varchar (1), ASSC_FEE_INCLUDES varchar (65), ASSESSED_VALUE_BLDG numeric(12, 0), ASSESSED_VALUE_LAND numeric(12, 0), CEILING_HEIGHT tinyint, CI_TYPE varchar (1), CONDO_ASSOCIATION varchar (1), CONSTRUCTION varchar (15), DEPTH int, DIVIDABLE varchar (1), EASEMENTS varchar (1), ELEVATOR varchar (1), EXCHANGE varchar (1), EXPANDABLE varchar (1), GROSS_ANNUAL_EXP numeric(12, 0), GROSS_ANNUAL_INCOME numeric(12, 0), HANDICAP_ACCESS varchar (1), HOA_FEE numeric(12, 2), LEASE varchar (1), LEASE_PRICE_INCLUDES varchar (9), LEASE_TYPE varchar (3), LIEN_AND_ENCUMBENT varchar (1), LOCATION varchar (27), MAF_BLDG_SF numeric(12, 0), MAU_UNITS tinyint, MILL_RATE numeric(12, 2), NET_OPERATING_INC numeric(12, 0), NO_BUILDINGS smallint, NO_OF_DRIVING_DOORS tinyint, NO_OF_LOADING_DOCKS tinyint, NO_OF_RESTROOMS tinyint, NO_STORIES smallint, NO_UNITS smallint, OFF_BLDG_SF numeric(12, 0), OFU_UNITS tinyint, PARKING_FEATURE varchar (15), PARKING_SPACES smallint, PLAT_PLAN varchar (1), RAILROAD_SIDING varchar (1), REF_BLDG_SF numeric(12, 0), REU_UNITS smallint, ROOF_MATERIAL varchar (11), RSF_BLDG_SF numeric(12, 0), RSU_UNITS smallint, SITE_CONDITION varchar (13), SPACE_AVAILABLE varchar (5), SPECIAL_FINANCING varchar (1), SPRINKLERS varchar (1), SUBLET varchar (1), SUB_DIVIDABLE varchar (1), SURVEY varchar (1), TOTAL_ASSESSED_VALUE numeric(12, 0), TOTAL_BLDG_SF numeric(12, 0), TOTAL_UNITS smallint, TRAFFIC_COUNT int, UNDRGRND_TANK varchar (1), UTILITIES varchar (25), WAF_BLDG_SF numeric(12, 0), WAU_UNITS tinyint, ZONE_DESCRIPTION varchar (5) ) CREATE TABLE Counties ( Short varchar (4), `Long` varchar (50) ) CREATE TABLE Field_Reference ( id int, sf bit, cc bit, mf bit, ld bit, ci bit, bu bit, rn bit, Field varchar (32), Short varchar (3), Medium varchar (5), `Long` varchar (50), mh bit ) CREATE TABLE HISTORY_BULK( KeyId int, Change_Date smalldatetime, LIST_NO int, Old_Value varchar(64), New_Value varchar(64), Who varchar(12), Field varchar(50), Update_Date smalldatetime, Active_Flag bit ) CREATE TABLE IDX_Optout ( Office ID nvarchar (6), Opt_Out_Date smalldatetime, msrepl_tran_version uniqueidentifier ) CREATE TABLE IDX_Optout_Listings ( LIST_NO char (, msrepl_tran_version uniqueidentifier ) CREATE TABLE LD ( LIST_NO int, AMENITIES varchar (21), BEACH_DESCRIPTION varchar (13), BEACH_MILES_TO varchar (9), BEACH_OWNERSHIP varchar (9), CABLE_AVAILABLE varchar (1), CULTIVATION_ACRES numeric(12, 2), DEQE varchar (10), DOCUMENTS_ON_FILE varchar (42), ELECTRIC_FEATURE varchar (11), GAS varchar (9), HOA_FEE numeric(12, 2), HOME_OWN_ASSOCIATION varchar (1), IMPROVEMENTS varchar (20), LAND_DESC varchar (30), LD_TYPE varchar (1), NO_LOTS smallint, PASTURE_ACRES numeric(12, 2), PERC_TEST varchar (1), PERC_TEST_DATE smalldatetime, REQD_OWN_ASSOCIATION varchar (1), ROAD_TYPE varchar (32), SEWAGE_DISTRICT varchar (5), SEWER varchar (11), TIMBER_ACRES numeric(12, 2), WATER varchar (11), WATERFRONT varchar (26), ZONE_USAGE varchar ( ) CREATE TABLE MF ( LIST_NO int, AMENITIES varchar (21), APOD_AVAILABLE varchar (1), APP_COMMON varchar (29), APP_DSCRP_1 varchar (29), APP_DSCRP_2 varchar (29), APP_DSCRP_3 varchar (29), APP_DSCRP_4 varchar (29), BASEMENT_FEATURE varchar (27), BEACH_DESCRIPTION varchar (13), BEACH_MILES_TO varchar (9), BEACH_OWNERSHIP varchar (9), BEDRMS_1 tinyint, BEDRMS_2 tinyint, BEDRMS_3 tinyint, BEDRMS_4 tinyint, COLOR varchar (10), COL_COMMON varchar (23), COL_DSCRP_1 varchar (23), COL_DSCRP_2 varchar (23), COL_DSCRP_3 varchar (23), COL_DSCRP_4 varchar (23), CONSTRUCTION varchar (15), COOLING_UNITS tinyint, COOLING_ZONES tinyint, ELEC smallint, ELECTRIC_FEATURE varchar (23), ENERGY_FEATURES varchar (19), EXPENSES_SOURCE varchar (17), EXPENSES_YEAR_END varchar (5), EXTERIOR varchar (27), EXTERIOR_FEATURES varchar (55), FLOORING varchar (19), FLRS_1 tinyint, FLRS_2 tinyint, FLRS_3 tinyint, FLRS_4 tinyint, FOUNDATION varchar (13), FOUNDATION_SIZE varchar (15), FRPLCS_1 tinyint, FRPLCS_2 tinyint, FRPLCS_3 tinyint, FRPLCS_4 tinyint, F_BTHS_1 tinyint, F_BTHS_2 tinyint, F_BTHS_3 tinyint, F_BTHS_4 tinyint, GARAGE_SPACES tinyint, GOI int, GRE int, GSE smallint, HEAT_UNITS tinyint, HEAT_ZONES tinyint, HEA_COMMON varchar (41), HEA_DSCRP_1 varchar (41), HEA_DSCRP_2 varchar (41), HEA_DSCRP_3 varchar (41), HEA_DSCRP_4 varchar (41), HOT_WATER varchar (21), HTE smallint, H_BTHS_1 tinyint, H_BTHS_2 tinyint, H_BTHS_3 tinyint, H_BTHS_4 tinyint, IFE_COMMON varchar (31), IFE_DSCRP_1 varchar (31), IFE_DSCRP_2 varchar (31), IFE_DSCRP_3 varchar (31), IFE_DSCRP_4 varchar (31), INSC smallint, LEAD_PAINT varchar (7), LEASE_1 varchar (1), LEASE_2 varchar (1), LEASE_3 varchar (1), LEASE_4 varchar (1), LEVELS tinyint, LEVELS_1 tinyint, LEVELS_2 tinyint, LEVELS_3 tinyint, LEVELS_4 tinyint, LOT_DESCRIPTION varchar (23), MF_TYPE varchar (1), MGF smallint, MSE smallint, NOI int, NO_UNITS smallint, PARKING_FEATURE varchar (11), PARKING_SPACES smallint, RENT1 smallint, RENT2 smallint, RENT3 smallint, RENT4 smallint, RFS smallint, RME smallint, RMS_1 tinyint, RMS_2 tinyint, RMS_3 tinyint, RMS_4 tinyint, RMS_COMMON varchar (11), RMS_DSCRP_1 varchar (11), RMS_DSCRP_2 varchar (11), RMS_DSCRP_3 varchar (11), RMS_DSCRP_4 varchar (11), RNT_DSCRP_1 varchar (13), RNT_DSCRP_2 varchar (13), RNT_DSCRP_3 varchar (13), RNT_DSCRP_4 varchar (13), ROAD_TYPE varchar (19), ROOF_MATERIAL varchar (17), SEW smallint, SEWAGE_DISTRICT varchar (5), SEWER_AND_WATER varchar (17), TERMS_FEATURE varchar (13), TOTAL_BRS tinyint, TOTAL_FBH tinyint, TOTAL_FLRS tinyint, TOTAL_FRPLCS tinyint, TOTAL_HBH tinyint, TOTAL_LEVELS tinyint, TOTAL_RENT smallint, TOTAL_RMS tinyint, TOTAL_ROOMS tinyint, UFFI varchar (1), UTILITY_CONNECTIONS varchar (17), WARRANTY varchar (1), WATERFRONT varchar (25), WSE smallint, YEAR_ROUND varchar (1) ) CREATE TABLE Member ( Member_Number int, Last_Name varchar(30), First_Name varchar(12), Middle_Initial varchar(1), Generation varchar(3), Full_Name varchar(34), Nickname varchar(12), Office_Number int, Title varchar(4), Salutation varchar(24), Designations varchar(1), Care_of varchar(30), Street_Address varchar(30), City varchar(21), State varchar(2), Home_Zip_Code varchar(5), Home_Zip_Plus_4 varchar(4), MLS_ID varchar(12), Home_Phone_Area varchar(3), Home_Phone_Number varchar(7), Preferred_Mail varchar(1), Last_Modify_Date char(, Office_ID varchar(12), Personal_Fax_Area varchar(3), Personal_Fax_Phone varchar(7), ) CREATE TABLE Member_Association ( Member_Number int, Association_ID varchar (4), Member_Type_Code varchar (3), Status varchar (1), Status_Date char (, Last_Modify_Date char (, Online_Status varchar (1) ) CREATE TABLE MH ( LIST_NO int, AMENITIES varchar (22), APPLIANCES varchar (29), BASEMENT_FEATURE varchar (27), BEACH_DESCRIPTION varchar (13), BEACH_MILES_TO varchar (9), BEACH_OWNERSHIP varchar (9), BED2_DIMEN varchar (5), BED2_DSCRP varchar (39), BED2_LEVEL varchar (1), BED3_DIMEN varchar (5), BED3_DSCRP varchar (39), BED3_LEVEL varchar (1), BED4_DIMEN varchar (5), BED4_DSCRP varchar (39), BED4_LEVEL varchar (1), BED5_DIMEN varchar (5), BED5_DSCRP varchar (39), BED5_LEVEL varchar (1), BTH1_DIMEN varchar (5), BTH1_DSCRP varchar (39), BTH1_LEVEL varchar (1), BTH2_DIMEN varchar (5), BTH2_DSCRP varchar (39), BTH2_LEVEL varchar (1), BTH3_DIMEN varchar (5), BTH3_DSCRP varchar (39), BTH3_LEVEL varchar (1), COLOR varchar (10), CONSTRUCTION varchar (15), COOLING varchar (15), COOLING_ZONES tinyint, DIN_DIMEN varchar (5), DIN_DSCRP varchar (39), DIN_LEVEL varchar (1), ELECTRIC_FEATURE varchar (17), ENERGY_FEATURES varchar (17), EXTERIOR varchar (25), EXTERIOR_FEATURES varchar (53), FAM_DIMEN varchar (5), FAM_DSCRP varchar (39), FAM_LEVEL varchar (1), FLOORING varchar (19), FOUNDATION varchar (13), FOUNDATION_SIZE varchar (15), GARAGE_PARKING varchar (25), GARAGE_SPACES tinyint, HEATING varchar (41), HEAT_ZONES tinyint, HOA_FEE numeric(12, 2), HOME_OWN_ASSOCIATION varchar (1), HOT_WATER varchar (21), INSULATION_FEATURE varchar (21), INTERIOR_FEATURES varchar (21), KIT_DIMEN varchar (5), KIT_DSCRP varchar (39), KIT_LEVEL varchar (1), LAUNDRY_DIMEN varchar (5), LAUNDRY_DSCRP varchar (39), LAUNDRY_LEVEL varchar (1), LEAD_PAINT varchar (7), LIV_DIMEN varchar (5), LIV_DSCRP varchar (39), LIV_LEVEL varchar (1), LOT_DESCRIPTION varchar (23), MBR_DIMEN varchar (5), MBR_DSCRP varchar (39), MBR_LEVEL varchar (1), OTH1_DIMEN varchar (5), OTH1_DSCRP varchar (39), OTH1_LEVEL varchar (1), OTH1_ROOM_NAME varchar (13), OTH2_DIMEN varchar (5), OTH2_DSCRP varchar (39), OTH2_LEVEL varchar (1), OTH2_ROOM_NAME varchar (13), OTH3_DIMEN varchar (5), OTH3_DSCRP varchar (39), OTH3_LEVEL varchar (1), OTH3_ROOM_NAME varchar (13), OTH4_DIMEN varchar (5), OTH4_DSCRP varchar (39), OTH4_LEVEL varchar (1), OTH4_ROOM_NAME varchar (13), OTH5_DIMEN varchar (5), OTH5_DSCRP varchar (39), OTH5_LEVEL varchar (1), OTH5_ROOM_NAME varchar (13), OTH6_DIMEN varchar (5), OTH6_DSCRP varchar (39), OTH6_LEVEL varchar (1), OTH6_ROOM_NAME varchar (13), PARKING_FEATURE varchar (9), PARKING_SPACES smallint, REQD_OWN_ASSOCIATION varchar (1), ROAD_TYPE varchar (19), ROOF_MATERIAL varchar (17), SEWAGE_DISTRICT varchar (5), SEWER_AND_WATER varchar (15), STYLE varchar (35), TERMS_FEATURE varchar (13), UFFI varchar (1), UTILITY_CONNECTIONS varchar (17), WARRANTY varchar (1), WATERFRONT varchar (25), YEAR_ROUND varchar (1) ) CREATE TABLE Office ( Office_Number int, Office_Name varchar (30), MLS_Number varchar (12), Street_Care_of varchar (30), Street_Address varchar (30), Street_City varchar (21), Street_State varchar (2), Street_Zip_Code varchar (5), Street_Zip_Plus_4 varchar (4), Street_Country_Code varchar (2), Mail_Care_of varchar (30), Mail_Address varchar (30), Mail_City varchar (21), Mail_State varchar (2), Mail_Zip_Code varchar (5), Mail_Zip_Plus_4 varchar (4), Mail_Country_Code varchar (2), Office_Area_Code varchar (3), Office_Phone varchar (7), Fax_Area_Code varchar (3), Fax_Phone varchar (7), Responsible_Member int, Office_Contact_Member int, Main_Office_Number int, Last_Modify_Date char (, Long_Name varchar (100) ) CREATE TABLE Office_Association ( Association_ID varchar (4), Office_Number int, Office_Type varchar (4), Status varchar (1), Status_Date char (, Last_Modify_Date char (, Online_Status varchar (1) ) CREATE TABLE Open_Houses ( LIST_NO int, Comments varchar (500), Start_Date smalldatetime, End_Date smalldatetime, Duration int, DateModified smalldatetime ) CREATE TABLE PAll ( LIST_NO int, ACRE numeric(12, 2), ANT_SOLD_DATE smalldatetime, AREA varchar (3), ASSESSMENTS numeric(12, 0), BASEMENT varchar (1), BEACHFRONT_FLAG varchar (1), BLOCK varchar (6), BOOK varchar (6), BUYER_BROKER_COMP varchar (10), CERTIFICATE_NUMBER varchar (10), DIRECTION varchar (100), DISCLOSURE varchar (1), ENTRY_ONLY varchar (1), FIN_CODE tinyint, FIRE_PLACES tinyint, FIRM_RMK1 varchar (100), TEAM_MEMBER varchar (60), FRONTAGE numeric(12, 0), GRADE_SCHOOL varchar (15), HIGH_SCHOOL varchar (15), LISTING_AGREEMENT varchar (19), LIST_AGENT varchar (, LIST_DATE smalldatetime, LIST_DATE_RCVD smalldatetime, LIST_OFFICE varchar (6), LIST_PRICE numeric(12, 2), LOT varchar (6), MAIN_LO varchar (6), MAIN_SO varchar (6), MAP varchar (6), MASTER_BATH varchar (1), MIDDLE_SCHOOL varchar (15), NO_BEDROOMS smallint, NO_FULL_BATHS smallint, NO_HALF_BATHS smallint, NO_ROOMS smallint, OFF_MKT_DATE smalldatetime, ORIG_PRICE numeric(12, 2), OTHER_AGENT_COMP varchar (10), PAGE varchar (4), PARCEL_NUMBER varchar (36), PHOTO_COUNT smallint, PHOTO_DATE smalldatetime, PHOTO_MASK int, PROP_TYPE varchar (2), REMARKS varchar (500), SALE_AGENT varchar (, SALE_OFFICE varchar (6), SALE_PRICE numeric(12, 2), SELLER_DISCOUNT_PTS varchar (10), SELLING_BROKER_COMP varchar (10), SETTLED_DATE smalldatetime, SHOW_INSTRUCTION varchar (100), SOLD_VS_RENT varchar (2), SQUARE_FEET numeric(12, 0), SQUARE_FEET_SOURCE varchar (2), STATUS varchar (3), STATUS_DATE smalldatetime, STREET_NO varchar (10), STREET_NAME varchar (30), SUB_AREA varchar (4), TAX_YEAR varchar (4), TAXES numeric(12, 2), TOWN_NUM smallint, UPDATE_DATE smalldatetime, WATERFRONT_FLAG varchar (1), YEAR_BUILT smallint, YEAR_BUILT_DESCRP varchar (16), YEAR_BUILT_SOURCE varchar (2), ZIP_CODE varchar (5), ZIP_CODE_4 varchar (4), ZONING varchar (10), LISTING_ALERT varchar (1), ALERT_COMMENTS varchar (100), RENT_PRICE decimal(11, 2), NEIGHBORHOOD varchar (100), STREET_NUM int, ADULT_COMMUNITY varchar (1), DISCLOSURES varchar (100), EXCLUSIONS varchar (100), HOW_SHOWN_BB varchar (25), HOW_SHOWN_FB varchar (25), HOW_SHOWN_SB varchar (25), LOT_SIZE numeric(12, 2), SHOWINGS_DEFERRAL_DATE smalldatetime, SQUARE_FEET_OTHER numeric(12, 2), SUB_AGENCY_OFFERED varchar (1), SELLER_CONCESSIONS_AT_CLOSING numeric(12, 2), UNIT_NO varchar (11), MARKET_TIME_BROKER int, MARKET_TIME_PROPERTY int, SQUARE_FEET_INCL_BASE varchar (1), SQUARE_FEET_DISCLOSURES varchar (100), LENDER_OWNED char (1), SHORT_SALE_LENDER_APP_REQD char (1) ) CREATE TABLE RN ( LIST_NO int, AIR_CONDITION varchar (1), AMENITIES varchar (21), APPLIANCES varchar (30), BEACH_MILES_TO varchar (10), CONDO_ASSOCIATION varchar (1), COOP_COMP varchar (10), DEPOSIT_REQD varchar (1), EXTERIOR_FEATURES varchar (53), FOR_SALE varchar (1), HEATING varchar (10), INSURANCE_REQD varchar (1), INTERIOR_BLDG_FEAT varchar (15), LAST_MON_REQD varchar (1), LEAD_PAINT varchar (10), LEASE_TERMS varchar (6), PARKING_SPACES smallint, PETS_ALLOWED varchar (1), POSSESSION varchar (11), REFERENCES_REQD varchar (1), RENTAL_TERMS varchar (10), RENT_FEE_INCLUDES varchar (41), RN_TYPE varchar (1), SEC_DEPOSIT numeric(12, 0), TERM_OF_RENTAL varchar (6), UFFI varchar (1), UNIT_BUILDING varchar (11), UNIT_LEVEL tinyint, YEAR_ROUND varchar (1), FIRST_MON_REQD varchar (1) ) CREATE TABLE Reference_Updates ( table_name varchar (50), Updated smalldatetime ) CREATE TABLE SF ( LIST_NO int, AMENITIES varchar (22), APPLIANCES varchar (29), BASEMENT_FEATURE varchar (27), BEACH_DESCRIPTION varchar (13), BEACH_MILES_TO varchar (9), BEACH_OWNERSHIP varchar (9), BED2_DIMEN varchar (5), BED2_DSCRP varchar (39), BED2_LEVEL varchar (1), BED3_DIMEN varchar (5), BED3_DSCRP varchar (39), BED3_LEVEL varchar (1), BED4_DIMEN varchar (5), BED4_DSCRP varchar (39), BED4_LEVEL varchar (1), BED5_DIMEN varchar (5), BED5_DSCRP varchar (39), BED5_LEVEL varchar (1), BTH1_DIMEN varchar (5), BTH1_DSCRP varchar (39), BTH1_LEVEL varchar (1), BTH2_DIMEN varchar (5), BTH2_DSCRP varchar (39), BTH2_LEVEL varchar (1), BTH3_DIMEN varchar (5), BTH3_DSCRP varchar (39), BTH3_LEVEL varchar (1), COLOR varchar (10), CONSTRUCTION varchar (15), COOLING varchar (15), COOLING_ZONES tinyint, DIN_DIMEN varchar (5), DIN_DSCRP varchar (39), DIN_LEVEL varchar (1), ELECTRIC_FEATURE varchar (17), ENERGY_FEATURES varchar (17), EXTERIOR varchar (25), EXTERIOR_FEATURES varchar (53), FAM_DIMEN varchar (5), FAM_DSCRP varchar (39), FAM_LEVEL varchar (1), FLOORING varchar (19), FOUNDATION varchar (13), FOUNDATION_SIZE varchar (15), GARAGE_PARKING varchar (25), GARAGE_SPACES tinyint, HEATING varchar (41), HEAT_ZONES tinyint, HOA_FEE numeric(12, 2), HOME_OWN_ASSOCIATION varchar (1), HOT_WATER varchar (21), INSULATION_FEATURE varchar (21), INTERIOR_FEATURES varchar (21), KIT_DIMEN varchar (5), KIT_DSCRP varchar (39), KIT_LEVEL varchar (1), LAUNDRY_DIMEN varchar (5), LAUNDRY_DSCRP varchar (39), LAUNDRY_LEVEL varchar (1), LEAD_PAINT varchar (7), LIV_DIMEN varchar (5), LIV_DSCRP varchar (39), LIV_LEVEL varchar (1), LOT_DESCRIPTION varchar (23), MBR_DIMEN varchar (5), MBR_DSCRP varchar (39), MBR_LEVEL varchar (1), OTH1_DIMEN varchar (5), OTH1_DSCRP varchar (39), OTH1_LEVEL varchar (1), OTH1_ROOM_NAME varchar (13), OTH2_DIMEN varchar (5), OTH2_DSCRP varchar (39), OTH2_LEVEL varchar (1), OTH2_ROOM_NAME varchar (13), OTH3_DIMEN varchar (5), OTH3_DSCRP varchar (39), OTH3_LEVEL varchar (1), OTH3_ROOM_NAME varchar (13), OTH4_DIMEN varchar (5), OTH4_DSCRP varchar (39), OTH4_LEVEL varchar (1), OTH4_ROOM_NAME varchar (13), OTH5_DIMEN varchar (5), OTH5_DSCRP varchar (39), OTH5_LEVEL varchar (1), OTH5_ROOM_NAME varchar (13), OTH6_DIMEN varchar (5), OTH6_DSCRP varchar (39), OTH6_LEVEL varchar (1), OTH6_ROOM_NAME varchar (13), PARKING_FEATURE varchar (9), PARKING_SPACES smallint, REQD_OWN_ASSOCIATION varchar (1), ROAD_TYPE varchar (19), ROOF_MATERIAL varchar (17), SEWAGE_DISTRICT varchar (5), SEWER_AND_WATER varchar (15), SF_TYPE varchar (1), STYLE varchar (39), TERMS_FEATURE varchar (13), UFFI varchar (1), UTILITY_CONNECTIONS varchar (17), WARRANTY varchar (1), WATERFRONT varchar (25), YEAR_ROUND varchar (1) ) CREATE TABLE Status ( Short varchar (4), `Long` varchar (50), STAT_SORT int, CMA_Sort int ) CREATE TABLE Towns ( Number smallint, `Long` varchar (64), Board varchar (4), County varchar (4), Short varchar (4), TaxNum smallint, State char (2), Region tinyint ) CREATE TABLE Virtual_Tour_Reference ( TOUR_TYPE smallint, ICON varchar (255), TOOLTIP varchar (255) ) CREATE TABLE Virtual_Tours ( id int, LIST_NO int, TOUR_URL varchar (255), TOUR_TYPE smallint, UPDATE_DATE smalldatetime ) CREATE TABLE PAll_Coords ( List_no int, Lat decimal(11, 6), `Long` decimal(11, 6), Coord_Source varchar(4), Prop_Id int ) CREATE TABLE Teams ( id int, AgentId varchar (, TeamId varchar ( ) Added Backticks. That got me further, now it's throwing... Error #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE BU ( LIST_NO int, BASEMENT_FEATURE varchar (10), BLDG_SQ_FEET' at line 8 Any feedback? I have to replicate pretty much this same SQL structure. I am interfacing with an external MLS structure, and the field names/table names have to all be the same, unfortunately. So I had to work around the reserved keywords (backticks). Quote Link to comment https://forums.phpfreaks.com/topic/242753-syntax-errors/#findComment-1246839 Share on other sites More sharing options...
mikosiko Posted July 25, 2011 Share Posted July 25, 2011 CREATE TABLE Areas ( Short varchar (3), `Long` varchar (50), Town smallint, Mappable bit ); CREATE TABLE BU (.... ... missing ; to end each table create sentence. Quote Link to comment https://forums.phpfreaks.com/topic/242753-syntax-errors/#findComment-1246853 Share on other sites More sharing options...
wildteen88 Posted July 25, 2011 Share Posted July 25, 2011 End your table definitions with a semi-colon. In some of your table definitions you're using data types such 'smalldatetime' and 'uniqueidentifier' which do not exist in MySQL. Perhaps smalldatetime should be datetime. I guess uniqueidentifier should be int if its to be used as a foreign key? Quote Link to comment https://forums.phpfreaks.com/topic/242753-syntax-errors/#findComment-1246858 Share on other sites More sharing options...
fenway Posted July 25, 2011 Share Posted July 25, 2011 @wildteen88: long time no see! Quote Link to comment https://forums.phpfreaks.com/topic/242753-syntax-errors/#findComment-1246868 Share on other sites More sharing options...
wildteen88 Posted July 25, 2011 Share Posted July 25, 2011 @wildteen88: long time no see! I'm always helping in the PHP help board. I hardly post in here. Quote Link to comment https://forums.phpfreaks.com/topic/242753-syntax-errors/#findComment-1246871 Share on other sites More sharing options...
Ninjakreborn Posted July 26, 2011 Author Share Posted July 26, 2011 I finally got it moved over. I had to do it one table at a time, and make quite a few adjustments, but was able to get it all imported. Thanks again guys for the feedback. Quote Link to comment https://forums.phpfreaks.com/topic/242753-syntax-errors/#findComment-1247358 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.