Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CREATE TABLE STORE ( StoreID Int NOT NULL, StoreName Char(50) NOT NULL, City Char(35) NOT NULL, Country Char(50) NOT NULL, Phone Char(16) NOT NULL, Fax

CREATE TABLE STORE (

StoreID Int NOT NULL,

StoreName Char(50) NOT NULL,

City Char(35) NOT NULL,

Country Char(50) NOT NULL,

Phone Char(16) NOT NULL,

Fax Char(16) NULL,

Email Char(100) NULL,

Contact Char(50) NOT NULL,

CONSTRAINT Store_PK PRIMARY KEY(StoreID),

CONSTRAINT StoreCountry CHECK

(Country IN ('Hong Kong', 'India',

'Japan', 'Peru','Philippines', 'Singapore',

'United States'))

);

SELECT StoreName, City, Country, Email, StoreContactAndPhone(Contact, Phone) AS ContactData FROM STORE;

create or replace FUNCTION StoreContactAndPhone (StoreContact IN CHAR, ContactPhone IN CHAR) RETURN VARCHAR IS ContactData VARCHAR(60);

BEGIN ContactData := (RTRIM(StoreContact) || ': ' || RTRIM(ContactPhone)); RETURN ContactData; END;

ORA-06502: PL/SQL: numeric or value error: character to number conversion error ORA-06512: at "STORECONTACTANDPHONE", line 9 ORA-06512: at line 9

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions