Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assume that you have a product code that has the following format: XXXXNNN Where X is a character and N is a digit. Notice that
Assume that you have a product code that has the following format: XXXXNNN Where X is a character and N is a digit. Notice that the length of the character part is not fixed, it may range from 2 to 4 characters, while the length of the second part may range from 2 to 3 digits but the first digit from the left is always 0 (zero). Write a PL/SQL program to separate the code into its two parts as shown in the following example: if the input is ABC031, the output should be: Product Name is: ABC Serial Number is: 031 Hints: Use the following functions if needed: instr( string1, string2 [, start_position [, nth_appearance ]]) substr( string, start_position, [length]) length(string) DBMS_OUTPUT.PUT_LINEO
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started