Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8196437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:28:41+00:00 2026-06-07T05:28:41+00:00

Well I am trying to run this script in PL/SQL. But I am constantly

  • 0

Well I am trying to run this script in PL/SQL. But I am constantly getting errors, I tried replacing single quotes with double quotes but no use.

ACCEPT p_name PROMPT "Enter Customer Name: "
VARIABLE g_output VARCHAR2(200)
DECLARE
   v_street VARCHAR2(30);
   v_city VARCHAR2(20);
   v_prov VARCHAR2(20);
   v_postal VARCHAR2(10);
BEGIN
   SELECT cstreet, ccity, cprov, cpostal
     INTO v_address,v_city,v_state,v_zip
     FROM customer
    WHERE cname = "&p_name";
   :g_output := "&p_name" || " " ||v_street || " " || v_city;
   :g_output := :g_output " " || v_prov || " " || v_postal;
END;
/
PRINT g_output

Error:

Enter Customer Name: Ankur Kaushal
old  10:     WHERE cname = "&p_name";
new  10:     WHERE cname = "Ankur Kaushal";
old  11:    :g_output := "&p_name" || " " ||v_street || " " || v_city;
new  11:    :g_output := "Ankur Kaushal" || " " ||v_street || " " || v_city;
   :g_output := :g_output " " || v_prov || " " || v_postal;
                          *
ERROR at line 12:
ORA-06550: line 12, column 27:
PLS-00103: Encountered the symbol " " when expecting one of the following:
. ( * @ % & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like
between || indicator multiset member SUBMULTISET_
The symbol "." was substituted for " " to continue.


Input truncated to 14 characters

G_OUTPUT
--------------------------------------------------------------------------------

Any mistake I am making here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:28:44+00:00Added an answer on June 7, 2026 at 5:28 am

    Shouldn’t the penultimate line be

      :g_output := :g_output || ' ' || v_prov || ' ' || v_postal; 
    

    ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well, I was trying to fix this program, and I keep getting the errors
I am trying to restore a DB using an SQL script, but things foreign
I'm trying to write a script for a Black Jack game but have run
I am trying to run the same code in this jsFiddle locally but I
Well im trying to write my own custom control extender but i can't get
Hi guys thanks for pay attention to this. Well im trying to replace every
Well I am trying to learn the java MVC pattern, but I can't understand
StackOverflow - I'm still trying to deploy this site, but with every problem I
StackOverflow - I'm still trying to deploy this site, but with every problem I
Trying to get a login script working, I kept getting the same login page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.