BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
BillB
Fluorite | Level 6


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

1 ACCEPTED SOLUTION

Accepted Solutions
mathias
Quartz | Level 8

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 ?

View solution in original post

4 REPLIES 4
mathias
Quartz | Level 8

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 ?

ChrisHemedinger
Community Manager

Like said, but in a picture:

filter.png

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Ksharp
Super User

Maybe your variable contains some invisible character . try COMPRESS().

compress(var1, ,'kd') = "505546433549"

Xia Keshan

BillB
Fluorite | Level 6

All great points and answers.

Thank all of you!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1030 views
  • 3 likes
  • 4 in conversation