[Info-ingres] Issues with COPY TABLE statement with negative DECIMAL Values

Darren Harvey Darren.Harvey at fusion5.com.au
Thu Sep 26 00:12:36 UTC 2019


Hi Adrian

Thanks very much for your response, which would have worked.  But Martin's suggestion to just use 'c0' was a simple change and worked.

Cheers

Darren

Darren Harvey
Senior Developer
M +61 400 398 188
P +61 3 9922 5519
Skype for Business ID darren.harvey at fusion5.com.au
www.fusion5.com.au<https://www.fusion5.com.au/infusion?utm_source=F5-Int.Sig&utm_medium=email&utm_campaign=AskUs2018/> <https://www.linkedin.com/company/fusion5> [Follow us on LinkedIn] <https://www.linkedin.com/company/fusion5> <https://www.linkedin.com/company/fusion5>
Fusion5 | Level 27, 570 Bourke Street, Melbourne, 3000, Australia
This email and any attachments are confidential and intended exclusively for the person to whom the email is addressed. Please see our Privacy Policy<https://www.fusion5.com.au/privacy-policy/>













From: Adrian Williamson <adrian.williamson at rationalcommerce.com>
Sent: Wednesday, 25 September 2019 5:11 PM
To: Darren Harvey <Darren.Harvey at fusion5.com.au>; info-ingres at lists.planetingres.org
Subject: RE: [Info-ingres] Issues with COPY TABLE statement with negative DECIMAL Values

Hi Darren,

When I am moving things around systems I use the "copydb -c" command to give me the 'ASCII' i.e. non Binary syntax for extracting data.

e.g. copydb -c -uowner mydatabase mytable

This gives me a copy.out and in which I cannibalise.

Apologies if you have already tried this, but the phrase "but the output is in a Binary format" made me think other wise.

Good luck

Adrian


From: info-ingres-bounces at lists.planetingres.org<mailto:info-ingres-bounces at lists.planetingres.org> <info-ingres-bounces at lists.planetingres.org<mailto:info-ingres-bounces at lists.planetingres.org>> On Behalf Of Darren Harvey
Sent: 25 September 2019 07:45
To: info-ingres at lists.planetingres.org<mailto:info-ingres at lists.planetingres.org>
Subject: [Info-ingres] Issues with COPY TABLE statement with negative DECIMAL Values

Hi

I am attempting to export data from an Ingres Database using the COPY TABLE statement, but having problems with fields defined as 'decimal' with negative values.  The screen shot below shows part of 2 records being exported into a text output file.  The 1st record has a decimal value of 78.00000 and displays correctly. However the 2nd record has a negative decimal value of -0.40000 and the output places an '8' in front of the value, which I assume is to indicate the value has 8 individual characters (-0.40000).  The format in the COPY TABLE statement for this field is 'VARCHAR(0)'

[cid:image002.png at 01D57452.EA488860]

When we try to import this data into a non-Ingres database table it fails because of the character '8' at the start of the data for that field.

I have tried outputting this field with a Data Type of 'Decimal(0)', 'Decimal(11,5)' and 'Float(0)' in the COPY TABLE statement, but the output is in a Binary format which again is unusable for the Import process.
[cid:image003.png at 01D57452.EA488860]

I have tested the Import we are attempting to use with the field in the text file just displaying as '-0.40000' instead of '8-0.40000', and the import works fine.

Does anyone know if there is a way to output 'negative' values without that leading 'length' value?

Thanks in Advance

Darren
Darren Harvey
Senior Developer
M +61 400 398 188
P +61 3 9922 5519
Skype for Business ID darren.harvey at fusion5.com.au<mailto:darren.harvey at fusion5.com.au>
www.fusion5.com.au<https://www.fusion5.com.au/infusion?utm_source=F5-Int.Sig&utm_medium=email&utm_campaign=AskUs2018/> [Follow us on LinkedIn] <https://www.linkedin.com/company/fusion5>
Fusion5 | Level 27, 570 Bourke Street, Melbourne, 3000, Australia
This email and any attachments are confidential and intended exclusively for the person to whom the email is addressed. Please see our Privacy Policy<https://www.fusion5.com.au/privacy-policy/>











From: info-ingres-bounces at lists.planetingres.org<mailto:info-ingres-bounces at lists.planetingres.org> <info-ingres-bounces at lists.planetingres.org<mailto:info-ingres-bounces at lists.planetingres.org>> On Behalf Of Darren Harvey
Sent: Monday, 29 July 2019 9:29 AM
To: info-ingres at lists.planetingres.org<mailto:info-ingres at lists.planetingres.org>
Subject: [Info-ingres] Performance of Primary Key v Index

Hi All

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?

Thanks

Darren

Darren Harvey
Senior Developer
M +61 400 398 188
P +61 3 9922 5519
Skype for Business ID darren.harvey at fusion5.com.au<mailto:darren.harvey at fusion5.com.au>
www.fusion5.com.au<https://www.fusion5.com.au/infusion?utm_source=F5-Int.Sig&utm_medium=email&utm_campaign=AskUs2018/> [Follow us on LinkedIn] <https://www.linkedin.com/company/fusion5>
 [cid:image004.jpg at 01D57452.EA488860] <https://www.fusion5.com.au/es/hcm?utm_source=F5-Int.Sig&utm_medium=email&utm_campaign=Interested_HCM_2018/>
Fusion5 | Level 27, 570 Bourke Street, Melbourne, 3000, Australia
This email and any attachments are confidential and intended exclusively for the person to whom the email is addressed. Please see our Privacy Policy<https://www.fusion5.com.au/privacy-policy/>



Message protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.
http://www.mailguard.com.au/mg

Report this message as spam<https://console.mailguard.com.au/ras/1WcHAvL2mZ/520gRpp5p5ZnDtbdWwXx5S/0.4>



Message protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.
http://www.mailguard.com.au/mg

Report this message as spam<https://console.mailguard.com.au/ras/1WAInlJxj1/efBYXF5uHSb41FhYKnxeP/1.6>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20190926/e5957f9e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 900 bytes
Desc: image001.png
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20190926/e5957f9e/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 2713 bytes
Desc: image002.png
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20190926/e5957f9e/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 2542 bytes
Desc: image003.png
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20190926/e5957f9e/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 43812 bytes
Desc: image004.jpg
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20190926/e5957f9e/attachment.jpg>


More information about the Info-ingres mailing list