I have a data set with the following headings:
- name
- address
- ID
I have got a bit of code like this:
This brings back the name address and ID of the person with ID 123456, i.e. it brings back 1 row.
However, I don't want the whole row. I only want one cell - the name. I then want to make the value of that cell equal to the variable Name.
(I don't want to use proc print for this - I just used it as an illustration. Eventually I will display the value of the Name variable on a webpage so that when the person enters their ID, it will bring back the message "hello &name").
Would anyone be able to assist me with this?
Many thanks for your help,
Katie
- name
- address
- ID
I have got a bit of code like this:
Code:
data new;
set details;
where (ID = '123456');
run;
proc print data = new;
run;
However, I don't want the whole row. I only want one cell - the name. I then want to make the value of that cell equal to the variable Name.
(I don't want to use proc print for this - I just used it as an illustration. Eventually I will display the value of the Name variable on a webpage so that when the person enters their ID, it will bring back the message "hello &name").
Would anyone be able to assist me with this?
Many thanks for your help,
Katie