To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=104413





------- Additional comments from [email protected] Fri Jan  8 14:45:07 
+0000 2010 -------
I have seen a similar issue recently. I am pulling data from multiple tables 
via JDBC connection to a MYSQL server. This query works fine when run directly 
against the database through MYSQL, and works fine through PHPMyAdmin, but 
returns data to incorrect columns with the wrong column names when run through 
Base.

The query is below:

SELECT
 `tb_sales`.`sale_id` AS `Nerve`,
 `tb_customers`.`cust_company` AS `Company`,
 `tb_sales`.`sale_proj_name` AS `Project_Name`,
 DATE_FORMAT( FROM_UNIXTIME( `tb_sales`.`sale_ship_date` ), '%Y' ) AS 
`Close_Year`,
 DATE_FORMAT( FROM_UNIXTIME( `tb_sales`.`sale_ship_date` ), '%M' ) AS 
`Close_Month`,
 DATE_FORMAT( FROM_UNIXTIME( `tb_sales`.`sale_ship_date` ), '%D' ) AS 
`Close_Day`,
 CONCAT( `tb_employees`.`emp_firstname`, ' ', `tb_employees`.`emp_lastname` ) 
AS `PM_Name`, `tb_sales_attributes`.
`invoiced_nrc` AS `Left_to_Invoice`,
 `tb_sales_attributes`.`current_month_hours` AS `CM_Hours`,
 `tb_sales_attributes`.`current_month_plus_one_hours` AS `CM_1_Hours`,
 `tb_sales_attributes`.`current_month_plus_two_hours` AS `CM_2_Hours`, 
`tb_sales_attributes`.`additional_hours` AS `Rem_Hours` FROM `nerve`.`tb_sales` 
AS `tb_sales`,
 `nerve`.`tb_customers` AS `tb_customers`, `nerve`.`tb_employees` AS 
`tb_employees`,
 `nerve`.`tb_sales_attributes` AS `tb_sales_attributes`

 WHERE
 `tb_sales`.`sale_custid` = `tb_customers`.`cust_id`
 AND `tb_sales`.`sale_manager` = `tb_employees`.`emp_id`
 AND `tb_sales`.`sale_id` = `tb_sales`.`sale_id`
 AND `tb_sales`.`sale_id` = `tb_sales_attributes`.`sale_id` 
AND `tb_sales`.`sale_completed` = 'No'
 AND `tb_employees`.`emp_group` = '3'

ORDER BY `Nerve` ASC

What happens in base is that some columns get dropped completely, and column 
names like PM Name show up twice, but the data in both columsn is the date-year 
data...

To complicate things further when I take out any of the lines of code using a 
function ( date functions, or the concatenate) the data shows up fine. Also 
note that all data has an alias, but only columns using functions seem to use 
the alias as the column name.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to