USE SamanDB2 GO --آیدی درخواستی که اطلاعات کنترل نقشه ان وارد شده است را به واسطه ی سلکت زیر گرفته و در شرط افزودن اطلاعات نقشه اضافه کنید SELECT r.id,r.requestTypeValue,r.requestType FROM Request r WHERE r.requestNo=42894 --آیدی شماره درخواستی که باید اطلاعات کنترل نقشه به ان اضافه شود SELECT r.id,r.requestTypeValue,r.requestType FROM Request r WHERE r.requestNo=30057 INSERT INTO MapControlUsage ( id, created_by, creation_timestamp, DELETED, modification_timestamp, modified_by, actual_area, addition_to_density_area, addition_to_next_area, addition_to_surface_area, age_from, age_to, building_number, building_status, building_type, change_condition, change_usage_area, conversation_date, development_percent, first_depth_area, first_depth_count, FLOOR, frontage_type, mouth_average, occupied_surface, ferry_no_licensed_building_area, primary_mass_distance, primary_usage, roof_thickness, roof_type, second_depth_area, second_depth_count, secondary_mass_distance, secondary_usage, structure_type, third_depth_area, third_depth_count, unit_count, unit_number, usage_area, usage_create_date, usage_depth, usage_status, useful_height, wall_type, without_permit_area, valid_usage, requestId, isAvailable, consolearea, consoleareaExtra, consoleopenarea, consoleyard, areahighquality, areasurplusfloor, heightoffloors, avaragefloorlevel, HistoryMunicipality, HistoryEngineering, RowNumber, RelatedRowNumber, ProcessedArea, ProcessedUnitCount, ProcessedSecondaryUsage, ProcessedUsefulHeight, changestDate) VALUES(SELECT newid(), created_by, creation_timestamp, DELETED, modification_timestamp, modified_by, actual_area, addition_to_density_area, addition_to_next_area, addition_to_surface_area, age_from, age_to, building_number, building_status, building_type, change_condition, change_usage_area, conversation_date, development_percent, first_depth_area, first_depth_count, FLOOR, frontage_type, mouth_average, occupied_surface, ferry_no_licensed_building_area, primary_mass_distance, primary_usage, roof_thickness, roof_type, second_depth_area, second_depth_count, secondary_mass_distance, secondary_usage, structure_type, third_depth_area, third_depth_count, unit_count, unit_number, usage_area, usage_create_date, usage_depth, usage_status, useful_height, wall_type, without_permit_area, valid_usage, '3948D066-945B-45FB-9349-B4AE596CC1E6'*/ایدی سلکت دوم در این قسمت گذاشته شود/*, isAvailable, consolearea, consoleareaExtra, consoleopenarea, consoleyard, areahighquality, areasurplusfloor, heightoffloors, avaragefloorlevel, HistoryMunicipality, HistoryEngineering, RowNumber, RelatedRowNumber, ProcessedArea, ProcessedUnitCount, ProcessedSecondaryUsage, ProcessedUsefulHeight, changestDate FROM MapControlUsage mcu WHERE mcu.requestId='B231804B-0ACA-4799-B900-4FAD78D0CFD0');-- ایدی سلکت اول در اینجا جایگزاری شود