Why SQL Query Not Working?

Confluence User - 23 Apr, 2018

Hello everyone. Can anyone tell me why my query is not working?

Query that works:

SELECT app_fd_info_staff.c_infoStaffId, app_fd_info_aset.c_assignAset
FROM app_fd_info_staff, app_fd_info_aset 
WHERE app_fd_info_staff.c_infoStaffId = app_fd_info_aset.c_assignAset

 

Query that does not work:

IF EXISTS (SELECT app_fd_info_staff.c_infoStaffId, app_fd_info_aset.c_assignAset
FROM app_fd_info_staff, app_fd_info_aset
WHERE app_fd_info_staff.c_infoStaffId = app_fd_info_aset.c_assignAset)
BEGIN
PRINT 'Records exist'
END
ELSE
BEGIN
PRINT 'Record does not exists'
END

sql;mysql;query;select;forms;field

2


23 Apr, 2018
confluenceUser
confluenceUser

You should be able to find the error message for this in the server log. The query should be a SELECT query.

24 Apr, 2018
confluenceUser
confluenceUser

Hi. Thank you for your suggestion. Do you know if I can have print statement on my SQL query? I tried JDBC Load and Store Binder but still not working.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print