This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 161048 - 'Show SQL script for INSERT' returns strings for decimal values
Summary: 'Show SQL script for INSERT' returns strings for decimal values
Status: RESOLVED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-24 16:27 UTC by prodoc
Modified: 2012-04-19 09:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


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.