Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error message on a sql query

Status
Not open for further replies.

dimpu79

Programmer
May 8, 2004
8
US
Hi,
I am a starter
When i am writing the following program i am getting the following error in the log.
code:
proc sql;
select *
from sashelp.class
where age='14';
quit;
log message:
49 proc sql;
50 select *
51 from sashelp.class
52 where age='14';
ERROR: Expression using equals (=) has components that are of different data types.
53 quit;
Thanks in advance for your help.
 
Take the single quotes out of your age=14 statement. What you told SAS to do was find all the records in the character var age that has a 14. This is incorrect as age is a numeric var.
Klaz

I hope that this helped you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top