Bug 161048 - 'Show SQL script for INSERT' returns strings for decimal values
'Show SQL script for INSERT' returns strings for decimal values
Status: RESOLVED WORKSFORME
Product: db
Classification: Unclassified
Component: Show Data
6.x
All All
: P3 (vote)
: 7.0
Assigned To: Jiri Rechtacek
issues@db
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-24 16:27 UTC by prodoc
Modified: 2012-04-19 09:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description prodoc 2009-03-24 16:27:15 UTC
The 'Show SQL script for INSERT' function (found in the context menu of the 'View Data' result rows) returns strings 
for decimal column values. These are incompatible when using the generated query again to insert data. E.g. if I have 
and stuff it with some values:

CREATE TABLE "test" (
"id" INT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
"value" DECIMAL(5,2) NOT NULL,
PRIMARY KEY ("id")
);

I get the following back when using the 'Show SQL script for INSERT' function on one or more rows:

INSERT INTO TESTDB."test" ("id", "value") VALUES (1, '5.00');

Instead of:

INSERT INTO TESTDB."test" ("id", "value") VALUES (1, 5.00);

This results in an unusable (error generating) statement if you want to execute it because the string can not be 
converted to a suitable value.

I'm using Netbeans 6.5.1 in combination with Apache Derby. Let me know if you need any more information.
Comment 1 Jiri Rechtacek 2009-07-01 07:44:22 UTC
NB6.7 was released already - http://www.netbeans.org/community/releases/67/
Postpone fixing this issue on the next release.
Comment 2 Jaroslav Havlin 2012-04-19 09:52:58 UTC
Seems to work fine on NetBeans 7.2.
Please reopen if you still encounter this problem on the latest release.
Thank you for reporting.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo