Possible in SQL?

Results 1 to 5 of 5

Thread: Possible in SQL?

  1. #1
    Join Date
    Dec 1969
    Posts
    417

    Default Possible in SQL?

    In looking at an SQL query to select the first 150 characters from a text field to create an "abstract" of a longer news article, I thought how much nicer it would be to return the nearest number of whole words to the 150 character count.<BR><BR>This would prevent the problem of truncating words in the news extract like:<BR><BR>"Here is an extract of a really fascinating news bul..."<BR><BR>I presume this would require identifying where the spaces were in the text, to choose where the most appropriate place to truncate the article would be.<BR><BR>1) Can SQL do this?<BR>2) Anyone up for discussing how to do this?<BR><BR>Thanks<BR>Ben

  2. #2
    Join Date
    Dec 1969
    Posts
    3,195

    Default What database are you using?

    .

  3. #3
    Join Date
    Dec 1969
    Posts
    417

    Default RE: What database are you using?

    I have Access and my new trial of MS SQL Server which I am still learning to use.

  4. #4
    Join Date
    Dec 1969
    Posts
    3,195

    Default Take a look at the following

    for SQL Server<BR><BR>http://www.sqlteam.com/item.asp?ItemID=2478


  5. #5
    Join Date
    Dec 1969
    Posts
    417

    Default Perfect

    Exactly what I was looking for.<BR>Thanks Pete!

Posting Permissions

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