[Info-ingres] Issues with COPY TABLE statement with negative DECIMAL Values
Martin Bowes
martin.bowes at ndph.ox.ac.uk
Wed Sep 25 06:56:47 UTC 2019
Hi Darren,
The varchar(0) format prefixes the length to the data. It did that on all lines so your 78.00000 is actually 8.00000 it's 7 characters long.
Change the varchar(0) to a c0 and you should be OK.
Martin Bowes
From: Darren Harvey [mailto:Darren.Harvey at fusion5.com.au]
Sent: 25 September 2019 07:45
To: 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:image003.png at 01D57376.C7A0B170]
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:image004.png at 01D57376.C7A0B170]
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
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 <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
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:image007.jpg at 01D57376.C7A0B170] <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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20190925/9b8ef5db/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 2713 bytes
Desc: image003.png
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20190925/9b8ef5db/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 2542 bytes
Desc: image004.png
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20190925/9b8ef5db/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 900 bytes
Desc: image006.png
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20190925/9b8ef5db/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.jpg
Type: image/jpeg
Size: 43812 bytes
Desc: image007.jpg
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20190925/9b8ef5db/attachment.jpg>
More information about the Info-ingres
mailing list