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 |
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 are the 3 components in sas programming?
What does P-value signify about the statistical data?
Differentiate between proc means and proc summary.
What are the analysis datasets created, and what are the new variables created in CLINICAL SAS
1 Answers Accenture, Sciformix,
In proc transpose and data step with arrays which one you pick?
0 Answers Accenture, Quintiles,
how to assign a macro value to a variable?
How does the internal authentication work in sas? : sas-grid-administration
What is the maximum and minimum length of macro variable
what is operational data and operational system? : Sas-di
What is the difference between nodup and nodupkey options?
20 Answers iFlex, Makro, Talwar,
how will you locate the sas platform applications? : Sas-bi