Ok it doesn't exist as we know it in VFP, but there has to be a way to do
something like this.  I have a variable that has the name of a field in it.
I want to retrieve the value of that field from a table

 

Something like:

 

Declare @vCol2Use as char(10)

Declare @MyValue  as integer

Set @vCol2use = 'RESP01'

Set @MyValue = (Select &@Myvalue from mydatatable)

 

 

The values for @vCol2use go up to RESP80.   This is already the storedproc
from h3ll, there has to be a way to not hand-code a block of 80 case
statements.    I am converting a VFP program to a SQL call in preparation
for our SQL update, and have been reminded how cool some of the string
manipulation and database functions are in VFP.

 

Any ideas? 

   

Thanks in advance,

Lou

 

 

LouS

 



--- StripMime Report -- processed MIME parts ---
multipart/related
  multipart/alternative
    text/plain (text body -- kept)
    text/html
  image/jpeg
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/025001cbb825$42dd4810$c897d830$@com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to