Can anybody tell me how to convert the following sql query to hql
Code:
"select c.c_menu_id,c.c_menu_name,ifnull(d.c_permission_type,'NO') Permission " +
"from t_gb_menu_items c left outer join t_gb_user_group_permissions d " +
"on c.c_menu_id=d.c_menu_id and c_group_id='" + GroupId + "' " +
"order by c_menu_id";
I tried converting like this
Code:
"select c.CMenuId,c.CMenuName,ifnull(d.CPermissionType,'NO') AS Permission" +
" from TGbMenuItems AS c left outer join TGbUserGroupPermissions AS d " +
"on c.CMenuId=d.CMenuId and CGroupId='" + GroupId + "' " +
"order by CMenuId";
But i am getting error near "on" . So, instead of "on" i tried using "with" .Still i am getting error
Please tell me how to do it?