xuyi
9/10/2019 - 1:18 AM

SQL.IF

IF @repeatedCustomerId != 'OCCUPATION'
			BEGIN
				UPDATE #SUPER_INDIVIDUAL_CUSTOMER 
				SET REPEATED_CUSTOMER_ID = @customerId 
				WHERE CUSTOMER_NAME = @customerName
			END
ELSE IF @repeatedCustomerId != 'OCCUPATION'
			BEGIN
				UPDATE #SUPER_INDIVIDUAL_CUSTOMER 
				SET REPEATED_CUSTOMER_ID = @customerId 
				WHERE CUSTOMER_NAME = @customerName
			END
ELSE 
			BEGIN
				UPDATE #SUPER_INDIVIDUAL_CUSTOMER 
				SET REPEATED_CUSTOMER_ID = @customerId 
				WHERE CUSTOMER_NAME = @customerName
			END