Query Analyzer equivalent to Oracle SQL*Plus

Posted on 2005-04-12
Last Modified: 2008-01-09
Would you happen to know what the equivalent is for the following Oracle SQL commands, if any?

set linesize 100
column description format a30    -- description is the name of a column

In other words, can we format the Query Analyzer output?

Question by:guillotj
    LVL 34

    Expert Comment

    by:Brian Crowe
    SELECT ..., CAST(description AS varchar(100)) AS description, ...
    LVL 68

    Accepted Solution

    Or, for the specific code shown above:

    SELECT CAST(description AS VARCHAR(30)), ...

    AFAIK, there is no SQL Server equivalent to Oracle's "linesize" option.  Therefore, the description will be truncated at 30 chars, not continued onto following line(s).

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    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.
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
    Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

    779 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

    15 Experts available now in Live!

    Get 1:1 Help Now