Skip to content
+1-888-319-3663

COMMUNITY FORUM

"If, Then" Based on SQL Query

John asked 1 year ago
Hi:
Below is my “If, Then” statement.  I need to add a clause that says that if the account is inactive, then don’t import it from the File’s GP_GL field.
But, I don’t know how to tie a T-SQL clause to this in order to accomplish something like that.
Please help!
Thanks!
John
 
 
If _GP_GL = “” Then
return “21-12034-000”
else 
return _GP_GL
end if
Answers
Ethan Sorenson Staff answered 1 year ago
John,

You will need to open a SQL Connection from your .NET code. First you will want to create an MSSQL default that you can use in the script.
Here is what I could see your script looking like this script.
 

If you would like to submit an answer or comment, please sign in to the eOne portal.