SQL statement in mySQL and VB.net
Posted on 2007-08-09
mySQL 4.1 backend database
I have the following sql statement
Select userid, catcode01, firstname, lastname from users where userid = 5
the value that is stored in the user table for catcode01 is a number 1-10.
Without making another table, and doing a join to it, is there a way in the SQL statement to show some text instead of or in addition to the catcode01 field?
example returned record
123 1 john doe
124 1 jane doe
125 2 frank smith
what I would like it to show is..
123 1-Sales john doe
124 1-Sales jane doe
125 2-Accounting frank smith