forked from Fretwells/PropertyDatabase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFeature_sf.sql
73 lines (59 loc) · 2.25 KB
/
Feature_sf.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Create Procedure sf_InsertFeature
@TypeName VARCHAR(30),
@FeatureName VARCHAR(30),
@FeatureDescr VARCHAR(500)
As
Begin
Declare @FTypeID INT = (
Select FeatureTypeID
From tblFEATURE_TYPE
Where FeatureTypeName = @TypeName
)
Begin Transaction
Insert Into tblFeature(FeatureTypeID, FeatureName, FeatureDescr)
Values (@FTypeID, @FeatureName, @FeatureDescr)
Commit Transaction
End
Go
Delete From tblFEATURE
Exec sf_InsertFeature
@TypeName = 'Shared Space',
@FeatureName = 'Botanical garden',
@FeatureDescr ='A garden dedicated to the collection, cultivation, preservation and display of an especially wide range of plant'
Exec sf_InsertFeature
@TypeName = 'Shared Space',
@FeatureName = 'Nature park',
@FeatureDescr ='A designation for a protected natural area by means of long-term land planning, sustainable resource management and limitation of agricultural and real estate developments.'
Exec sf_InsertFeature
@TypeName = 'Shared Space',
@FeatureName = 'National park',
@FeatureDescr ='A natural park in use for conservation purposes, created and protected by national governments.'
Exec sf_InsertFeature
@TypeName = 'Crime',
@FeatureName = 'Carjacking',
@FeatureDescr ='a robbery in which the item taken over is a motor vehicle.'
Exec sf_InsertFeature
@TypeName = 'Crime',
@FeatureName = 'Homicide',
@FeatureDescr ='An act of a person killing another person.'
Exec sf_InsertFeature
@TypeName = 'Proximity',
@FeatureName = 'Parking lot',
@FeatureDescr ='A cleared area intended for parking vehicles.'
Exec sf_InsertFeature
@TypeName = 'Proximity',
@FeatureName = 'High school',
@FeatureDescr = 'High school is the education students receive in the final stage of secondary education'
Exec sf_InsertFeature
@TypeName = 'Proximity',
@FeatureName = 'Middle school',
@FeatureDescr = 'A school providing education between primary school and secondary school.'
Exec sf_InsertFeature
@TypeName = 'Proximity',
@FeatureName = 'Primary School',
@FeatureDescr ='A school for primary education of children who are five to eleven years of age'
Exec sf_InsertFeature
@TypeName = 'Proximity',
@FeatureName = 'University',
@FeatureDescr = 'An institution that provide college education for pupils age 18 and upwards'
Select * From tblFEATURE