Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    65

    Unanswered: Creating mailing label using database

    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
    Last edited by Jigsatics; 12-15-05 at 14:19.

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Concatenate the various address components, separated by carriage return characters.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    65
    Could you please post a sample code?

    Thanks.
    Last edited by Jigsatics; 12-15-05 at 14:14.

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Code:
    select	Title + ' ' + FullName + char(13)
    	+ Address + Char(13)
    	+ 'Apt ' + Apt + char(13)
    	+ City + ', ' + Province + char(13)
    	+ PostalCode + Char(13)
    from	YourTable
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •