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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trim function

Status
Not open for further replies.

achai

MIS
May 23, 2000
71
US
database--table1--field1---&quot;dalla - denver&quot;<br>database--table2--field1<br>--------------------------<br>&lt;cfquery datasource=.. name=&quot;form&quot;&gt;<br>select table1.field1, table1.&nbsp;&nbsp;...table2.field1...<br>from table1 table2<br>where .......<br>order by table2...<br>&lt;/cfquery&gt;<br><br>&lt;cfoutput query=&quot;form&quot;&gt;<br>&lt;form&gt;&lt;input type=&quot;text&quot; value=#trim(table1.field1)# name=&quot;field1&quot;&gt;&lt;/form&gt;<br>-------------------------<br>in this form, only shows up &quot; dalla&quot; not &quot;dalla - denver&quot;.<br>how can i resolve this problem. no matter i add or delete trim, it still only shows &quot;dalla&quot;<br>
 
Very simple and done this plenty of times myself...You need quotes around<br>the value if it contains spaces...<br><br>&lt;cfoutput query=&quot;form&quot;&gt;<br>&lt;form&gt;&lt;input type=&quot;text&quot; value=&quot;#trim(table1.field1)#&quot;<br>name=&quot;field1&quot;&gt;&lt;/form&gt;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top