Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: SQL Stateme...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 7 Topic 11031 of 11422
Post > Topic >>

Re: SQL Statement Problem : Separate long varchar into word seqments 35 chars long

by Erland Sommarskog <esquel@[EMAIL PROTECTED] > May 11, 2008 at 09:46 PM

jephperro (jeff.perreault@[EMAIL PROTECTED]
) writes:
> I'm having a really tough time with a SQL statement and I am wondering
> if someone is able to help out or point me in the right direction.
> 
> I have a table of names which can be very long.  These names get
> printed on envelopes.  The problem is the envelope can only hold 35
> characters per line.  I have to divide into 4 lines at most.
> 
> So I need to separate these long varchars into segments, no longer
> than 35 characters but preserving whole words.
 
T-SQL is definitely a poor choice for this sort of job. If you are on
SQL 2005, write a function in C# or VB .Net for the task. Probably
you should use the RegEx cl*****.

If you are on SQL 2000, try to find solutions client-side.


-- 
Erland Sommarskog, SQL Server MVP, esquel@[EMAIL PROTECTED]
 Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
 




 7 Posts in Topic:
SQL Statement Problem : Separate long varchar into word seqments
jephperro <jeff.perrea  2008-05-09 12:45:21 
Re: SQL Statement Problem : Separate long varchar into word seqm
Erland Sommarskog <esq  2008-05-11 21:46:20 
Re: SQL Statement Problem : Separate long varchar into word seqm
eisaacs@[EMAIL PROTECTED]  2008-05-12 17:33:26 
Re: SQL Statement Problem : Separate long varchar into word seqm
--CELKO-- <jcelko212@[  2008-05-13 12:13:30 
Re: SQL Statement Problem : Separate long varchar into word seqm
steve <rog11228@[EMAIL  2008-05-14 03:23:23 
Re: SQL Statement Problem : Separate long varchar into word seqm
steve <rog11228@[EMAIL  2008-05-16 19:18:06 
Re: SQL Statement Problem : Separate long varchar into word seqm
Ed Murphy <emurphy42@[  2008-05-19 23:08:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 21:03:05 CDT 2008.