Avatar of vinit kumar
vinit kumar
 asked on

how to set column width in Sybase

Hello Experts

How to set the column width in sybase databse.I am looking for alternative of oracle alternative "column <column name> format a<width>" in Sybase.

Vinit kumar
Sybase Database

Avatar of undefined
Last Comment
Pawan Kumar

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Pawan Kumar

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
vinit kumar

ASKER
Thanks Pawan for reply
Changes using above command is temporary or permanent.?
I mean changes in width value will be lost as soon as I logout from sybase?
Pawan Kumar

Changes will be permanent.
vinit kumar

ASKER
Pawan,what will be the command for session specific setting as I don't want to change data default settings.
I need environment setting for so that output is displayed in good format.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Shery Vijayan

you can use left or right function or both  and specify the number of characters returned in the query  ..
or  try  using the sp_autoformat stored procedure provided by sybase .

sp_autoformat will dynamically resize columns  wrt to the largets value   ..
performance may be a concern if processing large result sets ..
SOLUTION
Pawan Kumar

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Pawan Kumar

Question abandoned.
Provided solution.