G
Guest
I have a table:
ID Product Trading_ID Internal_CODE
1 Bicycle 1005304
2 Vehicle 1005304
3 Scooter 1005303
4 Books 1004002
------------------------------------------------------------------------------------------
My Question:
if the "Trading_ID" ends with 4 then, "Internal_Code" should be "BUY"
if the "Trading_ID" ends with 3 then, "Internal_Code" should be "SELL"
if the "Trading_ID" ends with 2 then, "Internal_Code" should be "RETURN"
I need an SQL Query to generate "Internal_Code". Thank you so much !! ^_^!
ID Product Trading_ID Internal_CODE
1 Bicycle 1005304
2 Vehicle 1005304
3 Scooter 1005303
4 Books 1004002
------------------------------------------------------------------------------------------
My Question:
if the "Trading_ID" ends with 4 then, "Internal_Code" should be "BUY"
if the "Trading_ID" ends with 3 then, "Internal_Code" should be "SELL"
if the "Trading_ID" ends with 2 then, "Internal_Code" should be "RETURN"
I need an SQL Query to generate "Internal_Code". Thank you so much !! ^_^!