execute command denied to user 'R1' - using DATE_FORMAT
I have a working report and made a copy to edit. Below is the original sql script that works.
Original sql script:
select DATE_FORMAT (W.STOP, '%m/%d/%y') as ISSUE_DATE , U.FULL_NAME, T.ID , substring(T.TITLE,1,29) as DESCRIPTION , substring(W.NOTE,1,5) as GIS_CODE,
format((time_to_sec(timediff(stop, start)))/3600.0 + ADJUSTMENT_HOURS,2) as HOURS_WORKED, S.USER_NAME AS CONTACT
from (HD_WORK W, HD_TICKET T, USER U)
LEFT JOIN USER S ON (S.ID = T.SUBMITTER_ID)
where W.HD_TICKET_ID = T.ID
and isnull(W.VOIDED_BY)
and W.USER_ID = U.ID
and W.STOP > DATE_SUB(CURDATE(), INTERVAL 7 DAY)
order by W.STOP, U.FULL_NAME, T.ID
Duplicated the report and getting this error message. Please advise.
mysqli error: [1370: execute command denied to user 'R1'@'%' for routine 'ORG1.DATE_FORMAT'] in EXECUTE(\n"select DATE_FORMAT (W.STOP, '%m/%d/%y') as ISSUE_DATE , U.FULL_NAME, T.ID , substring(T.TITLE,1,29) as DESCRIPTION , substring(W.NOTE,1,5) as GIS_CODE,\nformat((time_to_sec(timediff(stop, start)))/3600.0 + ADJUSTMENT_HOURS,2) as HOURS_WORKED, S.USER_NAME AS CONTACT\nfrom (HD_WORK W, HD_TICKET T, USER U) \nLEFT JOIN USER S ON (S.ID = T.SUBMITTER_ID)\nwhere W.HD_TICKET_ID = T.ID\n and isnull(W.VOIDED_BY)\n and W.USER_ID = U.ID\n and W.STOP > DATE_SUB(CURDATE(), INTERVAL 7 DAY)\norder by W.STOP, U.FULL_NAME, T.ID LIMIT 0")
Answers (0)
Be the first to answer this question