Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dgreenberg
Luminary Alumni
Luminary Alumni

Problem with where clause when names have an apostrophe

I am trying to pass ePartner to a where a clause.

Resident Sampling1

  where ePartner <> '[O'Mara,Jane J]';

I have tried brackets, double quotes and everything else I can think of.

I am currently using this

Let vPartnerB=chr(39) & chr(91) & peek('ePartner',$(vRand),'Sampling2') & chr(93) & chr(39);

But that fails when the name has an apostrophe as shown above.

I guess let's keep it simple and say how can I use a where clause with a name with an apostrophe

     where ePartner <> 'O'Mara, Jane J'

1 Solution

Accepted Solutions
dgreenberg
Luminary Alumni
Luminary Alumni
Author

Solved:

The best I could come up with is the replace the apostrophe with an ` chr(96)

Looks pretty close and doesn't fail.

replace(v1,chr(39),chr(96))

View solution in original post

1 Reply
dgreenberg
Luminary Alumni
Luminary Alumni
Author

Solved:

The best I could come up with is the replace the apostrophe with an ` chr(96)

Looks pretty close and doesn't fail.

replace(v1,chr(39),chr(96))