Format text in SQL ACCEPT input box

Posted on 2009-04-20
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:glennes
    LVL 25

    Accepted Solution

    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 26

    Expert Comment

    by:Chris Luttrell
    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

    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 26

    Expert Comment

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

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now