I am trying to build 2 SQL statements that are only executed if they fulfill the If..Then conditional statements below. I have a parameter called approve that can have the value of "Yes" or "No". Please note that the SQL works fine without the If...Then. I've tried all the combinations but I am getting nowhere:
If '::approve::'='Yes' Then
UPDATE customer_IN SET approve='::approve::', client_notes_to_ubm='::notes::', cleared_bank='cleared' WHERE customer_account_ref='::customer_reference::' AND account_name='::account_name::'
End If
If '::approve::'<>'Yes' Then
UPDATE customer_IN SET approve='::not_approved::', client_notes_to_ubm='::notes::', cleared_bank='cleared' WHERE customer_account_ref='::customer_reference::' AND account_name='::account_name::'
End If
If someone could kindly help me if it is possible to wrap 2 SQL statements in If..Then conditions.
If '::approve::'='Yes' Then
UPDATE customer_IN SET approve='::approve::', client_notes_to_ubm='::notes::', cleared_bank='cleared' WHERE customer_account_ref='::customer_reference::' AND account_name='::account_name::'
End If
If '::approve::'<>'Yes' Then
UPDATE customer_IN SET approve='::not_approved::', client_notes_to_ubm='::notes::', cleared_bank='cleared' WHERE customer_account_ref='::customer_reference::' AND account_name='::account_name::'
End If
If someone could kindly help me if it is possible to wrap 2 SQL statements in If..Then conditions.