|
-
Selecting Value Based on Column Id
Hi,
I am trying to write a query that will select the value based on a column
id. I have the following table definition:
sku_number,
retail_level1,
retail_level2,
retail_level3,
retail_level4,
retail_level5,
retail_level6,
retail_level7
I am given the number of the retail level (eg. 6) and I must query the above
table to obtain the value of that level (ie - retail_level6). The level that
must be selected is unknown, therefore it cannot be hardcoded. I need to
dynamically select the field based on a parameter passed to the procedure
(query).
Any help is appreciated.
thank you,
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks