Hi I have list of products in a dataset,
which are classified by other name for eg:- there is a
product A> Malambo Shiraz Malbec 750ML(0388) which is a Red
wine.Now i need to generate a report where it shows if this
product appears then it should b displayed as red
wine,similarly for other products and other classification.
I dont wan use proc format.
Answers were Sorted based on User's Feedback
Answer / chandrakanth
please do not post complex answers if it can be done in very very simple.
data=dataset name;
set source dataset name;
if productA="Malambo Shiraz Malbec 750ML(0388)" then productA='Red Wine';
proc print data=dataset name;
run;
let me know if i am wrong
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / sheetal
above answer is correct. Just need to correct syntax
errors. Following is the corrected code,
proc sql;
update [dataset_name]
set [wine_name_field] = "Red Wine" where [wine_name_field]
="Malambo Shiraz Malbec 750ML(0388)";
quit;
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / harsh
You can use HASH lookup for this. Performnace will depend
on the data size.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / saurabh
Hi.
I don t know any specific reason why yu dont wan to use
proc format. It would be better if you use that as there
would be probably some more wines in the market where u can
apply this format of red wine....
Anyways I think you can try this.
* the content in brackets have to come from your program
proc sql;
update [dataset_name];
set [wine_name_field] = "Red Wine" where [wine_name_field]
="Malambo Shiraz Malbec 750ML(0388)";
exit;
let me know in case u require something else.
| Is This Answer Correct ? | 0 Yes | 1 No |
If i doest required Cumilative frequency in my table, generated by using PROC FREQ what i had to do?
How to get the repeated values by using sql in sas ?
How to import the Zip files into SAS? If it is possible in SAS? If it is posible write the code...
CHOOSE ANY ONE OF THE PROCEDURE FOLLOWING TO GENERATE THE REPORTS? HOW CAN YOU SAY IT IS BETTER THAN THE OTHER? AND DEFERENCIATE THESE TWO ? 1). REPORT PROCEDURE 2). TABULATE PROCEDURE
What was the last computer book you purchased? Why?
how do u validate the program which u have written.
What is PROC in SAS?
in which companies SAS openings are there? List of companies using SAS technology.
What are the data types that sas contain?
how does sas handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, procs? : Sas programming
what are 5 ways to perform a table lookup in sas? : Sas-administrator
what is Business Intelligence?