Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!