Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamically build Select Case statement from a table

Status
Not open for further replies.

HRHK

Programmer
Jun 5, 2005
83
US
How can I dynamically build Select Case statement from the table?

eg. if t_customer table has 4 customers where first_name are:
Sam
David
Mike
Jeremy

Then I would like to build select case statement for these 4 persons.
i.e. Select case f_name

case "Sam"

case "David"

case "Mike"

case "Jeremy"

End Select

I would be grateful for any suggestions. Thanks.
 
I think you want to do this in sql.

Christiaan Baes
Belgium

I just like this --> [Wiggle] [Wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top