[AccessD] Concatenating Fields In SQL Stored Procedure Or SQL View

David Emerson davide at dalyn.co.nz
Mon Feb 16 13:00:37 CST 2004


Paul,

Were do you want the information to appear (in a sproc, in a spreadsheet ?)

How are you extracting the data at the moment?

Regards

David Emerson
Dalyn Software Ltd
25 Cunliffe St, Churton Park
Wellington, New Zealand
Ph/Fax (877) 456-1205


At 16/02/2004, you wrote:
>To all,
>
>I have a table in SQL Server 7.0 called tblClient with the following 
>fields of information:
>             BranchNo
>             BranchCode
>             ClientName
>             Addrs1
>             Addrs2
>             District
>             Town
>             County
>             Postcode
>             Telephone
>
>I want the following fields ClientName, Addrs1, Addrs2, District, Town, 
>County, Postcode to appear as one line separated by a comma like below
>
>BranchNo           BranchCode       Address
>9999029            B&Q9999029      ClientName, Addrs1, District, Town, 
>Postcode
>
>As you can se from the example Addrs2 and County are missing, this is 
>because these are blank sometimes.  I have tried a couple of ways but 
>always end up with the following
>
>BranchNo           BranchCode       Address
>9999029            B&Q9999029      ClientName, Addrs1, , District, Town, , 
>Postcode
>
>As you can see where the missing fields are the comma’s still appear.  Any 
>help on this will be gratefully received.
>
>Paul Hartland
>Freeserve AnyTime - HALF PRICE for the first 3 months - Save £7.50 a month
>www.freeserve.com/anytime
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com




More information about the AccessD mailing list