Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     using escape characters
Go
New
Search
Notify
Tools
Reply
  
using escape characters
 Login/Join
 
<Kalyan>
posted
please look at code below


TABLE FILE EMPLOYEE
PRINT *
WHERE COURSE_NAME EQ 'WHAT\'S NEW IN FOCUS'
END

I used the back slash as the help file says it could be used to as an escape character.. When I run the code above I get a error saying unmatched quotes?? What am I doing wrong?
 
Reply With QuoteReport This Post
Virtuoso
posted Hide Post
It is interpretting what you have with the embedded quote

WHERE COURSE_NAME EQ 'WHAT\'S NEW IN FOCUS'

as if it should be 'what\' and then
S NEW IN FOCUS' and wants another quote.

Other than in headings which have the begin and end double quotes, I've never tried what you have for a quote.
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Reply With QuoteReport This Post
Guru
posted Hide Post
This is what I found in the HELP file

Example: Using Quote‑Delimited Literal Strings
For example, if a report request contains the following command

IF AIRPORT EQ 'O''HARE'WebFOCUS will interpret the literal string 'O''HARE and look for a data source value of O'HARE.

HTH
 
Posts: 252 | Location: USA | Registered: April 15, 2003Reply With QuoteReport This Post
Platinum Member
posted Hide Post
With the an escape character you need to use LIKE and not EQ.
WHERE COURSE_NAME LIKE 'WHAT\''%' ESCAPE '\'


Use 2 single quotes if you are searching for the entire value.
WHERE COURSE_NAME EQ 'WHAT''S NEW IN FOCUS' ;
 
Posts: 188 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteReport This Post
Gold member
posted Hide Post
My understanding has always been that if you want a single tick mark, you simply place two of them in a row to make that happen. Here is a snippet from some code that might be an example:

-SET &WHRLMT = 'WHERE FLD1 EQ ''Y''';

I'd be tempted to place your statement in a variable like so:
-SET &LMT1 = 'WHERE COURSE_NA EQ 'WHAT''S NEW IN FOCUS'';

Hope this works for you.

Stan
 
Posts: 90 | Registered: April 15, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     using escape characters

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.