0

I have got a string containing "&" like "Coke & Cola" How to use this string on Queries with & Please Help me.

I must Query by this sign &

Grzegorz Z
  • 192
  • 2
  • 11
  • possible duplicate: http://stackoverflow.com/questions/12961215/escaping-ampersand-character-in-sql-string there is a answer – Kyslik May 29 '13 at 09:04

3 Answers3

0

Have you tried using

amp;

or

\&

?

I'm making the assumption that you're using Sharepoint given the tag - I found an article here that might be relevant to your problem: http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomizationlegacy/thread/90479143-e26e-45cc-ae56-16574056d6d4

Hugheth
  • 1,802
  • 17
  • 14
0

[general SQL] There are many answers take a look at source link:

SET ESCAPE ON
SET ESCAPE ""
SELECT 'You & me' FROM DUAL;

source

[CAML SharePoint] answer:
replace & with &

Kyslik
  • 8,217
  • 5
  • 54
  • 87
  • oh, sorry didn't see tags in there, consider my answer as "general one". For you this is the solution: replace `&` with `&` – Kyslik May 29 '13 at 09:26
0

& must be changed to &

Also <must be changed to &lt; and >must be changed to &gt;

AymKdn
  • 3,327
  • 23
  • 27