-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSQL07Test.sql
More file actions
105 lines (88 loc) · 1.84 KB
/
SQL07Test.sql
File metadata and controls
105 lines (88 loc) · 1.84 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
--Jose Guadarrama
--10/23/2014
--1
Insert Into Guadarrama.Clients
Values(10016,
'Hubbard & Sons, LLC',
'111 Oxford Circle',
'Dover',
'DE',
'199010111',
175.00);
--2
Insert Into Guadarrama.Clients
Values(10017,
'Coastal Surf Shop',
'25 Coastal Way',
'Dewey Beach',
'DE',
'199710025',
425.25);
--3
Insert Into Guadarrama.Orders
Values(120031,
10003,
'2014-08-25',
1149.50,
'2014-08-29');
--4
Insert Into Guadarrama.Orders
Values(120032,
10007,
'2014-08-27',
1775.75,
'2014-08-29');
--5
Update Guadarrama.Clients
Set Name = Replace(Name,
'Co.',
'Company');
--6
Update Guadarrama.Clients
Set Name = Replace(Name,
'Inc.',
'Incorporated');
--7
Update Guadarrama.Clients
Set Name = Replace(Name,
'Corp.',
'Corporation');
--8
Update Guadarrama.Clients
Set Address = Replace(Address,
'Ave.',
'Avenue');
--9
Update Guadarrama.Clients
Set Address = Replace(Address,
'Blvd.',
'Boulevard');
--10
Update Guadarrama.Clients
Set Address = Replace(Address,
'Rd.',
'Road');
--11
Update Guadarrama.Clients
Set Address = Replace(Address,
'Hwy.',
'Highway');
--12
Update Guadarrama.Clients
Set Address = Trim(Address) Concat'-Oak Park'
Where ClientNo = 10013;
--13
Update Guadarrama.Orders
Set ShipDate = SaleDate + 3 Days
Where SaleDate Between '2014-08-01' And '2014-08-15';
--14
Update Guadarrama.Orders
Set InvoiceAmt = InvoiceAmt + (.05 * InvoiceAmt)
Where InvoiceAmt >= 1000;
--15
Delete From Guadarrama.Orders
Where OrderNo = 120013;
--16
Select * From Guadarrama.Clients;
--17
Select * From Guadarrama.Orders