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

convert function

Status
Not open for further replies.

piulibero

IS-IT--Management
Joined
Feb 4, 2004
Messages
5
Location
GR
I wrote this function in vb but its veeery slow.i need to exclude the symbol included in the quotes from every string my loop finds.
how this function converts to sql statements?

Function MyTrim(str As String) As String
Dim q As Integer
Dim tmpstr As String

For q = 1 To Len(str)
If Mid(str, q, 1) <> &quot; &quot; Then
tmpstr = tmpstr & Mid(str, q, 1)
End If
Next

MyTrim = tmpstr

End Function

THANK YOU
 
select @str = replace(@str,' ','')

in VB you could
str = replace(str,&quot; &quot;,&quot;&quot;)



======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top