MySQL Forums
Forum List  »  Knowledge Base

Problem with data view - values of calculated field are too long
Posted by: Do Trung
Date: August 20, 2009 03:22AM

Hi all,

I create a view which contains a calculated column [actions] using GROUP_CONCAT() function:
CREATE VIEW actions_roles(role_id, controller_name, actions)
SELECT, action_group_items.controller_name, GROUP_CONCAT(action_group_items.actions SEPARATOR '')
FROM roles
INNER JOIN permissions on = permissions.role_id
INNER JOIN action_groups on permissions.action_group_id =
INNER JOIN action_group_items on action_group_items.action_group_id =
WHERE permissions.allowed = true
GROUP BY, action_group_items.controller_name
The problem is that, after the view is created, some string values in the calculated column [actions] are cut off because they are too long to the column's type length(which I don't know how to determine).

My question is that is there any way to define the length for the calculated column in a view?

Thank you very much.

Options: ReplyQuote

Written By
Problem with data view - values of calculated field are too long
August 20, 2009 03:22AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.