From: Rob on 16 Jun 2010 13:45 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 16 Jun 2010 14:30 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 16 Jun 2010 14:39 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 16 Jun 2010 15:23 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 > > > . >
|
Pages: 1 Prev: Populate matching Data from another column into one Next: Update stored procedure question |