Skip to content

Commit 72842f5

Browse files
authored
Update scott.sql (#394)
Fixed script to address error that arises if the NLS_DATE_FORMAT is different. #360 Updated the license text to point to the updated link.
1 parent 181a080 commit 72842f5

File tree

1 file changed

+19
-23
lines changed

1 file changed

+19
-23
lines changed

schemas/scott.sql

+19-23
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,14 @@
1-
Rem Copyright (c) 2016 by Oracle Corporation
2-
Rem
3-
Rem You may not use the identified files except in compliance with The MIT
4-
Rem License (the "License.")
5-
Rem
6-
Rem You may obtain a copy of the License at
7-
Rem https://github.com/oracle/Oracle.NET/blob/master/LICENSE
8-
Rem
9-
Rem Unless required by applicable law or agreed to in writing, software
10-
Rem distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11-
Rem WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
Rem
13-
Rem See the License for the specific language governing permissions and
14-
Rem limitations under the License.
15-
Rem
161
Rem NAME
17-
REM scott.sql
2+
Rem scott.sql
183
Rem
194
Rem DESCRIPTION
205
Rem SCOTT is a database user whose schema is used for Oracle code demonstrations
21-
Rem Be sure to replace <PASSWORD> on lines 31 and 34 with your preferred password.
6+
Rem Be sure to replace <PASSWORD> on lines 12 and 15 with your preferred password.
227
Rem Historically, "tiger" has been SCOTT schema's password.
238
24-
259
SET TERMOUT OFF
2610
SET ECHO OFF
2711
28-
rem CONGDON Invoked in RDBMS at build time. 29-DEC-1988
29-
rem OATES: Created: 16-Feb-83
30-
3112
GRANT CONNECT,RESOURCE,UNLIMITED TABLESPACE TO SCOTT IDENTIFIED BY <PASSWORD>;
3213
ALTER USER SCOTT DEFAULT TABLESPACE USERS;
3314
ALTER USER SCOTT TEMPORARY TABLESPACE TEMP;
@@ -69,13 +50,13 @@ INSERT INTO EMP VALUES
6950
INSERT INTO EMP VALUES
7051
(7782,'CLARK','MANAGER',7839,to_date('9-6-1981','dd-mm-yyyy'),2450,NULL,10);
7152
INSERT INTO EMP VALUES
72-
(7788,'SCOTT','ANALYST',7566,to_date('13-JUL-87')-85,3000,NULL,20);
53+
(7788,'SCOTT','ANALYST',7566,to_date('13-07-87','dd-mm-rr')-85,3000,NULL,20);
7354
INSERT INTO EMP VALUES
7455
(7839,'KING','PRESIDENT',NULL,to_date('17-11-1981','dd-mm-yyyy'),5000,NULL,10);
7556
INSERT INTO EMP VALUES
7657
(7844,'TURNER','SALESMAN',7698,to_date('8-9-1981','dd-mm-yyyy'),1500,0,30);
7758
INSERT INTO EMP VALUES
78-
(7876,'ADAMS','CLERK',7788,to_date('13-JUL-87')-51,1100,NULL,20);
59+
(7876,'ADAMS','CLERK',7788,to_date('13-07-87','dd-mm-rr')-51,1100,NULL,20);
7960
INSERT INTO EMP VALUES
8061
(7900,'JAMES','CLERK',7698,to_date('3-12-1981','dd-mm-yyyy'),950,NULL,30);
8162
INSERT INTO EMP VALUES
@@ -104,3 +85,18 @@ COMMIT;
10485
10586
SET TERMOUT ON
10687
SET ECHO ON
88+
89+
Rem Copyright (c) 2016, 2024 by Oracle Corporation
90+
Rem
91+
Rem You may not use the identified files except in compliance with The MIT
92+
Rem License (the "License.")
93+
Rem
94+
Rem You may obtain a copy of the License at
95+
Rem https://github.com/oracle/dotnet-db-samples/blob/master/LICENSE.txt
96+
Rem
97+
Rem Unless required by applicable law or agreed to in writing, software
98+
Rem distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
99+
Rem WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
100+
Rem
101+
Rem See the License for the specific language governing permissions and
102+
Rem limitations under the License.

0 commit comments

Comments
 (0)