• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2606
  • Last Modified:

Replace double - quotes problem

This should be simple, but it's got me: how do you use 'Replace' to
replace double quotes? This won't work:

Replace(strString,""","'")

to replace the double quotes with singles, for instance. I just know I'm
missing something obvious here.

Thanks.

Picco
0
crmpicco
Asked:
crmpicco
  • 4
  • 3
1 Solution
 
iscodeCommented:
Replace(strString, Chr(34), """)
0
 
softplusCommented:
Replace( strString, """", "'")
Note that you have to use 2x the quotes within a string to make one quote. So you actually have 4x the double-quote :)
John
0
 
iscodeCommented:
or this should work

Replace (strString, """", "'")
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
iscodeCommented:
right softplus :)
  sorry for the double post
0
 
softplusCommented:
If you use chr(34), you should use chr(39) to replace (chr(34) = ", chr(39) = '). Replacing with " won't work (will cause ASP-errors as it's not a string).
Replace( strString, """", "'")
and
Replace( strString, Chr(34), Chr(39) )
are equivalent. :)
John
0
 
softplusCommented:
Ah jscode, we meet again :) - I'll get back to work and let you handle the next few :)
John
0
 
iscodeCommented:
no problem I have to get from this too :)

iscode
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now