Delete spaces from field

I need to be able to run a query that deletes all spaces contained within a field.  The table is tblSymbol and has a field symCode.  

Field symCode contains a mixtureof alpha characters and spaces.  I need to delete all spaces from within the field.  lets say I have someting like

AA B
CD R
F GG
G H D
FFD (space) (space) etc

I need to end up with

AAB
CDR
FGG
GHD
FFD (with no following spaces)  in fact no following spaces for any of the symbols in the field.

need a quick solution here, thanks

Any suggestions
thanks
sarahgalAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
GreymanMSCConnect With a Mentor Commented:
Use the following sql statement to update the table

  Update tbltblSymbol set symCode=Replace(symCode, " ", "") where InStr(1, symCode, " ")>0;

Use the following to simply retrieve the values stripped of spaces,

  Select Replace(symCode, " ", "") as symCodeDespaced from tbltblSymbol;
0
 
sarahgalAuthor Commented:
the update statement works perfectly.  thanks GreymanMSC.

appreciate the quick response....
0
All Courses

From novice to tech pro — start learning today.