isaacr25
asked on
Microsoft, SQL Server, 2000, SQL
I have two fields: Table1.SSN, and Table1.Last4.
I need a query that inserts the last 4 of Table1.SSN into Table1.Last4. The value of Table1.SSN should not be affected. Thanks in advance.
I need a query that inserts the last 4 of Table1.SSN into Table1.Last4. The value of Table1.SSN should not be affected. Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Update Table1 Set Last4 = Right(SSN,4)
Hi isaacr25,
Are there any other colmns in table1? What column do you want to sort on? To find the "last" there needs to be something to use to order them by
Are there any other colmns in table1? What column do you want to sort on? To find the "last" there needs to be something to use to order them by
Doh! I think I was way off track there...
This would update automatically if you made this a calculated column using this formula. Then there would be no need to run updates on it.