Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"trim" strings or sentences from text??

Status
Not open for further replies.

Rachel80

Programmer
May 25, 2000
63
GB
Sample coding: <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;cfquery name=&quot;approve&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;datasource=&quot;spg_DB&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dbtype=&quot;ODBC&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;select * from notice_table<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;where approval='Y'<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/cfquery&gt;<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;cfoutput&gt;&lt;a&nbsp;&nbsp;&nbsp;href=&quot;notice.cfmcode=#approve.notice_code#&quot;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#approve.notice_details#&nbsp;&nbsp;more...&lt;/a&gt;&lt;/cfoutput&gt;<br><br>my objective is to retrieve data(varchar(255)) from the database & display first few sentences ONLY. Upon clicking the link, displays another page with the whole details... But the aboved coding will display everything instead. How can I output the data to display only first 2 sentences? I can't use those trim string functions rite?<br>
 
oh i found a way of doing it..<br>by using the Left(string, count) function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top