Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321814 - Alias is not displayed when use 'select as' sql statement
Summary: Alias is not displayed when use 'select as' sql statement
Status: CLOSED DUPLICATE of bug 312877
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Birt-DataAccess CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-05 01:28 EDT by Jan Lerby CLA
Modified: 2010-08-05 14:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lerby CLA 2010-08-05 01:28:45 EDT
Build Identifier: 20090619-0625

Hi,

I duplicated bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=312877 from BIRT, where the bug is displayed.

When use 'select as' sql statement, the alias is not displayed in output column.

Beacause it's important if you export data. Then you have in csv uncorrect column names.

I have warkaround to use for string columnn "CONCAT(originColumnName,'') AS newColumnName" and for numbers "originColumnName + 0 AS newColumnName"

Reproducible: Always

Steps to Reproduce:
1.create BIRT report design in Eclipse with BIRT plugin
2. New a data source from sample db. 
3. New a data set using the query below: select CLASSICMODELS.CUSTOMERS.CUSTOMERNUMBER as num from CLASSICMODELS.CUSTOMERS 
3. Switch to Output Columns page.
Comment 1 Brian Fitzpatrick CLA 2010-08-05 09:28:14 EDT
Not sure where this goes actually... Linda? Might be BIRT/ODA related?
Comment 2 Linda Chan CLA 2010-08-05 14:56:04 EDT
This issue is specific to BIRT, not DTP.
As described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=312877#c1, 
it is the JDBC driver that returns the value "num" for the column name and label in this test case.  BIRT host application then in turn maps them to the "Name" and "Display Name" of the corresponding data set column.   The data set column attribute "Alias" is not based on the metadata of the underlying data source, but is intended to be a manually edited value (i.e. editable from the Output Columns page in BIRT's Data Set Editor).

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