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 191683 - Broken SQL code returned by "Show SQL script for..." when using postgres driver.
Summary: Broken SQL code returned by "Show SQL script for..." when using postgres driver.
Status: RESOLVED DUPLICATE of bug 192772
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-05 18:22 UTC by paolosca
Modified: 2010-12-07 18:24 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 paolosca 2010-11-05 18:22:50 UTC
Steps to reproduce:

1. Connect to a sql database and execute a query with "order by":

select * from footable
order by foofield1 desc

2. Select a few rows then right click and select "Show SQL script for INSERT"

3. The table name in the resulting SQL is wrong as following:

INSERT INTO "footableorder by foofield1 desc" (foofield1, foofield2) VALUES ('value1', 'value2');


Notes:

The DELETE and  CREATE options give a similar result but with a line break between the table name and order by (as in the original select):

DELETE FROM "footable
order by foofield1 desc" WHERE foofield1 = 'value1' AND foofield2 = 'value2';
Comment 1 Jiri Rechtacek 2010-12-07 18:24:27 UTC

*** This bug has been marked as a duplicate of bug 192772 ***