in data set200 observation how to take 110,150,170 using sql procedure?
Answers were Sorted based on User's Feedback
Answer / anji
Proc sql;
create table ab as select * from SASHELP.class where monotonic() in (10,12,14);
quit;
| Is This Answer Correct ? | 14 Yes | 1 No |
Answer / ashish
Hey , your anwer is almost right but the only correction is
we derived the count variable by using monotonic() function
so that we have to use "calculated count" in where
statement or we can also use HAVING in palce of WHERE..
PROC SQL;
CREATE TABLE TEST AS SELECT
*,
MONOTONIC() AS COUNT
FROM TEST1
HAVING COUNT IN (110,150,170);
QUIT;
| Is This Answer Correct ? | 4 Yes | 3 No |
Answer / ram
We have number of options to select or retrieve the data
data part_of;
/*do slice = 100,200,300,400,550,600,700,800,900;*/
do slice = 100 to 900;
set example_1 point=slice;
output;
end;
stop;
run;
Proc Sql;
Select *,monotonic ()as c from example_1
group by date having c in (110,150,170,190);
quit;
Proc Sql;
Select *from example_1
group by date having date in (100,150,180,190);
quit;
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / alok karan
proc sql;
select *,monotonic()as obs from alok.countries
where calculated obs in(1,4,8,7,21,23)
;
quit;
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / pranoy
PROC SQL;
CREATE TABLE TEST AS SELECT
*,
MONOTONIC() AS COUNT
FROM TEST1
WHERE COUNT IN (110,150,170);
QUIT;
| Is This Answer Correct ? | 2 Yes | 5 No |
what type of reports you are generating in your company...???
2 Answers GSK GlaxoSmithKline,
If you set a label in the data step and call a proc freq on the data, how do you display the data without the labels and just the variables.
what is snowflake schema? : Sas-di
How to convert a numeric variable to a character variable?
How we will Developing new reports Using Data step programming and Macros ?
data jagan1.s; input bp$; cards; 100/90 120/89 112/87 run; in the above code how to convert character data values to numeric data values?
Hi All.I am looking for Good Institute who could Provide the online SAS BI+DI Training along with software.Primarily in Delhi/NCR or in Hyderabad Please help with name and contact number of concerned person!! Thanks in Advance! :)
Give some examples where proc report’s defaults are same as proc print’s defaults?
What system options would you use to help debug a macro? : sas-macro
Mention few ways with which a “table lookup’ is done in sas programming.
If you’re not wanting any SAS output from a data step, how would you code the data statement to prevent SAS from producing a set?
what is Difference between PROC SQL JOINS and MERGE?