I could not get your suggestion below to work in a "New Query Window" so
here is the solution I used. This will get rid of the first instance of a
comma in a field.

Tmg is the table name and last_name is the field name.

Update Query:
First column: Left([last_name],InStr(1,[tmg].[last_name],",",1)-1) & Mid
([last_name],InStr(1,[tmg].[last_name],",",1)+1,999)
Second column: expr: InStr(1,[tmg].[last_name],",",1)
Second column criteria: <>0

Thanks,
CC


                                                                                       
                                                
                      "charlie                                                         
                                                
                      griefer"                 To:      CF-Talk 
<[EMAIL PROTECTED]>                                            
                      <charlie                 cc:                                     
                                                
                      @griefer.com>            Subject: Re: OT: MS Access - Replace a 
specific string value                            
                                                                                       
                                                
                      01/23/03 02:29                                                   
                                                
                      PM                                                               
                                                
                      Please respond                                                   
                                                
                      to cf-talk                                                       
                                                
                                                                                       
                                                
                                                                                       
                                                




Casey C Cook writes:

> Hi all -
>
> I've run into something I cant quite put my finger on yet.  Does anyone
> know a function to find the first instance of a specific character in a
> string and replace it with another string value.  In my case I want to
find
> the first instance of a comma " , " and replace it with a blank " ".  Im
> doing this so when I export a file without a text delimiter it will not
> break the field into two separate columns.

replace(myString, ",", " ", "one") should do it.

charlie


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to