Thanks so much for replying. I'll try that. I get confused when trying to write a sql statement that will select different data from the same data memo field. Here is what I'm trying to do.
There is a database table called Profile_value which contains three fields; uid(user id), fid(field ID) and value(a value depending on the fid)
I need to extract data for fname, lname, gender,birthday, state, zip, etc.
Here is how that data is idenfified.
Profile_values.fid = 1 then profile_values.Value = fname
Profile_values.fid = 2 then profile_values.value = lname
Profile_values.fid = 3 then profile_values.value = gender
This is joined with a table called User which is joined on the uid field.
Here is how I wrote the add command for each peice of data.
select uid,fid, cast(value as char (20)) as 'Fname'
from profile_values
where profile_values.fid =1 , etc.
Not sure how to accomplish this using a stored procedure because I would be using the same select statement over and over and assigning a new name to value depending on the fid number. Can you give me a couple of lines of sql statment that will accomplish this in a stored procedure? All help is greatly appreciated and thanks so much in advance.
Pattyg