ok, this is my quick hack to your problem. i already know that there is a
problem with it...if the word in the 6th position also occurs in an earlier
position, then your results are based on that one instead of the right one.
i don't have time right now to fix this, but felt compelled to give you
SOMETHING since i gave you the wrong info earlier when i read your e-mail
too quickly. i'm not great at parsing, so i'm sure someone else can give
you a better workaround. if they don't, i'll fix this later tonight when i
have more time. -emily
******************
<CFSET var="a long string of text from which i want to get six words.">
<CFSET VarLen=Len(var)>
<CFOUTPUT>
len of var: #varlen#
</CFOUTPUT>
<BR><BR>
<CFSET Var6WordsPosition=FindNoCase(GetToken(var, 7, " "), var)>
<CFOUTPUT>
position after 6th word (using a space as the delimeter): #Var6WordsPosition#
</CFOUTPUT>
<BR><BR>
<CFSET var6Words=RemoveChars(var, Var6WordsPosition, VarLen)>
<CFOUTPUT>
the six words: "#var6words#"
</CFOUTPUT>
*******************
oops...i mis-read...i though you wanted the first 6 chars. sorry. you'll
have to probably parse a little more....let me try it and i'll e-mail right
back. sorry for the extra posts, everyone. -emily
At 02:56 PM 4/10/2000 PDT, you wrote:
>HI,
>
>I have a varchar field size 255 in sql. I want to display only the first 6
>words in this field. How do I go about doing that?
>
>Thanks
>
>Sal
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
>---------------------------------------------------------------------------
---
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
>
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.