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.
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
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?
i code it my self . i even try with query tool but geeting same result.
acual variableas are firstname, lastname and date of birth.
Post the actual code please and log...there are many ways this could be happening.
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
Thanks for the help. it turn out to be problem with case of char veriables.
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.
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.