From: Rob on
I created a job with a simple T-SQL query and chose the output to be written
to a text file.

So while this job runs successfully, producing the desired result, it also
includes the following header:

Job 'Job1' : Step 1, 'Step1' : Began Executing 2010-06-16 13:25:22

Is there a way for this header to not be part of the output?

Thanks.
From: Rob on
Here's another follow up question:

The script simply select three fields from a table, that generats an output
similar to this:

MerID RFID TermID
---------------- --------- ---------------
300030154419 qVSDC&MSD FS3010426501
200020999987 qVSDC&MSD F4EMVP5057
200020999987 qVSDC&MSD F4EMVP5058

The user would also like to see the no column headers and no spaces in the
output. So essentially, they'd like to see the output as:

300030154419qVSDC&MSDFS3010426501
200020999987qVSDC&MSDF4EMVP5057
200020999987qVSDC&MSDF4EMVP5058

Any idea how I may be able to produce this output?

Thanks.

"Rob" wrote:

> I created a job with a simple T-SQL query and chose the output to be written
> to a text file.
>
> So while this job runs successfully, producing the desired result, it also
> includes the following header:
>
> Job 'Job1' : Step 1, 'Step1' : Began Executing 2010-06-16 13:25:22
>
> Is there a way for this header to not be part of the output?
>
> Thanks.
From: Bob Barrows on
Rob wrote:
> Here's another follow up question:
>
> The script simply select three fields from a table, that generats an
> output similar to this:
>
> MerID RFID TermID
> ---------------- --------- ---------------
> 300030154419 qVSDC&MSD FS3010426501
> 200020999987 qVSDC&MSD F4EMVP5057
> 200020999987 qVSDC&MSD F4EMVP5058
>
> The user would also like to see the no column headers and no spaces
> in the output. So essentially, they'd like to see the output as:
>
> 300030154419qVSDC&MSDFS3010426501
> 200020999987qVSDC&MSDF4EMVP5057
> 200020999987qVSDC&MSDF4EMVP5058
>
> Any idea how I may be able to produce this output?
>
err ... sorry, but this seems to be a simple concatenation to be done in
your query (spaces needing to be trimmed would make it slightly more
complicated requiring the use of RTRIM() ):

select MerID + RFID + TermID

If MerID is not a char field, you will have to cast it:
select cast(MerID as varchar(15)) +...

--
HTH,
Bob Barrows


From: Rob on
Thanks, Bob... I was drawing a blank.

"Bob Barrows" wrote:

> Rob wrote:
> > Here's another follow up question:
> >
> > The script simply select three fields from a table, that generats an
> > output similar to this:
> >
> > MerID RFID TermID
> > ---------------- --------- ---------------
> > 300030154419 qVSDC&MSD FS3010426501
> > 200020999987 qVSDC&MSD F4EMVP5057
> > 200020999987 qVSDC&MSD F4EMVP5058
> >
> > The user would also like to see the no column headers and no spaces
> > in the output. So essentially, they'd like to see the output as:
> >
> > 300030154419qVSDC&MSDFS3010426501
> > 200020999987qVSDC&MSDF4EMVP5057
> > 200020999987qVSDC&MSDF4EMVP5058
> >
> > Any idea how I may be able to produce this output?
> >
> err ... sorry, but this seems to be a simple concatenation to be done in
> your query (spaces needing to be trimmed would make it slightly more
> complicated requiring the use of RTRIM() ):
>
> select MerID + RFID + TermID
>
> If MerID is not a char field, you will have to cast it:
> select cast(MerID as varchar(15)) +...
>
> --
> HTH,
> Bob Barrows
>
>
> .
>