• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 489
  • Last Modified:

Query Analyzer equivalent to Oracle SQL*Plus

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?

1 Solution
Brian CroweCommented:
SELECT ..., CAST(description AS varchar(100)) AS description, ...
Scott PletcherSenior DBACommented:
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).

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now