|
-
Aug 5th, 2002, 01:09 AM
#1
Thread Starter
Fanatic Member
Select Case
Are there some command in SQL that is similar to the Select Case in VB?
Thanks.
-
Aug 5th, 2002, 03:04 AM
#2
Hyperactive Member
Of course there is:
you can use it this way
SELECT FieldName = CASE MonthValue WHEN 1 THEN 'January'
WHEN 2 THEN 'February'
WHEN 3 THEN 'March'
WHEN 4 THEN 'April'
WHEN 5 THEN 'May'
WHEN 6 THEN 'June'
WHEN 7 THEN 'July'
WHEN 8 THEN 'August'
WHEN 9 THEN 'September'
WHEN 10 THEN 'October'
WHEN 11 THEN 'November'
WHEN 12 THEN 'December'
END
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|