Format text in SQL ACCEPT input box

Posted on 2009-04-20
Medium Priority
Last Modified: 2012-05-06
Here's the SQL statement:

ACCEPT LN PROMPT '(Required Entry) Enter all or part of LAST NAME to search:';

This places the entire prompt text on a single line in the input box. I want it to appear on two lines, like this:

Enter all or part of LAST NAME to search:
          (Required Entry)

How do I code it to do this?
Question by:Glenn Stearns
  • 2
  • 2
LVL 25

Accepted Solution

reb73 earned 2000 total points
ID: 24186164
Try -

ACCEPT LN PROMPT 'Enter all or part of LAST NAME to search:' + CHR(13) + CHR(10) + '(Required Entry)';

or try breaking the statement across two lines like this -

ACCEPT LN PROMPT 'Enter all or part of LAST NAME to search:
(Required Entry)';

LVL 27

Expert Comment

by:Chris Luttrell
ID: 24186481
Just curious, isn't this an Oracle SQL*Plus command?  I would love to have it in SQL Server but I don't see it anywhere.
LVL 25

Expert Comment

ID: 24186531
I believe this was incorrectly posted to the wrong zone (MS SQL Server) instead of Oracle..  There is no ACCEPT keyword in T-SQL..
LVL 27

Expert Comment

by:Chris Luttrell
ID: 24186710
That's what I thought.  Thanks.  (was hoping you knew a secret I didn't :)

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question