Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321814

Summary: Alias is not displayed when use 'select as' sql statement
Product: z_Archived Reporter: Jan Lerby <lerby84>
Component: BIRTAssignee: Birt-DataAccess <Birt-DataAccess-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: lchan
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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