How to Nest Select Case statements in SQL

Garnet Brockman 0 Reputation points
2024-05-22T21:19:49.95+00:00

I seem to have problems when I try to Nest "Select Case(s)" in Access/SQL... Can it be done; is there a specific syntax to do it? This is what I am trying to accomplish...Select Case Me.[RecordSource]

 Case 0

Case 1

Case 2

    Select Case Me.[DataType]

            Case X

            Case Y

            Case Z

    End Select

Case 3

Case Else

End Select

Access
Access
A family of Microsoft relational database management systems designed for ease of use.
332 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tom van Stiphout 1,701 Reputation points MVP
    2024-05-22T22:04:21.7166667+00:00

    No, that is not part of Access SQL. The reference is here: https://video2.skills-academy.com/en-us/office/client-developer/access/desktop-database-reference/microsoft-access-sql-reference

    Next best thing is the IIf or Choose function.

    0 comments No comments