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

Summary: Broken SQL code returned by "Show SQL script for..." when using postgres driver.
Product: db Reporter: paolosca <paolosca>
Component: SQL EditorAssignee: Jiri Rechtacek <jrechtacek>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

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 ***