shanedaven
New Member
- Joined
- Oct 12, 2010
- Messages
- 2
Have you seen this before and if so do you know how to stop this from happening?
I am using "Microsoft Query" to import mySQL data into a spreadsheet. The data returned from the query is correct, but "Microsoft Query" is removing the "AS" statements. Thus the column headers are either the actual field names or the function I use. It has not done this in the past and I am now worried that if I edit my other queries the same thing will happen.
The query I enter is:
SELECT CONCAT(users_r.firstname, ' ', users_r.realname) as `Owner`,
MID(cat_compname.completename,14,8) as `Category`,
users_g.name as `Team`
FROM glpi_tracking tickets
LEFT JOIN glpi_users users_r ON assign = users_r.ID
LEFT JOIN glpi_dropdown_tracking_category cat_compname ON category = cat_compname.ID
LEFT JOIN glpi_groups users_g ON assign_group = users_g.ID
WHERE LEFT(cat_compname.completename,21) = 'IT-Systems > Projects' AND users_g.name = 'IT-Tech';
Here is what I see when I edit the original query via the "View SQL" button:
SELECT CONCAT(users_r.firstname, ' ', users_r.realname) ,
MID(cat_compname.completename,14,8) ,
users_g.name
FROM glpi_tracking tickets
LEFT JOIN glpi_users users_r ON assign = users_r.ID
LEFT JOIN glpi_dropdown_tracking_category cat_compname ON category = cat_compname.ID
LEFT JOIN glpi_groups users_g ON assign_group = users_g.ID
WHERE LEFT(cat_compname.completename,21) = 'IT-Systems > Projects' AND users_g.name = 'IT-Tech';
I am using "Microsoft Query" to import mySQL data into a spreadsheet. The data returned from the query is correct, but "Microsoft Query" is removing the "AS" statements. Thus the column headers are either the actual field names or the function I use. It has not done this in the past and I am now worried that if I edit my other queries the same thing will happen.
The query I enter is:
SELECT CONCAT(users_r.firstname, ' ', users_r.realname) as `Owner`,
MID(cat_compname.completename,14,8) as `Category`,
users_g.name as `Team`
FROM glpi_tracking tickets
LEFT JOIN glpi_users users_r ON assign = users_r.ID
LEFT JOIN glpi_dropdown_tracking_category cat_compname ON category = cat_compname.ID
LEFT JOIN glpi_groups users_g ON assign_group = users_g.ID
WHERE LEFT(cat_compname.completename,21) = 'IT-Systems > Projects' AND users_g.name = 'IT-Tech';
Here is what I see when I edit the original query via the "View SQL" button:
SELECT CONCAT(users_r.firstname, ' ', users_r.realname) ,
MID(cat_compname.completename,14,8) ,
users_g.name
FROM glpi_tracking tickets
LEFT JOIN glpi_users users_r ON assign = users_r.ID
LEFT JOIN glpi_dropdown_tracking_category cat_compname ON category = cat_compname.ID
LEFT JOIN glpi_groups users_g ON assign_group = users_g.ID
WHERE LEFT(cat_compname.completename,21) = 'IT-Systems > Projects' AND users_g.name = 'IT-Tech';