<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1028" />
</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-GB link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hi Darren,<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>When I am moving things around systems I use the &#8220;copydb -c&#8221; command to give me the &#8216;ASCII&#8217; i.e. non Binary syntax for extracting data.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>e.g. copydb -c -uowner mydatabase mytable<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>This gives me a copy.out and in which I cannibalise.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Apologies if you have already tried this, but the phrase &#8220;<span lang=EN-AU>but the output is in a Binary format&#8221; made me think other wise.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>Good luck<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>Adrian</span><o:p></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 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='mso-fareast-language:EN-GB'>From:</span></b><span lang=EN-US style='mso-fareast-language:EN-GB'> info-ingres-bounces@lists.planetingres.org &lt;info-ingres-bounces@lists.planetingres.org&gt; <b>On Behalf Of </b>Darren Harvey<br><b>Sent:</b> 25 September 2019 07:45<br><b>To:</b> info-ingres@lists.planetingres.org<br><b>Subject:</b> [Info-ingres] Issues with COPY TABLE statement with negative DECIMAL Values<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><span lang=EN-AU>Hi<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>I am attempting to export data from an Ingres Database using the COPY TABLE statement, but having problems with fields defined as &#8216;decimal&#8217; with negative values.&nbsp; The screen shot below shows part of 2 records being exported into a text output file.&nbsp; The 1<sup>st</sup> record has a decimal value of 78.00000 and displays correctly. However the 2<sup>nd</sup> record has a negative decimal value of -0.40000 and the output places an &#8216;8&#8217; in front of the value, which I assume is to indicate the value has 8 individual characters (-0.40000).&nbsp; The format in the COPY TABLE statement for this field is &#8216;VARCHAR(0)&#8217;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU><img width=401 height=35 style='width:4.177in;height:.3645in' id="Picture_x0020_1" src="cid:image003.png@01D57378.C8026E90"><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>When we try to import this data into a non-Ingres database table it fails because of the character &#8216;8&#8217; at the start of the data for that field.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>I have tried outputting this field with a Data Type of &#8216;Decimal(0)&#8217;, &#8216;Decimal(11,5)&#8217; and &#8216;Float(0)&#8217; in the COPY TABLE statement, but the output is in a Binary format which again is unusable for the Import process. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><img width=269 height=39 style='width:2.802in;height:.4062in' id="Picture_x0020_4" src="cid:image004.png@01D57378.C8026E90"><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>I have tested the Import we are attempting to use with the field in the text file just displaying as &#8216;-0.40000&#8217; instead of &#8216;8-0.40000&#8217;, and the import works fine.&nbsp; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>Does anyone know if there is a way to output &#8216;negative&#8217; values without that leading &#8216;length&#8217; value?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>Thanks in Advance<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>Darren<o:p></o:p></span></p><div><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%;background:white;border-collapse:collapse'><tr><td style='padding:12.0pt 12.0pt 24.0pt 12.0pt'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 align=left width=400 style='width:300.0pt;background:white;border-collapse:collapse;margin-left:-2.25pt;margin-right:-2.25pt'><tr><td width=600 style='width:450.0pt;border:none;border-top:solid #FD7B23 1.0pt;padding:7.5pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:15.0pt;color:#3A444A;mso-fareast-language:EN-AU'>Darren Harvey <o:p></o:p></span></b></p></td></tr><tr><td width=600 style='width:450.0pt;padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'>Senior Developer <o:p></o:p></span></b></p></td></tr><tr><td width=600 style='width:450.0pt;padding:7.5pt 0cm 3.75pt 0cm'><p class=MsoNormal><b><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'>M </span></b><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'>+61 400 398 188 <br><b>P</b> +61 3 9922 5519<br><b>Skype for Business ID</b> <a href="mailto:darren.harvey@fusion5.com.au">darren.harvey@fusion5.com.au</a> <o:p></o:p></span></p></td></tr><tr><td width=600 style='width:450.0pt;border:none;border-bottom:solid #FD7B23 1.0pt;padding:3.75pt 0cm 3.75pt 0cm'><p class=MsoNormal><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'><a href="https://www.fusion5.com.au/infusion?utm_source=F5-Int.Sig&amp;utm_medium=email&amp;utm_campaign=AskUs2018/" target="_blank"><span style='color:#3A444A'>www.fusion5.com.au</span></a> </span><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter" />
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0" />
<v:f eqn="sum @0 1 0" />
<v:f eqn="sum 0 0 @1" />
<v:f eqn="prod @2 1 2" />
<v:f eqn="prod @3 21600 pixelWidth" />
<v:f eqn="prod @3 21600 pixelHeight" />
<v:f eqn="sum @0 0 1" />
<v:f eqn="prod @6 1 2" />
<v:f eqn="prod @7 21600 pixelWidth" />
<v:f eqn="sum @8 21600 0" />
<v:f eqn="prod @7 21600 pixelHeight" />
<v:f eqn="sum @10 21600 0" />
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" />
<o:lock v:ext="edit" aspectratio="t" />
</v:shapetype><v:shape id="Picture_x0020_3" o:spid="_x0000_s1027" type="#_x0000_t75" alt="Follow us on LinkedIn" href="https://www.linkedin.com/company/fusion5" target="&quot;_blank&quot;" style='position:absolute;margin-left:20.6pt;margin-top:0;width:61.5pt;height:16.5pt;z-index:251661312;visibility:visible;mso-wrap-style:square;mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:0;mso-wrap-distance-top:0;mso-wrap-distance-right:0;mso-wrap-distance-bottom:0;mso-position-horizontal:right;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:line;mso-width-percent:0;mso-height-percent:0;mso-width-relative:page;mso-height-relative:page' o:allowoverlap="f" o:button="t">
<v:imagedata src="cid:image006.png@01D57378.C8026E90" o:title="eDM-Logo_B3.v1-h22w82-LinkedInFollow" />
<w:wrap type="square"/>
</v:shape><![endif]--><![if !vml]><a href="https://www.linkedin.com/company/fusion5" target="&quot;_blank&quot;"><img border=0 width=82 height=22 style='width:.8541in;height:.2291in' src="cid:image006.png@01D57378.C8026E90" align=right alt="Follow us on LinkedIn" v:shapes="Picture_x0020_3"></a><![endif]><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'><o:p></o:p></span></p></td></tr><tr><td width=600 style='width:450.0pt;padding:7.5pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'>Fusion5 |</span></b><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'> Level 27, 570 Bourke Street, Melbourne, 3000, Australia<o:p></o:p></span></p></td></tr><tr><td width=600 style='width:450.0pt;padding:3.75pt 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;color:#3A444A;mso-fareast-language:EN-AU'>This email and any attachments are confidential and intended exclusively for the person to whom the email is addressed. Please see our <a href="https://www.fusion5.com.au/privacy-policy/" target="_blank"><span style='color:#3A444A'>Privacy Policy</span></a> <o:p></o:p></span></p></td></tr></table><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:10.5pt;color:black;mso-fareast-language:EN-AU'><br><br><br><br><br><br><br><br><br><br><br></span><span style='font-size:10.5pt;mso-fareast-language:EN-AU'><o:p></o:p></span></p></td></tr></table></div><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='mso-fareast-language:EN-AU'>From:</span></b><span lang=EN-US style='mso-fareast-language:EN-AU'> <a href="mailto:info-ingres-bounces@lists.planetingres.org">info-ingres-bounces@lists.planetingres.org</a> &lt;<a href="mailto:info-ingres-bounces@lists.planetingres.org">info-ingres-bounces@lists.planetingres.org</a>&gt; <b>On Behalf Of </b>Darren Harvey<br><b>Sent:</b> Monday, 29 July 2019 9:29 AM<br><b>To:</b> <a href="mailto:info-ingres@lists.planetingres.org">info-ingres@lists.planetingres.org</a><br><b>Subject:</b> [Info-ingres] Performance of Primary Key v Index<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>Hi All<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>If I have a table that has a Primary Key with 2 columns in the key, does the Primary Key provide the same performance for selecting data on those 2 columns as an Index would with the same 2 columns? &nbsp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>Thanks<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU>Darren<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%;background:white;border-collapse:collapse'><tr><td style='padding:12.0pt 12.0pt 24.0pt 12.0pt'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 align=left width=400 style='width:300.0pt;background:white;border-collapse:collapse;margin-left:-2.25pt;margin-right:-2.25pt'><tr><td width=600 style='width:450.0pt;border:none;border-top:solid #FD7B23 1.0pt;padding:7.5pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:15.0pt;color:#3A444A;mso-fareast-language:EN-AU'>Darren Harvey <o:p></o:p></span></b></p></td></tr><tr><td width=600 style='width:450.0pt;padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'>Senior Developer <o:p></o:p></span></b></p></td></tr><tr><td width=600 style='width:450.0pt;padding:7.5pt 0cm 3.75pt 0cm'><p class=MsoNormal><b><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'>M</span></b><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'> +61 400 398 188<br><b>P </b>+61 3 9922 5519 <br><b>Skype for Business ID</b> <a href="mailto:darren.harvey@fusion5.com.au">darren.harvey@fusion5.com.au</a> <o:p></o:p></span></p></td></tr><tr><td width=600 style='width:450.0pt;border:none;border-bottom:solid #FD7B23 1.0pt;padding:3.75pt 0cm 3.75pt 0cm'><p class=MsoNormal><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'><a href="https://www.fusion5.com.au/infusion?utm_source=F5-Int.Sig&amp;utm_medium=email&amp;utm_campaign=AskUs2018/" target="_blank"><span style='color:#3A444A'>www.fusion5.com.au</span></a> </span><!--[if gte vml 1]><v:shape id="Picture_x0020_2" o:spid="_x0000_s1026" type="#_x0000_t75" alt="Follow us on LinkedIn" href="https://www.linkedin.com/company/fusion5" target="&quot;_blank&quot;" style='position:absolute;margin-left:30.9pt;margin-top:0;width:61.5pt;height:16.5pt;z-index:251659264;visibility:visible;mso-wrap-style:square;mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:0;mso-wrap-distance-top:0;mso-wrap-distance-right:0;mso-wrap-distance-bottom:0;mso-position-horizontal:right;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:line;mso-width-percent:0;mso-height-percent:0;mso-width-relative:page;mso-height-relative:page' o:allowoverlap="f" o:button="t">
<v:imagedata src="cid:image006.png@01D57378.C8026E90" o:title="eDM-Logo_B3" />
<w:wrap type="square"/>
</v:shape><![endif]--><![if !vml]><a href="https://www.linkedin.com/company/fusion5" target="&quot;_blank&quot;"><img border=0 width=82 height=22 style='width:.8541in;height:.2291in' src="cid:image006.png@01D57378.C8026E90" align=right alt="Follow us on LinkedIn" v:shapes="Picture_x0020_2"></a><![endif]><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'><o:p></o:p></span></p></td></tr><tr><td width=600 style='width:450.0pt;padding:7.5pt 0cm 7.5pt 0cm'><p class=MsoNormal><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'>&nbsp;</span><span style='color:black'><a href="https://www.fusion5.com.au/es/hcm?utm_source=F5-Int.Sig&amp;utm_medium=email&amp;utm_campaign=Interested_HCM_2018/"><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU;text-decoration:none'><img border=0 width=400 height=150 style='width:4.1666in;height:1.5625in' id="_x0000_i1027" src="cid:image007.jpg@01D57378.C8026E90"></span></a></span><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'> <o:p></o:p></span></p></td></tr><tr><td width=600 style='width:450.0pt;padding:7.5pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'>Fusion5 |</span></b><span style='font-size:10.5pt;color:#3A444A;mso-fareast-language:EN-AU'> Level 27, 570 Bourke Street, Melbourne, 3000, Australia<o:p></o:p></span></p></td></tr><tr><td width=600 style='width:450.0pt;padding:3.75pt 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;color:#3A444A;mso-fareast-language:EN-AU'>This email and any attachments are confidential and intended exclusively for the person to whom the email is addressed. Please see our <a href="https://www.fusion5.com.au/privacy-policy/" target="_blank"><span style='color:#3A444A'>Privacy Policy</span></a> <o:p></o:p></span></p></td></tr></table></td></tr></table><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU style='mso-fareast-language:EN-AU'><o:p>&nbsp;</o:p></span></p><p><span lang=EN-AU>Message protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.<br><a href="http://www.mailguard.com.au/mg">http://www.mailguard.com.au/mg</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU style='mso-fareast-language:EN-AU'><br><a href="https://console.mailguard.com.au/ras/1WcHAvL2mZ/520gRpp5p5ZnDtbdWwXx5S/0.4">Report this message as spam</a> &nbsp;<br>&nbsp;<o:p></o:p></span></p></div></body></html>