hey, just wondering if anyone can give me a quick answer to this. Is there a way to change values returned by a query into something else during the query process.. well that wasn't the clearest statement i've ever made so i'll put down an example.. say we are working with something like this SELECT account_number, account_type FROM bankaccounts and account_type is a value between 1 and 3 what i want to do is instead of getting a result set like this account_number | account_type 0923423234 1 2834203443 1 0230489453 3 ... i want account_number | account_type 0923423234 savings 2834203443 savings 0230489453 chequeing ... so what i'm looking for is a way to incoporate something that would be the equivalent of if account_type.value = 1 set account_type.value = 'savings' .. etc. but i don't want to modify the database
you can use "case when" statement. Simple example: select case number_field when 1 then 'one' when 2 then 'two' when 3 then 'three' end from number_table