Replace text in a Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have 2 queries that have data. I have a join query that joins all the data
together. In one of the columns (in both queries) there is the phraze
"$Free". I need to change that to "Free".
From what I can understand, I can not do that function after the union. Is
that correct? So I would have to do that on the 2 seperate queries. How can I
do that?

Thanks in advance
Taylor
 
Hello,
I have 2 queries that have data. I have a join query that joins all the data
together. In one of the columns (in both queries) there is the phraze
"$Free". I need to change that to "Free".
From what I can understand, I can not do that function after the union. Is
that correct? So I would have to do that on the 2 seperate queries. How can I
do that?

Thanks in advance
Taylor

Your actual SQL would have been nice here, as well as your Access
version number.

If your version of Access supports the Replace function, you can use
NewColumn:Replace([FieldName],"$Free","Free") if the value is anywhere
in the field.

If you have an older version of Access, if the value is only at the
beginning of the field, use:
NewColumn:Mid(FieldName],2)

If the value is in the middle of the field use:
NewColumn:Left([FieldName],InStr([FieldName],"$Free") -1) &
Mid([FieldName],InStr([FieldName],"$Free")+1)
 
Hello,
I thank you for your help. I apologize for not being too clear.
I actually figured it out. I guess I just had to leave work and look at it
from home.



fredg said:
Hello,
I have 2 queries that have data. I have a join query that joins all the data
together. In one of the columns (in both queries) there is the phraze
"$Free". I need to change that to "Free".
From what I can understand, I can not do that function after the union. Is
that correct? So I would have to do that on the 2 seperate queries. How can I
do that?

Thanks in advance
Taylor

Your actual SQL would have been nice here, as well as your Access
version number.

If your version of Access supports the Replace function, you can use
NewColumn:Replace([FieldName],"$Free","Free") if the value is anywhere
in the field.

If you have an older version of Access, if the value is only at the
beginning of the field, use:
NewColumn:Mid(FieldName],2)

If the value is in the middle of the field use:
NewColumn:Left([FieldName],InStr([FieldName],"$Free") -1) &
Mid([FieldName],InStr([FieldName],"$Free")+1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top