By using this table answer this question: Write ONE SQL statement which uses the SUBSTR function (as many times as you need to) to extract the following three words: ‘I’, ‘am’, ‘here’ from the string ‘Where am I?’ and put the three words together using a combination of the CONCAT function and the ||. E.g. The starting string used in the SQL statement is: ‘Where am I?’ The output of the SQL statement after we run it will be: TRANS ---------- I am here
By using this table answer this question: Write ONE SQL statement which uses the SUBSTR function (as many times as you need to) to extract the following three words: ‘I’, ‘am’, ‘here’ from the string ‘Where am I?’ and put the three words together using a combination of the CONCAT function and the ||. E.g. The starting string used in the SQL statement is: ‘Where am I?’ The output of the SQL statement after we run it will be: TRANS ---------- I am here
Chapter8: Sql Functions And Procedures
Section: Chapter Questions
Problem 6SCG
Related questions
Question
100%
By using this table answer this question:
- Write ONE SQL statement which uses the SUBSTR function (as many times as you need to) to extract the following three words: ‘I’, ‘am’, ‘here’ from the string
‘Where am I?’ and put the three words together using a combination of the CONCAT function and the ||.
E.g. The starting string used in the SQL statement is: ‘Where am I?’
The output of the SQL statement after we run it will be:
TRANS
----------
I am here
![JOB_HISTORY
JOBS
PF' EMPLOYEE_ID
P' START_DATE
* END_DATE
JOB_ID
DEPARTMENT_ID
P JOB_ID
* JOB_TITLE
MIN_SALARY
MAX_SALARY NUMBER (6)
NUMBER (0)
VARCHAR2 (10 BYTE)
VARCHAR2 (35 BYTE)
DATE
DATE
NUMBER (8)
VARCHAR2 (10 BYTE)
NUMBER (4)
JOB_ID_PK
O IDX_JOB_TITLE
JHIST_EMP_ID_ST_DATE_PK
O JHIST_JOB_IX
JHIST_EMPLOYEE_IX
O JHIST_DEPARTMENT_IX
DEPARTMENTS
DEPARTMENT_ID
DEPARTMENT_NAME
MANAGER_ID
NUMBER (4)
VARCHAR2 (30 BYTE)
F
NUMBER (8)
NUMBER (4)
EMPLOYEES
LOCATION_ID
EMPLOYEE_ID
FIRST_NAME
* LAST NAME
U' EMAIL
NUMBER (6)
VARCHAR2 (20 BYTE)
VARCHAR2 (25 BYTE)
VARCHAR2 (25 BYTE)
VARCHAR2 (20 BYTE)
DEPT_ID_PK
DEPT_LOCATION_IX
PHONE_NUMBER
HIRE_DATE
JOB_ID
SALARY
DATE
VARCHAR2 (10 BYTE)
LOCATIONS
NUMBER (8.2)
COMMISSION_PCT
F
MANAGER_ID
F
DEPARTMENT_ID
NUMBER (2.2)
NUMBER (8)
NUMBER (4)
LOCATION_ID
STREET_ADDRESS
POSTAL_CODE
* CITY
NUMBER (4)
VARCHAR2 (40 BYTE)
VARCHAR2 (12 BYTE)
STATE_PROVINCE
F
VARCHAR2 (30 BYTE)
VARCHAR2 (25 BYTE)
CHAR (2 BYTE)
EMP_EMAIL_UK
EMP_EMP_ID_PK
O EMP_DEPARTMENT_IX
O EMP_JOB_IX
O EMP_MANAGER_IX
O EMP_NAME_IX
O IDX SALARY
COUNTRY_ID
LOC_ID_PK
O LOC_CITY_IX
O LOC_STATE_PROVINCE_IX
O LOC_COUNTRY_Ix
Y--
EMP_DETAIL S_VIEW
COUNTRIES
NUMBER (6)
VARCHAR2 (1O)
EMPLOYEE_ID
COUNTRY_ID
CHAR (2 BYTE)
JOB_ID
MANAGER_ID
DEPARTMENT_ID
COUNTRY_NAME
VARCHAR2 (40 BYTE)
NUMBER (8)
F
REGION_ID
NUMBER
NUMBER (4)
COUNTRY_C_ID_PK
LOCATION_ID
COUNTRY_ID
FIRST_NAME
LAST_NAME
NUMBER (4)
CHAR (2)
VARCHAR2 (20)
VARCHAR2 (25)
NUMBER (8, 2)
SALARY
REGIONS
COMMISSION_PCT
DEPARTMENT_NAME VARCHAR2 (30)
JOB_TITLE
NUMBER (2, 2)
P REGION_ID
NUMBER
VARCHAR2 (35)
REGION_NAME
VARCHAR2 (25 BYTE)
VARCHAR2 (30)
VARCHAR2 (25)
VARCHAR2 (40)
VARCHAR2 (25)
CITY
REG_ID_PK
STATE_PROVINCE
COUNTRY_NAME
REGION_NAME](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1f1fd054-0c44-4879-b08e-425a6935829a%2Fec1f05f8-407e-406a-8e8b-d71feb437843%2Fzkwms6p_processed.png&w=3840&q=75)
Transcribed Image Text:JOB_HISTORY
JOBS
PF' EMPLOYEE_ID
P' START_DATE
* END_DATE
JOB_ID
DEPARTMENT_ID
P JOB_ID
* JOB_TITLE
MIN_SALARY
MAX_SALARY NUMBER (6)
NUMBER (0)
VARCHAR2 (10 BYTE)
VARCHAR2 (35 BYTE)
DATE
DATE
NUMBER (8)
VARCHAR2 (10 BYTE)
NUMBER (4)
JOB_ID_PK
O IDX_JOB_TITLE
JHIST_EMP_ID_ST_DATE_PK
O JHIST_JOB_IX
JHIST_EMPLOYEE_IX
O JHIST_DEPARTMENT_IX
DEPARTMENTS
DEPARTMENT_ID
DEPARTMENT_NAME
MANAGER_ID
NUMBER (4)
VARCHAR2 (30 BYTE)
F
NUMBER (8)
NUMBER (4)
EMPLOYEES
LOCATION_ID
EMPLOYEE_ID
FIRST_NAME
* LAST NAME
U' EMAIL
NUMBER (6)
VARCHAR2 (20 BYTE)
VARCHAR2 (25 BYTE)
VARCHAR2 (25 BYTE)
VARCHAR2 (20 BYTE)
DEPT_ID_PK
DEPT_LOCATION_IX
PHONE_NUMBER
HIRE_DATE
JOB_ID
SALARY
DATE
VARCHAR2 (10 BYTE)
LOCATIONS
NUMBER (8.2)
COMMISSION_PCT
F
MANAGER_ID
F
DEPARTMENT_ID
NUMBER (2.2)
NUMBER (8)
NUMBER (4)
LOCATION_ID
STREET_ADDRESS
POSTAL_CODE
* CITY
NUMBER (4)
VARCHAR2 (40 BYTE)
VARCHAR2 (12 BYTE)
STATE_PROVINCE
F
VARCHAR2 (30 BYTE)
VARCHAR2 (25 BYTE)
CHAR (2 BYTE)
EMP_EMAIL_UK
EMP_EMP_ID_PK
O EMP_DEPARTMENT_IX
O EMP_JOB_IX
O EMP_MANAGER_IX
O EMP_NAME_IX
O IDX SALARY
COUNTRY_ID
LOC_ID_PK
O LOC_CITY_IX
O LOC_STATE_PROVINCE_IX
O LOC_COUNTRY_Ix
Y--
EMP_DETAIL S_VIEW
COUNTRIES
NUMBER (6)
VARCHAR2 (1O)
EMPLOYEE_ID
COUNTRY_ID
CHAR (2 BYTE)
JOB_ID
MANAGER_ID
DEPARTMENT_ID
COUNTRY_NAME
VARCHAR2 (40 BYTE)
NUMBER (8)
F
REGION_ID
NUMBER
NUMBER (4)
COUNTRY_C_ID_PK
LOCATION_ID
COUNTRY_ID
FIRST_NAME
LAST_NAME
NUMBER (4)
CHAR (2)
VARCHAR2 (20)
VARCHAR2 (25)
NUMBER (8, 2)
SALARY
REGIONS
COMMISSION_PCT
DEPARTMENT_NAME VARCHAR2 (30)
JOB_TITLE
NUMBER (2, 2)
P REGION_ID
NUMBER
VARCHAR2 (35)
REGION_NAME
VARCHAR2 (25 BYTE)
VARCHAR2 (30)
VARCHAR2 (25)
VARCHAR2 (40)
VARCHAR2 (25)
CITY
REG_ID_PK
STATE_PROVINCE
COUNTRY_NAME
REGION_NAME
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![A Guide to SQL](https://www.bartleby.com/isbn_cover_images/9781111527273/9781111527273_smallCoverImage.gif)
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781305627482/9781305627482_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781285196145/9781285196145_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
![A Guide to SQL](https://www.bartleby.com/isbn_cover_images/9781111527273/9781111527273_smallCoverImage.gif)
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781305627482/9781305627482_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781285196145/9781285196145_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)