From: misschupito on 5 Jan 2010 08:50 Hi, i need to use in a dataset the option %like... but it is not the same that in a proc sql... I don´t remember, it was something using ":"? thank you
From: Frank DiIorio on 5 Jan 2010 09:52 On Jan 5, 8:50 am, misschupito <cristinap...(a)gmail.com> wrote: > Hi, > i need to use in a dataset the option %like... but it is not the same > that in a proc sql... > I don´t remember, it was something using ":"? > thank you You're right, it's a colon => x =: 'abc', x ^=: 'abc', etc.
From: Mike Zdeb on 5 Jan 2010 12:22 hi ... by dataset do you mean "data step" and does OPTION %LIKE really mean LIKE CONDITION followed by "...%" ??? if so, since LIKE works in any WHERE statements (it's not SQL-specific), why can't you use it in a data step just like it's used in SQL * LIKE in a data step; data new; set sashelp.class; where name like 'J%'; run; * COLON modifier in a data step (as Frank DiIorio's suggested); data new; set sashelp.class; where name eq : 'J'; run; * what I think you meant about SQL; proc sql; create table new as select * from sashelp.class where name like 'J%'; quit; * and there's a COLON modifier alternative in SQL (EQT in place of EQ :); proc sql; create table new as select * from sashelp.class where name eqt 'J'; quit; -- Mike Zdeb U(a)Albany School of Public Health One University Place Rensselaer, New York 12144-3456 P/518-402-6479 F/630-604-1475 > Hi, > i need to use in a dataset the option %like... but it is not the same > that in a proc sql... > I don�t remember, it was something using ":"? > thank you >
|
Pages: 1 Prev: Merge n no of Datasets using macros Next: SAS-L Digest - 5 Jan 2010 - Special issue (#2010-9) |