SQL "IF" Bug?
IF (SELECT COUNT(*) FROM PM_UPLOAD_VIEW WHERE ISNULL(APPROVAL, ”)>”)>0
UPDATE <COMPANY DB>..GL00100
SET ACCTENTR = 1
WHERE ACTINDX = 35
The problem is that the IF statement was being ignored. The map would run and the ACCTENTR would be toggled, even when no data exists. Admittedly, I need to do some thinking about how to stop the map in the event no data exists (should be easy with SQL Validate), but it seems bothersome that the IF statement was ignored.
The Workaround: I created a SQL Stored Procedure passing the ACCTENTR and ACTINDX values as variables and the map runs fine, and the IF statement is honored.
Just thought I’d share in case I’m missing something or if others experience the same hiccup.
Lorren, Thank you for your reply. We are also using 188.8.131.52, but I think something just got sideways in our server because after a reboot, it started working again. You can delete this thread if you want as it is not really useful to the community since the problem was a server issue on our end and not a SmartConnect issue.
If you would like to submit an answer or comment, please sign in to the eOne portal.