July 31, 2003 at 12:13 pm
Is there any way in DTS to export data in vertical text format. for example
There are three fields in the table Name,Address,Country and I want to export in following format.
Name : ABCD
Address : Ist street
Country : USA
Thanks in advance.
August 1, 2003 at 6:42 am
If you are thinking of exporting to a text file to make a mailing label, you could do that with ActiveX scripting in your DTS package. You may need the FSO to create your text file and write your output to the file.
Joseph
August 1, 2003 at 7:28 am
SELECT
'Name : '+[Name]+CHAR(13)+CHAR(10)+
'Address : '+Address+CHAR(13)+CHAR(10)+
'Country : '+Country+CHAR(13)+CHAR(10)
FROM tablea
Far away is close at hand in the images of elsewhere.
Anon.
August 1, 2003 at 1:55 pm
Thanks a lot. I tried select command but it seems to me that there is a limit using fields in the select command. I am using following syntax.
SELECT ' '+CHAR(13)+CHAR(10)+
'*** DOCUMENT BOUNDARY ***' +CHAR(13)+CHAR(10)+
'FORM=LDUSER'+CHAR(13)+CHAR(10)+
'.USER_ID. |'+'a'+convert(varchar(10),STU.[ID])+CHAR(13)+CHAR(10)+
'.USER_NAME. |'+'a'+LN+','+FN+CHAR(13)+CHAR(10)+
'.USER_LIBRARY. |'+'a'+convert(char(10),STU.SC)+CHAR(13)+CHAR(10)+
'.USER_CATEGORY1. |'+'a'+convert(char(5),STU.GR)+CHAR(13)+CHAR(10)+
'.USER_GROUP_ID. |'+'a'+MST.RM+CHAR(13)+CHAR(10)+
'.USER_ADDR1_BEGIN.'+CHAR(13)+CHAR(10)+
'.STREET. |'+'a'+STU.ST+CHAR(13)+CHAR(10)+
'.CITY/STATE. |'+'a'+STU.CY+','+STU.ST+CHAR(13)+CHAR(10)+
'.ZIP. |'+'a'+STU.ZC+CHAR(13)+CHAR(10)+
'.HOMEPHONE. |'+'a'+STU.TL+CHAR(13)+CHAR(10)+
'.USER_ADDR1_END.'+CHAR(13)+CHAR(10)+
'.USER_PROFILE. |'+'aSTUDENT'+CHAR(13)+CHAR(10)
FROM STU
JOIN SEC ON STU.SN = SEC.SN AND STU.SN = SEC.SN
JOIN MST ON SEC.SE = MST.SE
and the result I am getting is as follows:
*** DOCUMENT BOUNDARY ***
FORM=LDUSER
.USER_ID. |a171000618
.USER_NAME. |aWilkinson,Amanda
.USER_LIBRARY. |a710
.USER_CATEGORY1. |a8
.USER_GROUP_ID. |a
.USER_ADDR1_BEGIN.
.STREET. |aCA
.CITY/STATE. |aAntelope,CA
.Z
Its truncating everthing after the ZIP filed.
August 4, 2003 at 2:06 am
Are you extracting to variable output? If so there is a 255 byte limit per field. Try changing to fixed length
Far away is close at hand in the images of elsewhere.
Anon.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply