Can't able to store json string into sql. Please help!

Can’t able to store json string into sql. Please help

DECLARE @RiskJSON AS NVARCHAR(MAX)

SET @RiskJSON =‘{“risks”:{“address”:“N University Dr, Plantation, FL, 33322”,“location_type”:“ADDRESS”,“match_level”:“street”,“match_score”:0.86,“lat”:26.14715,“lng”:-80.25713,“state”:“FL”,“zip”:“33322”,“enhanced_wildfire”:{“score”:“A”,“text”:“Very Low”,“risk_scores”:{“base”:1,“composite”:9},“landcover_risk”:{“score”:0,“desc”:“Distance to significant wildfire fuel load risk”,“detail”:{“area_desc”:“Non-Interface/Non-Intermix”,“site_desc”:“Developed, Medium Intensity”},“proximate_landcover_areas”:},“katabatic_wind_risk”:{“score”:0,“name”:null,“desc”:“Not in a region prone to strong seasonal Katabatic winds”},“fire_season_precip_risk”:{“score”:8,“monthly_avg_precip”:3.146,“desc”:“Long run monthly average inches of precipitation during the fire season”},“wildfire_perimeter_risk”:{“score”:0,“desc”:“> 1 mile from historic wildfire perimeter”,“proximate_wildfire_perimeters”:},“vegetation_burn_site_risk”:{“score”:0,“within_half_mile”:0,“within_one_mile”:0,“desc”:“> 1 mile from vegetation burn(s) occurring over the last 4 years”}},“drought”:{“score”:null,“text”:null},“drought_frequency_index”:{“score”:“B”,“text”:“Low”,“pct”:“27.0%”,“desc”:“295 weeks of drought over the past 21 years”},“wind_region”:{“score”:“F”,“text”:“HazardHub Hurricane Prone Wind Region: Risk varies with location”,“text2”:null},“max_wind_params”:{“max_recorded_wind_mph”:50,“max_wind_scale”:5},“fire_protection”:{“score”:“A”,“text”:“Within Municipality & <= 1 Drive Miles from Fire Station”,“aais_proxy”:“P1”},“hh_fpc_code”:{“value”:“P1”},“enhanced_hh_pfs”:{“value”:“HH1”,“average_pct_loss”:0.2688,“estimated_loss_amt”:122462},“fire_suppression”:{“score”:104,“grade”:“A”,“category”:1,“text”:“Very Well Protected”},“aais_fire_protection_class_params”:{“class”:“P1, PROTECTED 1”,“hydrant_fire_station_distance”:"<= 1000’ from Hydrant or <= 1000’ from Perennial water & <= 1 Drive Miles from Fire Station",“available_water_type”:“Hydrant”},“perennial_water”:{“text”:“More than 1000 feet from Perennial Water”,“answer”:“no”,“name”:null},“municipal_boundary”:{“gid”:“17670”,“namelsad”:“Plantation city”,“type”:“Incorporated Place”,“placefp”:“04536”},“urbanicity”:{“type”:“Urbanized Area”,“name”:“Miami, FL Urbanized Area”,“desc”:“Settlements of 50,000 or more people”},“census_block”:{“geoid”:“120110605051001”,“state_fips_code”:“12”,“county_fips_code”:“011”,“tract”:“060505”,“block”:“1001”,“block_group”:“120110605051”},“state_county”:{“state”:“Florida”,“jurisdiction”:“Broward County”,“state_and_county_FIPS_code”:“12011”},“school_district”:{“name”:“Broward County School District”},“water_type”:{“value”:“Hydrant”},“hydrant”:{“score”:“A”,“text”:“< 250 Feet from Reported Hydrant”},“hydrant_params”:{“distance_from_nearest_hydrant”:“< 250 Feet”,“hydrants_within_1000_ft”:10},“cal_fire”:{“haz_code_local”:null,“haz_class_local”:null,“haz_code_state”:null,“haz_class_state”:null},“drive_distance_fire_station”:{“distance”:0.99,“units”:“miles”},“drive_time_fire_station”:{“duration”:2,“units”:“minutes”},“fire_station_type”:{“value”:“Full Time”},“number_of_fire_stations_within_10_miles”:66,“number_of_fire_stations_within_5_miles”:23,“nearest_fire_station”:{“title”:“Sunrise Fire And Rescue Station 59”,“lat”:26.158915,“lng”:-80.258743,“type”:“Full Time”,“response_area”:“Sunrise Fire And Rescue”,“units”:“miles”,“distance”:0.81,“drive_distance_fire_station”:{“distance”:0.99,“units”:“miles”},“drive_duration_value”:2,“drive_duration_units”:“minutes”},“nearest_fire_station_2”:{“title”:“Sunrise Fire And Rescue Station 39”,“lat”:26.154845,“lng”:-80.239273,“type”:“Full Time”,“response_area”:“Sunrise Fire And Rescue”,“units”:“miles”,“distance”:1.24,“drive_distance_fire_station”:{“distance”:1.61,“units”:“miles”},“drive_duration_value”:4,“drive_duration_units”:“minutes”},“nearest_fire_station_3”:{“title”:“Plantation Fire Department Station 5”,“lat”:26.133325,“lng”:-80.268263,“type”:“Blended”,“response_area”:“Plantation Fire And Rescue”,“units”:“miles”,“distance”:1.17,“drive_distance_fire_station”:{“distance”:1.78,“units”:“miles”},“drive_duration_value”:4,“drive_duration_units”:“minutes”},“fault_earthquake”:{“score”:“A”,“text”:“More than 20 Miles from Known Earthquake Fault”},“fracking_earthquake”:{“score”:null,“text”:null},“designated_fault”:{“score”:“A”,“text”:“Not in USGS Designated Eastern Fault Zone”},“earthquake”:{“score”:“A”,“text”:“No Damage”,“MMI”:“III-IV”,“shake”:“Weak”,“richter_scale”:“1.6-2.8”,“peak_ground_acceleration”:2},“soil_shear_velocity”:{“vs30”:215.4121,“units”:“m/s”},“mudslide_risk”:{“score”:null,“text”:null,“PCL”:null},“lava_flow”:{“score”:null,“text”:null,“zone”:null,“desc”:null},“tsunami”:{“score”:null,“text”:“”},“enhanced_hurricane_params”:{“score”:“F”,“scale”:39.5,“text”:“Very High Property Damage”,“total_events_since_1980”:156,“avg_wind_speed_knots”:50.69,“max_wind_speed_knots”:145,“avg_barometric_press_mb”:992.84,“min_barometric_press_mb”:922,“num_events_gt_50_knots”:62,“num_events_press_lt_950_mb”:13,“num_tropical_waves”:0,“num_disturbances”:12,“num_extratropical_systems”:9,“num_lows”:14,“num_subtropical_depressions”:0,“num_subtropical_storms”:0,“num_tropical_depressions”:12,“num_tropical_storms”:68,“num_hurricanes”:41,“num_cat_0_hurricanes”:0,“num_cat_1_hurricanes”:17,“num_cat_2_hurricanes”:10,“num_cat_3_hurricanes”:8,“num_cat_4_hurricanes”:3,“num_cat_5_hurricanes”:3,“name_year_max_wind”:“ANDREW 1992”,“name_year_min_press”:“ANDREW 1992”,“annual_chance_event_more_than_50_knots”:1.59,“annual_chance_event_less_than_950_mb”:0.33},“superfund”:{“score”:“D”,“text”:“1138 Feet from Superfund Site”,“site_name”:“MOTOROLA”,“address”:“8000 W SUNRISE BLVD, PLANTATION, FL, 33322”,“registry_number”:“110000621710”},“brownfield”:{“score”:null,“text”:null,“site_name”:null,“address”:null,“registry_number”:null},“pfa”:{“score”:null,“text”:null,“site_name”:null,“type”:null},“sinkhole”:{“score”:null,“text”:null,“distance”:{“value”:5.78,“units”:“miles”}},“sinkhole_ring_params”:{“ring_0_1_mile”:0,“cummulative_0_1_mile”:0,“ring_1_2_mile”:0,“cummulative_0_2_mile”:0,“ring_2_3_mile”:0,“cummulative_0_3_mile”:0,“ring_3_4_mile”:0,“cummulative_0_4_mile”:0,“ring_4_5_mile”:0,“cummulative_0_5_mile”:0},“sinkhole_risk_params”:{“sinkhole_susceptibility_grade”:“D”,“sinkhole_susceptibility_risk”:“High Risk of Sinkhole Occurrence”,“karst_type”:“Carbonate rocks at or near the land surface in a humid climate”,“climate”:“humid”,“rocktype”:“Limestone”,“closed_depression_grade”:null,“closed_depression_risk”:null,“sinkhole_point_grade”:null,“sinkhole_distance”:{“value”:5.78,“units”:“miles”}},“enhanced_wind_params”:{“score”:“D”,“text”:“High”,“scale”:42,“historical_wind_events”:{“wind_rad”:“95% chance of damaging wind occurrence in 10 years in a 1.4 mile radius”},“num_of_damaging_wind_incidents_within_25_miles_since_1996”:558,“count_within_25_miles_for_last_decade”:317,“nearest_wind_incident”:{“year”:“2012”,“type”:“Thunderstorm Wind”,“injuries”:“0”,“deaths”:“0”,“prop_dam”:“53.00K”,“crop_dam”:“0.00K”,“wind_spd”:“61.0”,“distance_miles”:1.08},“waddrisk”:0.118575,“wpctrisk”:“11.8575%”},“wind_ring_params”:{“ring_0_1_mile”:0,“cummulative_0_1_mile”:0,“ring_1_2_mile”:5,“cummulative_0_2_mile”:5,“ring_2_3_mile”:6,“cummulative_0_3_mile”:11,“ring_3_4_mile”:15,“cummulative_0_4_mile”:26,“ring_4_5_mile”:10,“cummulative_0_5_mile”:36},“enhanced_hail_params”:{“score”:“C”,“text”:“Moderate”,“scale”:41,“historical_hail_events”:{“hail_rad”:“95% chance of damaging hail occurrence in 10 years in 1.75 mile radius”},“num_of_damaging_hail_incidents_within_25_miles_since_1996”:408,“count_within_25_miles_for_last_decade”:205,“nearest_hail_incident”:{“year”:“2018”,“type”:“Hail”,“injuries”:“0”,“deaths”:“0”,“prop_dam”:null,“crop_dam”:null,“inches”:“0.75”,“distance_miles”:0.26},“haddrisk”:0.0867,“hpctrisk”:“8.67%”},“hail_ring_params”:{“ring_0_1_mile”:0,“cummulative_0_1_mile”:0,“ring_1_2_mile”:2,“cummulative_0_2_mile”:2,“ring_2_3_mile”:1,“cummulative_0_3_mile”:3,“ring_3_4_mile”:4,“cummulative_0_4_mile”:7,“ring_4_5_mile”:4,“cummulative_0_5_mile”:11},“convection_storm”:{“score”:“F”,“text”:“Very High”},“convection_storm_per_decade”:{“value”:“348”},“enhanced_tornado_params”:{“score”:“F”,“text”:“Very High”,“scale”:50,“historical_tornado_events”:{“tornado_rad”:“50% chance of damaging tornado occurrence in 10 years in 3.17 mile radius”},“num_of_damaging_tornado_incidents_within_25_miles_since_1996”:155,“count_within_25_miles_for_last_decade”:62,“nearest_tornado_incident”:{“year”:“2000”,“type”:“Tornado”,“injuries”:“0”,“deaths”:“0”,“prop_dam”:null,“crop_dam”:null,“fscale”:“F1”,“distance_miles”:1.62},“taddrisk”:0.032938,“tpctrisk”:“3.2938%”},“tornado_ring_params”:{“ring_0_1_mile”:0,“cummulative_0_1_mile”:0,“ring_1_2_mile”:2,“cummulative_0_2_mile”:2,“ring_2_3_mile”:1,“cummulative_0_3_mile”:3,“ring_3_4_mile”:3,“cummulative_0_4_mile”:6,“ring_4_5_mile”:3,“cummulative_0_5_mile”:9},“enhanced_lightning_params”:{“score”:“D”,“text”:“High”,“scale”:46,“lsqmi”:“95% chance of 34.164331 ground strikes in 1 year per square mile”,“laddrisk”:0.05338,“lpctrisk”:“5.33818%”,“strikes_yr”:“10727 ground lightning strikes within 10 miles last year”},“weather_params”:{“annual_average_days_less_than_0”:“0.0 Days”,“annual_average_days_less_than_10”:“0.0 Days”,“annual_average_days_less_than_20”:“0.0 Days”,“annual_average_days_more_than_40”:“365.0 Days”,“annual_average_days_more_than_50”:“365.0 Days”,“annual_fall_days_less_than_0”:“0.0 Days”,“annual_fall_days_less_than_10”:“0.0 Days”,“annual_fall_days_less_than_20”:“0.0 Days”,“annual_fall_days_less_than_32”:“0.0 Days”,“annual_spring_days_less_than_0”:“0.0 Days”,“annual_spring_days_less_than_10”:“0.0 Days”,“annual_spring_days_less_than_20”:“0.0 Days”,“annual_spring_days_less_than_32”:“0.0 Days”,“annual_winter_days_less_than_0”:“0.0 Days”,“annual_winter_days_less_than_10”:“0.0 Days”,“annual_winter_days_less_than_20”:“0.0 Days”,“annual_winter_days_less_than_40”:“2.8 Days”,“average_annual_precipitation”:“66.5 Inches”,“average_annual_temperature_max”:“83.3 Degrees F”,“average_annual_temperature_min”:“67.8 Degrees F”,“avg_num_days_below_32_degrees”:“0.0 Days”,“avg_num_winter_days_below_32_degrees”:“0.3 Days”,“cooling_degree_days”:“4041.0 Degrees F”,“fall_diurnal_range”:“14.2 Degrees F”,“fall_days_with_max_temp_less_than_32”:“0.0 Days”,“heating_degree_days”:“194.0 Degrees F”,“spring_days_with_max_temp_less_than_32”:“0.0 Days”,“spring_diurnal_range”:“15.9 Degrees F”,“winter_days_with_max_temp_less_than_32”:“0.0 Days”,“winter_diurnal_range”:“17.5 Degrees F”,“average_annual_snowfall”:“0.0 Inches”,“average_days_snowfall_greater_than_10_inches”:“0.0 Days”,“average_days_snowfall_greater_than_1_inch”:“0.0 Days”,“average_fall_snowfall”:“0.0 Inches”,“average_spring_snowfall”:“0.0 Inches”,“average_winter_snowfall”:“0.0 Inches”,“avg_days_snow_depth_above_10_in”:“0.0 Days”,“avg_days_snowfall_above_1_in”:“0.0 Days”,“fall_days_snow_depth_greater_than_10_inches”:“0.0 Days”,“fall_days_snow_depth_greater_than_1_inch”:“0.0 Days”,“fall_days_snow_depth_greater_than_3_inches”:“0.0 Days”,“fall_days_snow_depth_greater_than_5_inches”:“0.0 Days”,“spring_days_snow_depth_greater_than_10_inches”:“0.0 Days”,“spring_days_snow_depth_greater_than_1_inch”:“0.0 Days”,“spring_days_snow_depth_greater_than_3_inches”:“0.0 Days”,“spring_days_snow_depth_greater_than_5_inches”:“0.0 Days”,“winter_days_snow_depth_greater_than_10_inches”:“0.0 Days”,“winter_days_snow_depth_greater_than_1_inch”:“0.0 Days”,“winter_days_snow_depth_greater_than_3_inches”:“0.0 Days”,“winter_days_snow_depth_greater_than_5_inches”:“0.0 Days”},“hardiness”:{“avextmin”:“30 to 40 F”,“zone”:“10”,“avextmin5”:“35 to 40 F”,“zoneseg”:“10b”},“mold_index”:{“index”:5201.0,“score”:“F”,“text”:“Very High”},“ice_dam_index”:{“index”:0.3,“score”:“A”,“text”:“Very Low”},“frozen_pipe_index”:{“index”:0.3,“score”:“A”,“text”:“Very Low”},“hh_snow_load”:{“score”:“A”,“text”:“None”,“desc”:“Zero chance of structural roof failure due to snow load”,“scale”:0},“ground_snow_load”:{“score”:“A”,“text”:“Very Low”,“desc”:“0 days <= 1.0 lbs per sq foot is = 0”},“potential_maximum_precipitation”:“21.35 Inches”,“enhanced_hazardhub_flood”:{“score”:“F”,“text”:“Very High risk of flood damage”},“enhanced_hazardhub_flood_params”:{“dist”:1028,“elevnff”:7,“elev_pt”:7,“diff”:0,“lines_distance”:1028,“lines_diff”:0,“lines_score”:“F”,“lines_name”:null,“lines_descrip”:“Perennial Stream”,“polygons_distance”:null,“polygons_diff”:null,“polygons_score”:“A”,“polygon_type”:“Lake, Pond, Reservior, Other”,“polygon_name”:null,“polygon_descrip”:“Lake, Pond, Reservoir, Other”},“potential_catastrophic_precipitation”:“42.7 Inches”,“hazardhub_catastrophic_flood”:{“score”:“F”,“text”:“Very High risk of flood damage”},“hazardhub_catastrophic_flood_params”:{“cat_dist”:1028,“cat_elevnff”:7,“cat_elev_pt”:7,“cat_diff”:0,“cat_lines_distance”:1028,“cat_lines_diff”:0,“cat_lines_score”:“F”,“cat_lines_name”:null,“cat_lines_descrip”:“Perennial Stream”,“cat_polygons_distance”:2236,“cat_polygons_diff”:6,“cat_polygons_score”:“A”,“cat_polygon_type”:“Lake, Pond, Reservior, Other”,“cat_polygon_name”:null,“cat_polygon_descrip”:“Lake, Pond, Reservoir, Other”},“fema_all_flood”:{“score”:“D”,“text”:“Covered by FEMA digital maps. In 500 Year Floodplain”},“fema_all_flood_params”:{“dfirm_id”:“12011C”,“version_id”:“1.1.1.0”,“fld_ar_id”:“12011C_27358”,“study_typ”:“NP”,“fld_zone”:“X”,“zone_subty”:“0.2 PCT ANNUAL CHANCE FLOOD HAZARD”,“sfha_tf”:“F”,“static_bfe”:-9999,“v_datum”:null,“depth”:-9999,“len_unit”:null,“velocity”:-9999,“vel_unit”:null,“ar_revert”:null,“ar_subtrv”:null,“bfe_revert”:-9999,“dep_revert”:-9999,“dual_zone”:null,“source_cit”:“12011C_STUDY1”},“distance_to_significant_flood_params”:{“distance_to_100yr_floodplain”:“49 ft”,“elevation_in_feet”:{“value”:6.69},“elevation100”:“4.04 ft”,“elevation_difference_100”:“2.65 ft”},“fema_firm_date”:{“cid”:“120054”,“name”:“PLANTATION”,“type”:“CITY OF”,“initial_flood_hazard_bounday_map_id_date”:“6/28/1974”,“initial_firm_id_date”:“9/15/1977”,“current_effective_date_flood_map”:“8/18/2014”,“date_entered_program”:“9/15/1977”,“community_name”:“Plantation, City of”,“crs_entry_date”:“10/1/1992”,“current_effective_date”:“10/1/2020”,“current_class”:“7”,“percent_discount_for_sfha”:“15”,“percent_discount_for_non_sfha”:“5”,“status”:“C”},“fema_firm_panels”:{“firm_panel”:“12011C0345H”,“effective_date”:“2014/08/18”},“base_flood_elevation”:{“text”:“1.164 MILES from BFE = 7 feet”,“meter”:1874,“distance”:{“value”:1.1644464731289406,“units”:“miles”},“elevation”:{“value”:7.0,“units”:“feet”}},“fema_map_params”:{“fema_flood_map_url”:“FEMA Flood Map Service Center | Search By Address degrees”,“aspect”:“267.48 degrees”,“elevation”:“6.69 feet”},“aspect_risk”:{“aspect”:“267.48 degrees”,“score”:“F”,“direction”:“South”},“slope_risk”:{“slope”:“0.32 degrees”,“score”:“A”,“description”:“Flat to Very Low”},“wind_pool”:{“score”:null,“text”:null,“name”:null},“wind_born_debris”:{“score”:“F”,“text”:“180 MPH Wind Speed Zone”,“terrain”:“HVHZ”,“year_2001”:{“score”:“C”,“text”:“130 MPH Wind Speed Zone”},“year_2007”:{“score”:“C”,“text”:“130 MPH Wind Speed Zone”},“year_2010”:{“score”:“D”,“text”:“160 MPH Wind Speed Zone”},“year_2014”:{“score”:“F”,“text”:“170 MPH Wind Speed Zone”}},“mine_subsidence”:{“score”:null,“text”:null},“surge_max”:{“score”:“N/A”,“text”:“Not In SurgeMax Zone”,“category”:“N/A”,“potential_inundation_level”:“N/A”,“desc”:“N/A”,“category_4”:“N/A”,“potential_inundation_level_4”:“N/A”,“desc_4”:“N/A”,“category_3”:“N/A”,“potential_inundation_level_3”:“N/A”,“desc_3”:“N/A”,“category_2”:“N/A”,“potential_inundation_level_2”:“N/A”,“desc_2”:“N/A”,“category_1”:“N/A”,“potential_inundation_level_1”:“N/A”,“desc_1”:“N/A”},“coast_distance”:{“distance”:3.27,“units”:“miles”,“high_res_distance”:{“value”:3.27,“units”:“miles”},“low_res_distance”:{“value”:6.43,“units”:“miles”},“beach_distance”:{“value”:9.7,“units”:“miles”}},“sea_level_rise”:{“flood_at”:7,“text”:“Affected by a 7-foot rise in sea level.”},“murder”:{“score”:“A”,“text”:“Very low murder rate”,“value”:40},“forcible_rape”:{“score”:“A”,“text”:“Very low forcible rape rate”,“value”:39},“forcible_robbery”:{“score”:“B”,“text”:“Low forcible robbery rate”,“value”:44},“aggravated_assault”:{“score”:“B”,“text”:“Low aggravated assault rate”,“value”:45},“burglary”:{“score”:“C”,“text”:“Average burglary rate”,“value”:89},“larceny”:{“score”:“C”,“text”:“Average larceny rate”,“value”:84},“motor_vehicle_theft”:{“score”:“C”,“text”:“Average motor vehicle theft rate”,“value”:83},“crime”:{“score”:“B”,“text”:“Low crime rate”,“value”:61},“airport_noise”:{“decibels”:39,“score”:“C”,“text”:“Moderate”},“radon”:{“score”:“B”,“text”:“Predicted average indoor radon screening levels less than 2 pCi/L”},“landslide”:{“score”:null},“re_tier_counties”:{“value”:1},“premium_tax”:{“value”:true,“text”:null},“premium_tax_params”:{“prem_hh_id”:{“value”:“HH_8480”},“fips”:{“value”:“1201157425”},“county”:{“value”:“Broward”},“city”:{“value”:“Plantation”},“city_des”:{“value”:“City”},“auth_ta”:{“value”:“Florida State”},“fips_ta”:{“value”:“1200000000”},“fire_zone”:{“value”:“Plantation Fire District”},“tax_cd_1”:{“value”:“789”},“tax_cd_2”:{“value”:“789”},“dt_vint”:{“value”:“012018”},“gnis”:{“value”:“2404536”}},“premium_tax_ky”:{“value”:false,“text”:null},“premium_tax_ky_params”:{“county_prem_hh_id”:null,“county_name”:null,“county_fips”:null,“county_state”:null,“county_auth_ta”:null,“county_fips_ta”:null,“county_tax_cd_1”:null,“county_tax_cd_2”:null,“county_fire_per”:null,“county_cas_li_onl”:null,“county_vehicle”:null,“county_in_marine”:null,“county_health”:null,“county_life”:null,“county_all_others”:null,“county_min_tax”:null,“county_dt_vint”:null,“county_gnis”:null,“municipal_prem_hh_id”:null,“municipal_name”:null,“municipal_notes”:null,“municipal_state”:null,“municipal_county”:null,“municipal_fips”:null,“municipal_auth_ta”:null,“municipal_fips_ta”:null,“municipal_tax_cd_1”:null,“municipal_tax_cd_2”:null,“municipal_fire_per”:null,“municipal_cas_li_onl”:null,“municipal_vehicle”:null,“municipal_in_marine”:null,“municipal_health”:null,“municipal_life”:null,“municipal_all_others”:null,“municipal_min_tax”:null,“municipal_dt_vint”:null,“municipal_gnis”:null},“ust”:{“score”:“D”,“text”:“428 Feet from Underground Storage Tank Facility”},“ust_nearest”:{“fac_id”:{“value”:“8502367”},“name”:{“value”:“7-ELEVEN FOOD STORE #34766”},“address”:{“value”:“1799 N UNIV DR”},“state”:{“value”:“FL”},“city”:{“value”:“FORT LAUDERDALE”},“zipcode”:{“value”:“33322”},“num_tanks”:{“value”:“1”},“leaking”:{“value”:“Yes”},“residential”:{“value”:“N/A”}},“ust_tanks_num_in_quarter_mile_radius”:{“value”:7},“ust_tanks_num_in_half_mile_radius”:{“value”:13},“ust_tanks_num_in_1_mile_radius”:{“value”:25},“ust_nearest_leaking”:{“text”:“428 Feet from Leaking Underground Storage Tank Facility”,“fac_id”:{“value”:“8502367”},“name”:{“value”:“7-ELEVEN FOOD STORE #34766”},“address”:{“value”:“1799 N UNIV DR”},“state”:{“value”:“FL”},“city”:{“value”:“FORT LAUDERDALE”},“zipcode”:{“value”:“33322”},“num_tanks”:{“value”:“1”},“leaking”:{“value”:“Yes”},“residential”:{“value”:“N/A”}},“ust_facilities_leaking_quarter_mile_radius”:{“value”:2},“nuclear_site”:{“score”:“D”,“text”:“High”},“nuclear_site_nearest”:{“distance”:{“value”:48.77,“units”:“miles”},“name”:{“value”:“Turkey Point 3/4”},“type”:{“value”:“Power Plant”},“reactors”:{“value”:“2”}},“asbestos_sources_params”:{“score”:“A”,“desc”:“> 12 miles from known asbestos source”,“site_name”:null},“volcano”:{“score”:null,“text”:null},“volcano_nearest”:{“volcano_distance”:null,“volcano_name”:null,“volcano_status”:null,“volcano_elev”:null,“volcano_type”:null},“drug_alcohol_deaths”:{“score”:“B”,“text”:“LOW”},“drug_alcohol_deaths_deaths”:{“value”:“15282”},“drug_alcohol_deaths_score”:{“value”:“LOW”},“drug_alcohol_deaths_rate100k”:{“value”:“800.3”},“toxic_release_facilities”:{“score”:null,“text”:null},“toxic_release_facilities_params”:{“fac_id”:{“value”:null},“fed_id”:{“value”:null},“name”:{“value”:null},“address”:{“value”:null},“city”:{“value”:null},“state”:{“value”:null},“zipcode”:{“value”:null},“industry”:{“value”:null},“chemical”:{“value”:null},“carcinogen”:{“value”:null},“distance”:{“units”:null,“value”:null}},“clandestine_lab”:{“address”:“5320 Nw 17th Court”,“city”:“Lauderhill”,“state”:“FL”,“zip”:“33313”,“date”:“2004/09/24”,“distance”:“2.23 miles”,“number_within_5_miles”:2},“police_stations”:{“name”:“SUNRISE POLICE DEPARTMENT - EASTSIDE POLICE SUBSTATION”,“distance”:“1.19 miles”,“number_within_5_miles”:9},“tx_codes”:{“com”:null,“code”:null,“county”:null},“fl_codes”:{“name”:“Broward County”,“terr”:“037”},“fl_construction_line”:“OUT”,“hospital”:{“name”:“WESTSIDE REGIONAL MEDICAL CENTER”,“address”:“8201 W BROWARD BLVD”,“state”:“FL”,“type”:“GENERAL ACUTE CARE”,“helipad”:“Yes”,“distance”:“1.64 miles”,“number_of_hospitals_within_5_miles”:7,“number_of_hospitals_within_10_miles”:21},“urgent_care”:{“name”:“DOCTORS NOW”,“address”:“1368 NORTH UNIVERSITY DRIVE”,“state”:“FL”,“type”:“URGENT MEDICAL CARE CENTER”,“distance”:“0.31 miles”},“google_maps_url”:“https://www.google.com/maps/search/?api=1&query=26.147150,-80.257130"},“enhanced_property”:{“property”:{“address”:" N UNIVERSITY DR, SUNRISE, FL 33322”,“apn”:“49-41-28-00-0010”,“owner”:“BROWARD COUNTY BOARD OF COUNTY COMMISSIONERS”,“street_address”:" N UNIVERSITY DR",“use_code”:“Roadways”,“zip”:“33322”},“assessment”:{“Air_Conditioning”:null,“Air_Conditioning_Type”:null,“Amenities”:null,“Amenities_2”:null,“Assessed_Improvement_Value”:0,“Assessed_Land_Value”:311660,“Assessment_Year”:“2022”,“Assessors_Parcel_Number”:“49-41-28-00-0010”,“Basement”:null,“Building_Area”:0,“Building_Area_1”:0,“Building_Class”:null,“Building_Condition”:null,“Building_Quality”:null,“Condo_Project_Bldg_Name”:null,“Current_Owner_Name”:“BROWARD COUNTY BOARD OF COUNTY COMMISSIONERS”,“Fireplace”:null,“Garage_Cars”:0,“Garage_Type”:null,“Heating”:null,“LSale_Document_Number”:null,“LSale_Price”:null,“LSale_Price_Code”:null,“LSale_Recording_Date”:null,“LValid_Price”:null,“Legal_Brief_Description_FULL”:“DIST:2112 CITY/MUNI/TWP:SUNRISE SEC/TWN/RNG/MER:SEC 28 TWN 49S RNG 41E 28-49-41 POR OF SEC 28 DESC AS:COMM AT SE COR SEC 28,W 1900.26 TO POB,W 120.02,N 3819.11,NELY 441.74,NE 430.54,NELY 216.68,NE”,“Legal_Subdivision_Name”:null,“LotSize_Acres”:14.029,“LotSize_Depth_Feet”:“0”,“LotSize_Frontage_Feet”:“0”,“LotSize_Square_Feet”:611097,“Main_Building_Area_Indicator”:null,“N_of_Plumbing_Fixtures”:“0”,“Neighborhood_Code”:null,“No_of_Buildings”:0,“No_of_Stories”:null,“Number_of_Baths”:0,“Number_of_Bedrooms”:0,“Number_of_Partial_Baths”:0,“Number_of_Units”:0,“Owner1FirstName”:null,“Owner1LastName”:“BROWARD COUNTY BOARD OF COUNTY COMMISSIONERS”,“Owner2Firstname”:null,“Owner2LastName”:null,“Owner_Occupied”:null,“PSale_Price”:null,“Pool”:null,“Roof_Cover”:null,“Roof_Type”:null,“School_Tax_District_1”:null,“School_Tax_District_1_Indicator”:null,“School_Tax_District_2”:null,“School_Tax_District_2_Indicator”:null,“School_Tax_District_3”:null,“School_Tax_District_3_Indicator”:null,“Site_Influence”:null,“Standardized_Land_Use_Code”:“Road (Right-of-way)”,“Tax_Amount”:0,“Tax_Delinquent_Year”:null,“Tax_Rate_Code_Area”:“2112”,“Topography”:null,“Total_Assessed_Value”:311660,“Total_Market_Value”:311660,“Total_Number_of_Rooms”:“0”,“Type_Construction”:null,“Year_Built”:null,“tax_marketvalue”:311660},“mls_listing_record_details”:null,“listing_record”:null,“mortgage_info”:{“Current_Est_LTV_Combined”:“0.0000”,“Mtg01_Curr_Est_Bal”:null,“Mtg01_Loan_Amount”:null,“Mtg01_Title_Company_Name”:null,“Mtg01_lender_name_beneficiary”:null,“Mtg01_loan_type”:null,“Total_Open_Lien_Balance”:null},“valuation”:{“price_range_max”:588285,“price_range_min”:322893},“images”:},“replacement_cost_data”:{“cost_details”:{“structure_cost_range_low”:{“cost_per_sqft”:“$83.70”,“total_replacement_cost”:“$0.00”},“structure_cost_range_med”:{“cost_per_sqft”:“$93.00”,“total_replacement_cost”:“$0.00”},“structure_cost_range_high”:{“cost_per_sqft”:“$102.30”,“total_replacement_cost”:“$0.00”}},“construction_quality”:“Average”,“construction_type”:“Pole Frame”,“exterior”:“None”,“roof_covering”:“Shingles, Asphalt”,“year_built”:null}}’

Insert into RiskDetails ( Risk, BusinessAddressID)
values (@RiskJSON,22)

Error: Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword ‘from’.

Hi @iamhamzanasir

from the error it appears the JSON has “from” at multiple places which is not converted as a string and so SQL thinks it to be a keyword without proper syntax.

check if all the “from” are correctly escaped

hope this helps

@iamhamzanasir

The error is because of this aingle quotes…in sql…values are enclosed between single quotes…so it need to be escaped if used it in a string that you are passing…

So say the jaon string is stored in str variable use str.Replace("’","’’") this should solve it…single wuote is escaped used double single quotes…

Use the proper single quote as you have in your code

Cheers

still not solved

i have even replaced from with frm. still getting error

still not solved

@iamhamzanasir

After you replace the single quotes also it did not work?

another way to escape single quote is \' …try this as well if this works

If its oracle then i guess we need to use like this q'[Your original string]'

cheers

give a try at:

  • Serialize the JSON when storing
  • Deserialize the serialized JSON to String after retrieval when it is needed again

grafik