Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Generating Mailing Labels

Author  Topic 

jigsatics
Starting Member

18 Posts

Posted - 2005-12-14 : 17:27:29
Hi!

I have these tables:

DB1
MID
IIN
Title
FullName
Address
Apt
City
Province
PostalCode

DB2
MID
Lang
Version

How can I output a text file formatted like the one below?

(05) 01046 (F 05)
Mr. Sylvain Cote
123 Sesame Street
Apt 6
Charny, BC
L8T 5G6


where
(05)-MID
01046-IIN
(F 05) - Lang



$3.99/yr .COM!
http://www.greatdomains4less.com

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2005-12-14 : 20:33:13
It will be easier to generate mailing labels in your front end apps.

Or alternatively, you can also format your data into another table and use BCP or DTS to export to text file.

-----------------
[KH]

Learn something new everyday
Go to Top of Page

jigsatics
Starting Member

18 Posts

Posted - 2005-12-15 : 10:33:53
Hi!

Actually, we're only formatting it this way so the person who's checking the address can easily spot mistakes. My question is, can BCP format the table to look like the one above? I already set up a view that selects the records and displays the fields needed to generate the output.

I have done this in Access through report forms. Now, we're in the process of converting all of it to SQL Server. Is there a counterpart of Access report in SQL Server?

Thanks.

$3.99/yr .COM!
http://www.greatdomains4less.com
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-15 : 23:52:31
>>Is there a counterpart of Access report in SQL Server?

SQL Server Reporting Services

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -