Query Analyzer - Prompting for a value

Posted on 2006-05-18
Last Modified: 2010-05-18
Hi Folks,

I need to write a script which will prompt the person running the script for their name.  Is this possible to do at all?

Thanks for any help,

Question by:Stuart_Johnson
    LVL 30

    Accepted Solution

    Not in query analyzer.

    Thwe simplest way I can think of to do this is:

    -A DTS package, but the user will require DTS runtimes on their PC


    -A batch file (which can prompt for a name then use OSQL to run your script). Again they need OSQL installed


    -VBScript which is has slightly more sophisiticated input and usually all the libraries required are installe by default on any windows PC

    LVL 28

    Expert Comment

    No query analyzer will not prompt for any user input. try using any other frontend application for that.
    LVL 6

    Author Comment

    Thanks for the info guys.  I figured as much.  I just needed confirmation to prove it.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    In this article—a derivative of my blog post (—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

    758 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