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


I have 2 differentsas dataset.

A and B.

I am trying to get data from dataset A to dataset B as below

proc sql ;

create table c as select

a.11,

a.13,

a.14

from A,B

where

A.1=B.1 and A.2=B.2 and A.3=B.3;

quit;

Now I am getting empty dataset C.

I am sure I have values comman for 1,2 and 3 for A and B . I check formatting and  length in both dataset are same. Not sure why not getting records.

1 ACCEPTED SOLUTION

Accepted Solutions
Haikuo
Onyx | Level 15

For number variables , check their precision level; for char variables, you could be haunted by some invisible characters, to start, using LEFT and UPCASE(if you don't care about the case) to standardize your non-blank content,  then compare.

If you want to get to the bottom of it, hand pick some values you believe are the same, then put them into Hex. format, and check it out.

Good luck,

Haikuo

View solution in original post

5 REPLIES 5
Reeza
Super User

Did you code that or use the query tool? Does the query tool return results?

I wonder if your variables are actually 1/2/3?

mrug12
Calcite | Level 5

i code it my self . i even try with query tool but geeting same result.

acual variableas are firstname, lastname and date of birth.


Reeza
Super User

Post the actual code please and log...there are many ways this could be happening.

Haikuo
Onyx | Level 15

For number variables , check their precision level; for char variables, you could be haunted by some invisible characters, to start, using LEFT and UPCASE(if you don't care about the case) to standardize your non-blank content,  then compare.

If you want to get to the bottom of it, hand pick some values you believe are the same, then put them into Hex. format, and check it out.

Good luck,

Haikuo

mrug12
Calcite | Level 5

Thanks for the help. it turn out to be problem with case of char veriables.

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
  • 5 replies
  • 1041 views
  • 2 likes
  • 3 in conversation