Help using Base SAS procedures

Proc SQL

Reply
N/A
Posts: 0

Proc SQL

Hi All,

I use :

PROC SQL;
CREATE TABLE pop AS
SELECT *
FROM a
where content_category in('Pop');
run;

I have used the format $REVERS35. for content_category. But when I run this code I do not get any output and no data is retreived even when there is data in 'a' that has 'Pop' in content_category.

Kindly suggest.

Regards,
K.Q
Valued Guide
Posts: 2,177

Re: Proc SQL

Posted in reply to deleted_user
with $reverse when you see Pop, it is stored as poP
so reverse the quoted string in the sql syntax, like
where content_category = 'poP' ;

If the comparison need not be case sensitive, use
where lowcase(content_category) = 'pop' ;

why use the IN( ) ?

peterC
Ask a Question
Discussion stats
  • 1 reply
  • 104 views
  • 0 likes
  • 2 in conversation