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 |
Give e an example of..
Under what circumstances would you code a SELECT construct instead of IF statements?
How to include or exclude specific variables in a data set?
What is SAS informats?
If i doest required Cumilative frequency in my table, generated by using PROC FREQ what i had to do?
What will calendar procedure do?
what is the need of INDEX in datasets?
I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.
What is the general format of function in sas? : sas-grid-administration
There is a field containing a date. It needs to be displayed in the format "ddmonyy" if it's before 1975, "dd mon ccyy" if it's after 1985, and as 'Disco Years' if it's between 1975 and 1985. How would you accomplish this in data step code? Using only PROC FORMAT
what is cummaltive frequency,and varience in proc unviarte
What is the role of sas grid administrator? : sas-grid-administration