<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.emphasis
        {mso-style-name:emphasis;}
span.searchresulthighlight
        {mso-style-name:search_result_highlight;}
span.webworksnumber
        {mso-style-name:webworks_number;}
span.platform
        {mso-style-name:platform;}
span.boldcode
        {mso-style-name:bold_code;}
span.bold
        {mso-style-name:bold;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">There’s a very similar example in the documentation. <a href="http://docs.actian.com/ingres/11.0/index.html#page/CharQueryRepUser%2FPassing_String_Values_with_Embedded_Quotes.htm">
http://docs.actian.com/ingres/11.0/index.html#page/CharQueryRepUser%2FPassing_String_Values_with_Embedded_Quotes.htm</a> &nbsp;&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Hope it helps<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Passing String Values with Embedded Quotes<o:p></o:p></p>
<p class="MsoNormal">Suppose the database value for which you are entering a comparison value contains embedded single or double quotes, as for example:<o:p></o:p></p>
<p class="MsoNormal">&quot;Big John's&quot; Barbecue<o:p></o:p></p>
<p class="MsoNormal">Suppose the where clause is specified in the report as:<o:p></o:p></p>
<p class="MsoNormal">where $wherevar<o:p></o:p></p>
<p class="MsoNormal">You want to specify a value for the variable so that Report‑Writer produces the following SQL query:<o:p></o:p></p>
<p class="MsoNormal">where clientname='&quot;Big John''s&quot; Barbecue'<o:p></o:p></p>
<p class="MsoNormal">Follow this procedure:<o:p></o:p></p>
<p class="MsoNormal">1. Determine how the value appears in the database:<o:p></o:p></p>
<p class="MsoNormal">&quot;Big John's&quot; Barbecue<o:p></o:p></p>
<p class="MsoNormal">2. Enclose the string value in quotes that are appropriate for your query language (single quotes in SQL). Dereference any embedded quotes (including apostrophes) according to the rules of your query language (in SQL, precede a single quote
 or apostrophe with another single quote):<o:p></o:p></p>
<p class="MsoNormal">'&quot;Big John''s&quot; Barbecue'<o:p></o:p></p>
<p class="MsoNormal">3. Enclose the entire valuestring within single quotes to identify it to Report‑Writer as a string. Dereference any embedded single quotes within this string by preceding each single quote with another single quote. This includes any single
 quotes (or apostrophes) from the original value, as well as those required by your query language in the previous step.<o:p></o:p></p>
<p class="MsoNormal">'clientname=''&quot;Big John''''s&quot; Barbecue'''<o:p></o:p></p>
<p class="MsoNormal">4. Enclose the entire parameter within parentheses. If the parameter contains any characters treated specially by your operating system (such as parentheses in Windows NT and UNIX or slashes in VMS), enclose the entire parameter within
 double quotes and escape any embedded double quotes to pass them through the operating system.<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline"><b>Windows:<o:p></o:p></b></p>
<p class="MsoNormal">report accounting receivables &quot;(wherevar=<br>
'clientname=''\&quot;Big John''''s\&quot; Barbecue&quot;''')&quot; <o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline"><b>UNIX:<o:p></o:p></b></p>
<p class="MsoNormal">report accounting receivables &quot;(wherevar=<br>
'clientname=''\&quot;Big John''''s\&quot; Barbecue&quot;''')&quot;<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline"><b>VMS:<o:p></o:p></b></p>
<p class="MsoNormal">report accounting receivables &quot;(wherevar=<br>
'clientname=''&quot;&quot;Big John''''s&quot;&quot; Barbecue&quot;''')&quot;<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline"><b>Note for QUEL Users<o:p></o:p></b></p>
<p class="MsoNormal">To specify a value for the variable so that Report‑Writer produces the following QUEL query:<o:p></o:p></p>
<p class="MsoNormal">where clientname=&quot;\&quot;Big John's\&quot; Barbeque&quot;<o:p></o:p></p>
<p class="MsoNormal">Follow this procedure:<o:p></o:p></p>
<p class="MsoNormal">1. Determine how the value appears in the database:<o:p></o:p></p>
<p class="MsoNormal">&quot;Big John's&quot; Barbeque<o:p></o:p></p>
<p class="MsoNormal">2. Enclose the string value in quotes that are appropriate for your query language (double quotes in QUEL). Dereference any embedded quotes according to the rules of your query language (in QUEL, precede a double quote with a backslash):<o:p></o:p></p>
<p class="MsoNormal">&quot;\&quot;Big John's\&quot; Barbeque&quot;<o:p></o:p></p>
<p class="MsoNormal">3. Enclose the entire valuestring within single quotes to identify it to Report‑Writer as a string. Dereference any embedded single quotes (or apostrophes) within this string by preceding each one with a single quote.<o:p></o:p></p>
<p class="MsoNormal">'clientname=&quot;\&quot;Big John''s\&quot; Barbeque&quot;'<o:p></o:p></p>
<p class="MsoNormal">4. Enclose the entire parameter within parentheses. If the parameter contains any characters treated specially by your operating system (such as parentheses in Windows NT and UNIX or slashes in VMS), enclose the entire parameter within
 double quotes and escape any embedded double quotes to pass them through the operating system.<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline"><b>Windows:<o:p></o:p></b></p>
<p class="MsoNormal">report accounting receivables &quot;(wherevar= 'clientname=\&quot;\\\&quot;Big John''s\\\&quot;Barbeque\&quot;')&quot;<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline"><b>UNIX:<o:p></o:p></b></p>
<p class="MsoNormal">report accounting receivables &quot;(wherevar= 'clientname=\&quot;\\\&quot;Big John''s\\\&quot;Barbeque\&quot;')&quot;<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline"><b>VMS:<o:p></o:p></b></p>
<p class="MsoNormal">report accounting receivables &quot;(wherevar= 'clientname=&quot;&quot;\&quot;&quot;Big John''s\&quot;&quot;Barbeque&quot;&quot;')&quot;<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Copyright 2018 Actian Corporation. All rights reserved.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> info-ingres-bounces@lists.planetingres.org &lt;info-ingres-bounces@lists.planetingres.org&gt;
<b>On Behalf Of </b>armand pirvu<br>
<b>Sent:</b> Friday, March 23, 2018 4:05 PM<br>
<b>To:</b> info-ingres@lists.planetingres.org<br>
<b>Subject:</b> [Info-ingres] E_RW101A with single quotes<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">report scbs18 &quot;(p_qualification='1=1', p_evt_uid=969, p_evt_id='SCBS18', p_dollar_sign='$', p_centered_org_name=' COMPUSYSTEMSINC.',p_rw_head_1_desc='Suncoast Boat Show', p_rw_head_2_desc='April 19 - 22, 2018', p_rw_head_3_desc='Marina
 Jack's', p_rw_head_4_desc='Sarasota, Florida',p_rw_head_5_desc='', p_userid='armandp')&quot; -i/u1/irs/rpt/rsw0425.rw -v60
<br>
<br>
E_RW1001 Bad parameters specified at or near '',<br>
p_rw_head_4_desc='Sarasota, Florida',p_rw_head_5_desc='', p_userid='armandp')'<br>
Correct usage of REPORT command is:<br>
<br>
In /u1/ingres/files/utexe.def report section<br>
param &quot;(%S)&quot;<br>
<br>
<br>
Once I take out the single quote from Marina Jack's I am okay<br>
<br>
So is this expected ? A bug ? A work around ?<br>
<br>
<br>
Thks<br>
_______________________________________________<br>
Info-ingres mailing list<br>
<a href="mailto:Info-ingres@lists.planetingres.org">Info-ingres@lists.planetingres.org</a><br>
<a href="http://lists.planetingres.org/mailman/listinfo/info-ingres">http://lists.planetingres.org/mailman/listinfo/info-ingres</a><o:p></o:p></p>
</div>
</body>
</html>