1
0
-1

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

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

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

      1. Nurul Akhmar

        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.

      CommentAdd your comment...