removing white space

Results 1 to 2 of 2

Thread: removing white space

  1. #1
    Join Date
    Dec 1969

    Default removing white space

    I have this peice of code which inputs information into a database:<BR><BR><BR>Dim arrAddList, i <BR>arrAddList = Split(strAddList,",")<BR>For i=0 To UBound(arrAddList) <BR>sql = "INSERT INTO medic (earid, medication, occured) VALUES (&#039;"&arrAddList(i)&"&#039;,&#039;"&details&"&# 039;, &#039;"&startdate&"&#039;)" <BR>cn.Execute sql <BR>response.write sql<BR>Next<BR><BR>%&#062; <BR><BR>however when it writes the sql it inserts a space in front of the first earid. eg:<BR><BR>INSERT INTO medic (earid, medication, occured) VALUES <BR>(&#039; jub0114&#039;,&#039;All got put down&#039;, &#039;1/9/2001&#039;) <BR><BR>This has the effect that when i do a search on that later in another file it does not select that record. Is there a way of removing the white space<BR><BR>Thx in advance.<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Use the TRIM function <eop>


Posting Permissions

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