JDBC query

Confluence User - 28 Mar, 2016

why is this wuery not working? how can i use a field for a condition in a sql query?

 

here is my query.

forms;datalists;userviews;server;user

3


28 Mar, 2016
confluenceUser
confluenceUser

i think u can use hash variable for populate the value of ur filter.

28 Mar, 2016
confluenceUser
confluenceUser

will i put a single quote? or double quote in using conditions?

29 Mar, 2016
confluenceUser
confluenceUser

Hi Jedi

The Simple Leave App in Joget Workflow Marketplace has a lot of examples you can explore for working JDBC SQL query (for example below in the app's 'My Leave Entitlements' list). Do download the many apps in Joget Workflow Marketplace to learn programming tips and techniques.

SELECT a.id AS id, 
a.c_entleavetype AS LeaveType,
( a.c_entleavebaldays - a.c_entleavefloat ) AS LeaveBalance,
a.c_entleaveyear AS Year,
a.c_entleaveentitledays AS LeaveEntitleDays
FROM app_fd_j_leave_ent_type a
INNER JOIN app_fd_j_leave_ent b
ON ( a.c_appid = b.id )
WHERE ( b.id = '#currentUser.username#' )
ORDER BY a.c_entleaveyear DESC,
a.c_entleavetype ASC

 

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print