I'm using the EG Query builder to try to query a Character string composed as follows: 505546433549 to try to find that record.
What is the proper method to use to query in th above case?
I've tried using double quotes e.g. "505546433549" and single quotes '505546433549' without success
I'm not sure to understand everything but
if you have a character variable with an observation containing '505546433549'
then in your querry filter you should be able to write
VariableX
Equal to
505546433549 (without quotes)
Enclose values in quotes (check this)
OR
"505546433549" (with quotes, double or single)
Enclose values in quotes (unchecked)
Does this help ?
I'm not sure to understand everything but
if you have a character variable with an observation containing '505546433549'
then in your querry filter you should be able to write
VariableX
Equal to
505546433549 (without quotes)
Enclose values in quotes (check this)
OR
"505546433549" (with quotes, double or single)
Enclose values in quotes (unchecked)
Does this help ?
Maybe your variable contains some invisible character . try COMPRESS().
compress(var1, ,'kd') = "505546433549"
Xia Keshan
All great points and answers.
Thank all of you!
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.