|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Query Analyzer-Result to TextHi, I am trying to print the query result directly from the query analyzer. I
am having two probles. One - I can't find a way of changing the <untitled> title on the result, so I have to put it by hand. Is there a way of changing the title? Two - Some of the fields on the tables were created too wide, more than the should have been, so the result column are too wide for the data. Is there a way of narrowing the result columns? I would really appreciate any help I don't know how to change the title. I never print directly. I typically
use the grid and copy and paste to Excel. You can issue a CAST() in the select on the wide columns to make them as small as you want. -- Show quoteAndrew J. Kelly SQL MVP "HLong" <HL***@discussions.microsoft.com> wrote in message news:338E2DC7-46DD-4E06-A0CB-BB89B8C5C343@microsoft.com... > Hi, I am trying to print the query result directly from the query > analyzer. I > am having two probles. One - I can't find a way of changing the > <untitled> > title on the result, so I have to put it by hand. Is there a way of > changing > the title? Two - Some of the fields on the tables were created too wide, > more than the should have been, so the result column are too wide for the > data. Is there a way of narrowing the result columns? I would really > appreciate any help Thank you. CAST() works fine for some columns but not for all, specially
calculated columns. I tried (cast(columnA .....)*cast(columnB.....)) but it didn't work. Show quote "Andrew J. Kelly" wrote: > I don't know how to change the title. I never print directly. I typically > use the grid and copy and paste to Excel. You can issue a CAST() in the > select on the wide columns to make them as small as you want. > > -- > Andrew J. Kelly SQL MVP > > "HLong" <HL***@discussions.microsoft.com> wrote in message > news:338E2DC7-46DD-4E06-A0CB-BB89B8C5C343@microsoft.com... > > Hi, I am trying to print the query result directly from the query > > analyzer. I > > am having two probles. One - I can't find a way of changing the > > <untitled> > > title on the result, so I have to put it by hand. Is there a way of > > changing > > the title? Two - Some of the fields on the tables were created too wide, > > more than the should have been, so the result column are too wide for the > > data. Is there a way of narrowing the result columns? I would really > > appreciate any help > > > You should do the calculation first and then cast it. I thought you were
talking about character columns anyway. -- Show quoteAndrew J. Kelly SQL MVP "HLong" <HL***@discussions.microsoft.com> wrote in message news:061E730D-C6D1-4F64-BC0B-2F105F7E3203@microsoft.com... > Thank you. CAST() works fine for some columns but not for all, specially > calculated columns. I tried (cast(columnA .....)*cast(columnB.....)) but > it > didn't work. > > "Andrew J. Kelly" wrote: > >> I don't know how to change the title. I never print directly. I typically >> use the grid and copy and paste to Excel. You can issue a CAST() in the >> select on the wide columns to make them as small as you want. >> >> -- >> Andrew J. Kelly SQL MVP >> >> "HLong" <HL***@discussions.microsoft.com> wrote in message >> news:338E2DC7-46DD-4E06-A0CB-BB89B8C5C343@microsoft.com... >> > Hi, I am trying to print the query result directly from the query >> > analyzer. I >> > am having two probles. One - I can't find a way of changing the >> > <untitled> >> > title on the result, so I have to put it by hand. Is there a way of >> > changing >> > the title? Two - Some of the fields on the tables were created too >> > wide, >> > more than the should have been, so the result column are too wide for >> > the >> > data. Is there a way of narrowing the result columns? I would really >> > appreciate any help >> >> >> |
|||||||||||||||||||||||