tag:blogger.com,1999:blog-7958828565254404797.post1528394893539435334..comments2024-03-18T15:20:29.180-07:00Comments on ListenData: PROC SQL Joins: A Step-by-Step GuideDeepanshu Bhallahttp://www.blogger.com/profile/09802839558125192674noreply@blogger.comBlogger45125tag:blogger.com,1999:blog-7958828565254404797.post-35262579737039050562023-10-24T04:09:52.812-07:002023-10-24T04:09:52.812-07:00In PROC SQL, you can use the %do %to loop to gener...In PROC SQL, you can use the %do %to loop to generate a series of join statements for each table from BIRTHS12 to BIRTHS21. Better way to do this via merge statement in SAS (as shown below) -<br />data want;<br />merge BIRTHS12-BIRTHS21;<br />by ID;<br />run;Deepanshu Bhallahttps://www.blogger.com/profile/09802839558125192674noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-6247701902752918502023-10-23T17:42:06.565-07:002023-10-23T17:42:06.565-07:00Hi, Deepanshu! It's been years since you last ...Hi, Deepanshu! It's been years since you last answered to any comments here, so this is a long shot. What if I want to use PROC SQL to join various tables that are listed in sequence? For instance, BIRTHS12, BIRTHS13... BIRTHS21? Is there a way to join tables in a range? [BIRTHS12-BIRTHS21]?Fahhttps://www.blogger.com/profile/03823531226510471820noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-76985790831325450682020-09-20T02:44:30.860-07:002020-09-20T02:44:30.860-07:00Great Job!Great Job!MIchałnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-17022580304140446032020-09-06T00:20:58.331-07:002020-09-06T00:20:58.331-07:00Why missing values are coming in right join but no...Why missing values are coming in right join but not in left join?Ashutosh Guptahttps://www.blogger.com/profile/05433448489915916883noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-33211238807009125062019-02-27T02:04:42.749-08:002019-02-27T02:04:42.749-08:00I dont think ur explaination about inner join is a...I dont think ur explaination about inner join is accurate, ud better compare that with Proc SQL outter join.Anonymoushttps://www.blogger.com/profile/00551218678573381440noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-56810526243852409592018-12-02T03:24:44.546-08:002018-12-02T03:24:44.546-08:00Hi Deepanshu,
I appreciate your work and thanks fo...Hi Deepanshu,<br />I appreciate your work and thanks for creating a decent tool. If you'll mention the rules that would be great. Also add interesting scenarios bit logical concepts.<br />and Syntax of every function statement.<br />ThanksAnonymoushttps://www.blogger.com/profile/15315359382029871015noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-36495874866599721172018-11-15T23:10:38.336-08:002018-11-15T23:10:38.336-08:00excellent explanationexcellent explanationAnonymoushttps://www.blogger.com/profile/05598940539451267415noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-83418362081061287662018-11-12T15:43:29.770-08:002018-11-12T15:43:29.770-08:00Great, thanks for posting this.Great, thanks for posting this.Tom Littlehttps://www.blogger.com/profile/10496080969995452049noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-43413219654921349122018-11-12T15:42:22.420-08:002018-11-12T15:42:22.420-08:00This comment has been removed by the author.Tom Littlehttps://www.blogger.com/profile/10496080969995452049noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-62047226990953223532018-09-24T19:57:02.346-07:002018-09-24T19:57:02.346-07:00Superb description about SASSuperb description about SASAnonymoushttps://www.blogger.com/profile/17388101576237010565noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-78986363306165437542018-03-20T16:44:12.893-07:002018-03-20T16:44:12.893-07:00I love your site to refer any concept in SAS or SQ...I love your site to refer any concept in SAS or SQLAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-17800115479042063352018-03-12T08:11:11.831-07:002018-03-12T08:11:11.831-07:00How many datasets can be merged in proc sql (sas 9...How many datasets can be merged in proc sql (sas 9.4)?<br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-78061663918909647632017-10-12T00:57:23.127-07:002017-10-12T00:57:23.127-07:00It helpful for my understanding, Thank youIt helpful for my understanding, Thank youAnonymoushttps://www.blogger.com/profile/03627784528336669729noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-64092976633874403462017-03-03T21:16:08.768-08:002017-03-03T21:16:08.768-08:00This is really great website. I'm glad I found...This is really great website. I'm glad I found it.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-44588252815216913222017-02-20T09:21:45.161-08:002017-02-20T09:21:45.161-08:00The output record will be prepared either from the...The output record will be prepared either from the record of A or B, hence the statement "if x=1 or y=1;" will not be required to mention and it will be by default.Anonymoushttps://www.blogger.com/profile/07902387948035908459noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-20354029172347859972017-02-20T09:18:12.218-08:002017-02-20T09:18:12.218-08:00What about Outer joins? How it will be prepared us...What about Outer joins? How it will be prepared using PROC SQL?Anilnoreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-83227167812751005652017-02-20T09:16:48.245-08:002017-02-20T09:16:48.245-08:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/07902387948035908459noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-14406955362900943842017-02-06T04:35:10.463-08:002017-02-06T04:35:10.463-08:00Was very useful.!! Well explained.Was very useful.!! Well explained.chaithrahttps://www.blogger.com/profile/04770487774614757840noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-9031579676106870642016-12-19T10:33:21.285-08:002016-12-19T10:33:21.285-08:00Did you read the first paragraph 'Advantages o...Did you read the first paragraph 'Advantages of PROC SQL Joins over Data Step Merging'? That's answer of your first question. Second question is also discussed in the article. If you have duplicates in any of the tables, you would get cartesian product of the duplicate records.Deepanshu Bhallahttps://www.blogger.com/profile/09802839558125192674noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-85834636369923971442016-09-21T10:01:14.347-07:002016-09-21T10:01:14.347-07:00Well explained about joins. Very use full for the ...Well explained about joins. Very use full for the beginners.RAOhttps://www.blogger.com/profile/10390185052797073885noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-82297721843454085082016-07-21T07:55:48.502-07:002016-07-21T07:55:48.502-07:00If you include "*" keyword, it would sel...If you include "*" keyword, it would select variables from both the tables.Deepanshu Bhallahttps://www.blogger.com/profile/09802839558125192674noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-51791588677828710892016-07-21T07:54:45.051-07:002016-07-21T07:54:45.051-07:00Thanks for pointing it out. I have corrected the c...Thanks for pointing it out. I have corrected the code. Cheers!Deepanshu Bhallahttps://www.blogger.com/profile/09802839558125192674noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-34693018132569021872016-07-21T07:53:38.080-07:002016-07-21T07:53:38.080-07:00By default, MERGE Statement performs FULL JOIN so ...By default, MERGE Statement performs FULL JOIN so "if x=1 or y=1;" is not required. Please let me know incase any query(s) Thanks!<br />Deepanshu Bhallahttps://www.blogger.com/profile/09802839558125192674noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-842590179639256692016-07-21T06:09:15.400-07:002016-07-21T06:09:15.400-07:00Please let me know if I am wrong Please let me know if I am wrong ParveenSharmahttps://www.blogger.com/profile/05328224574286097056noreply@blogger.comtag:blogger.com,1999:blog-7958828565254404797.post-23042106868681270082016-07-21T06:07:48.971-07:002016-07-21T06:07:48.971-07:00full join Data Step code should be
Data dummy; ...full join Data Step code should be<br /><br />Data dummy; <br />Merge A (IN = X) B (IN=Y);<br />by ID;<br />if x=1 or y=1;<br />run;<br />ParveenSharmahttps://www.blogger.com/profile/05328224574286097056noreply@blogger.com