SQL Translation, Terminology?
Go to solution
Solved by elpiop,
17 minutes ago, bindydad123 said:
Is it possible that once data is extracted from the database, before it is shown to the user, it is translated to provide the user with more information? For example, 1 = punch, 2 = kick and 3 = step.
Is translation the right terminology?
In my mind, I imagine every line has to be translated. However is it possible that the translation can appear elsewhere else? Is it even possible to perform translations?
You can use CASE, for example:
SELECT CASE action WHEN 1 THEN 'punch' WHEN 2 THEN 'kick' WHEN 3 THEN 'step' else 'something else' // if you want to provide a default case, else will return null for other values END AS action FROM vaccinations;
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now