Hi all,
I have an update query as following:
UPDATE EmployeeTable
SET [Address] = '#AddressUpdate#',
WHERE [Employee_ID] = '#EmployeeID#'
From my fornt end I'm grabing the Employee_ID, and the SQL table looks like the following:
Employee_ID Address
1001-1 128 W.South Blvd
45902-1 345 West Virginia
459-1 123 S. Pontiac Trail
459-2 123 S. Pontiac Trail
459-3 123 S. Pontiac Trail
7896-1 5679 N. Kraft Drive
7896-2 5679 N. Kraft Drive
So suppose if I selected EmployeeID 7896-1 to update the address and I run the above query it will only update adress for 7896-1. For example:
Employee_ID Address
1001-1 128 W.South Blvd
45902-1 345 West Virginia
459-1 123 S. Pontiac Trail
459-2 123 S. Pontiac Trail
459-3 123 S. Pontiac Trail
7896-1 8796 S. Hampton Inns
7896-2 5679 N. Kraft Drive
But I want it to update address for both 7896-2 also. For example:
Employee_ID Address
1001-1 128 W.South Blvd
45902-1 345 West Virginia
459-1 123 S. Pontiac Trail
459-2 123 S. Pontiac Trail
459-3 123 S. Pontiac Trail
7896-1 8796 S. Hampton Inns
7896-2 8796 S. Hampton Inns
How to change my update query to get this result.
Any help is appreciated...
Thanks...
I have an update query as following:
UPDATE EmployeeTable
SET [Address] = '#AddressUpdate#',
WHERE [Employee_ID] = '#EmployeeID#'
From my fornt end I'm grabing the Employee_ID, and the SQL table looks like the following:
Employee_ID Address
1001-1 128 W.South Blvd
45902-1 345 West Virginia
459-1 123 S. Pontiac Trail
459-2 123 S. Pontiac Trail
459-3 123 S. Pontiac Trail
7896-1 5679 N. Kraft Drive
7896-2 5679 N. Kraft Drive
So suppose if I selected EmployeeID 7896-1 to update the address and I run the above query it will only update adress for 7896-1. For example:
Employee_ID Address
1001-1 128 W.South Blvd
45902-1 345 West Virginia
459-1 123 S. Pontiac Trail
459-2 123 S. Pontiac Trail
459-3 123 S. Pontiac Trail
7896-1 8796 S. Hampton Inns
7896-2 5679 N. Kraft Drive
But I want it to update address for both 7896-2 also. For example:
Employee_ID Address
1001-1 128 W.South Blvd
45902-1 345 West Virginia
459-1 123 S. Pontiac Trail
459-2 123 S. Pontiac Trail
459-3 123 S. Pontiac Trail
7896-1 8796 S. Hampton Inns
7896-2 8796 S. Hampton Inns
How to change my update query to get this result.
Any help is appreciated...
Thanks...