• Community
    • Home
    • Welcome
      • Getting Started
      • Community Memo
      • All Things Community
      • SAS Customer Recognition Awards (2024)
      • SAS Customer Recognition Awards (2023)
    • SAS Community Library
    • SAS Product Suggestions
    • Upcoming Events
    • SAS Customer Recognition Awards
    • All Recent Topics
  • Learn
    • New SAS User
    • SAS Software for Learning Community
    • Ask the Expert
    • SAS Certification
    • SAS Tips from the Community
    • SAS Training
      • Programming 1 and 2
      • Advanced Programming
      • Course Case Studies and Challenges
      • Trustworthy AI
    • SAS Global Forum Proceedings 2021
    • Tech Report Archive
    • SAS Insights Archive
  • Programming
    • SAS Programming
    • SAS Procedures
    • SAS Enterprise Guide
    • SAS Studio
    • Graphics Programming
    • ODS and Base Reporting
    • SAS Code Examples
    • SAS Web Report Studio
    • Developers
  • Analytics
    • Statistical Procedures
    • SAS Data Science
    • Mathematical Optimization, Discrete-Event Simulation, and OR
    • SAS/IML Software and Matrix Computations
    • SAS Forecasting and Econometrics
    • Streaming Analytics
    • Research and Science from SAS
  • SAS Viya
    • SAS Viya
    • SAS Viya on Microsoft Azure
    • SAS Viya Release Updates
    • Moving to SAS Viya
    • SAS Visual Analytics
    • SAS Visual Analytics Gallery
    • Your Journey to Success
    • SAS Viya Workbench
      • SAS Viya Workbench: Getting Started
      • SAS Viya Workbench Discussion
      • SAS Viya Workbench: Release Updates
  • Administration
    • Administration and Deployment
    • Architecture
    • SAS Hot Fix Announcements
    • SUGA
  • Solutions
    • Microsoft Integration with SAS
    • Decisioning
    • SAS Decision Builder
    • Data Management
    • Customer Intelligence
      • SAS Customer Intelligence
      • SAS Customer Intelligence 360 Release Notes
      • SAS 360 Match
    • Risk and Fraud
      • SAS Risk Management
      • Fraud, AML and Security Intelligence
      • SAS Risk Release Updates
      • Risk & Finance Analytics
      • Insurance Fraud
      • MRM AI Governance Working Group
      • SAS Quant Community
    • SAS Health
      • SAS Health and Life Sciences
      • SAS Life Science Analytics Framework
  • Hubs
    • Regional Hubs
      • SAS User Groups
      • SAS Community Nordic
      • AML Nordic User Group
      • SAS Japan
      • SAS Korea
      • CoDe SAS German
      • SAS Plattform Netzwerk
      • SAS Brazil Community
      • SAS Spanish Community
      • SAS Users Group in Israel
      • 欢迎来到SAS中文社区!
      • Ottawa Area SAS Users' Society
      • Toronto Area SAS Users Group
      • SAS Türkiye Community
    • Special Interest Hubs
      • SAS Hacker's Hub
      • SAS Innovate 2026
      • SAS Analytics Explorers
      • The Curiosity Cup
      • SAS Inner Circle Panel
      • SAS Hackathon Team Profiles (Past)
      • SAS Explore
      • Reporting and Optimization
      • Intern Alumni Network Community
Sign In

Search the Community

Showing results for 
Search instead for 
Did you mean: 
Search Options
  • Subscribe to RSS Feed for this Search
Advanced Hide Advanced
  • Posts
  • Users
  • Places
  • Products
Advanced Search Options
Search Modifiers:
You can apply modifiers to the terms you enter in the search field.
Use quotes to search for an "exact phrase".
Use the plus sign to search for +one +or +more +words.
Use the minus sign to -exclude -certain -words from your search.
Limits search results to topics that have no replies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
224 results
Sorted by:
Best Match
  • Date
  • Views
  • Likes
  • Replies
  • Best Match

Cartesian product not optomized

by Quartz | Level 8 Batman in SAS Programming
‎12-05-2024 02:48 PM
‎12-05-2024 02:48 PM
This sql query seems to give me the desired output, but it also note below ("one or more Cartesian product joins that can not be optimized") makes me wonder if something is amiss.   Is t...
Show results in replies (1)
  • The reason for this is your use of joining with the findw function. Let's look at a simple e...

get rid of cartesian product join

by Quartz | Level 8 Batman in SAS Programming
‎04-14-2023 05:23 AM
‎04-14-2023 05:23 AM
I need to run this merge in sql and I'm getting a cartesian product join.   I took the step of eliminating duplicates from one of the joined datasets, but I still getting the message on t...
Show results in replies (1)
  • ...o it may help to rewrite the join a simple WHERE clause: SELECT /* COUNT_of_BENE_SK */ (COUNT(t...

Getting cartesian product in self join

by Quartz | Level 8 harshpatel in SAS Programming
‎09-13-2023 01:40 AM
‎09-13-2023 01:40 AM
Hi, When i am trying to execute below code i am getting cartesian product while using inner join but i dont want cartesian, i need 6 rows only as it is with previous quarter comparision, I have s...
Show results in replies (1)
  • You have multiple entries per id and quarter, which have to be consolidated first for the process t...

cartesian product (cross join)

by SAS Employee CColpaert in SAS Procedures
‎12-05-2011 01:17 PM
‎12-05-2011 01:17 PM
Hello, I'm looking to create a cartesian product with 3+ tables. TableA: ------ Columns for TableA: colA Values for colA: product A, product B, product C (three rows) TableB: ------ C...
Show results in replies (4)
  • Without having dug into your attachment - I think this can be solved if you can have some rank/sort...
  • ...fficient as SQL. data TableA ; input colA $10.;; cards; product A product B product C ; run; d...
  • ...roc format, a data step and, finally, proc sql: %let COVa_colA = product A, product B, product C...
  • ...he following code also works as expected: %let COVa_product = product A, product B, product C; %l...

Problems with a Join (Cartesian Product?)

by Obsidian | Level 7 mrzlatan91 in SAS Programming
‎12-01-2018 02:15 PM
‎12-01-2018 02:15 PM
...orry, Ive got the feeling that this question is stupid but Im not sure how to handle this issue. Is this the Cartesian Product?    
Show results in replies (1)
  • ...s select x1.*,x2.value from (select * from b , (select distinct fundid from a)) x1 left join a x2 o...

Are full join and cross join (cartesian product) same thing in SAS?

by Barite | Level 11 GN0001 in SAS Programming
‎08-02-2021 11:44 PM
‎08-02-2021 11:44 PM
Hello team,   Are full join and cross join (cartesian product) same thing in SAS?   Regards, blueblue
Show results in replies (2)
  • > Are full join and cross join (cartesian product) same thing in SAS? No there're not: A...
  • By definition they are not the same at all regardless of what software you use to do them.

Using a hash merge for a cartesian product with no key

by Obsidian | Level 7 Ani7 in SAS Programming
‎03-24-2022 10:08 AM
1 Like
‎03-24-2022 10:08 AM
1 Like
...able_a_b as select distinct a.*, b.* from table_a as a left join table_b as b on 1 = 1 ;quit;
Show results in replies (2)
  • ...he execution of this query involves performing one or more Cartesian product joins that can n...
  • For Cartesian you can do a loop: data table_a; input numbers $; cards; 1 2 3 ; run; data t...

Cartesian Product with filters using Datastep

by Obsidian | Level 7 Ricardo_Neves in SAS Programming
‎10-12-2017 06:59 AM
‎10-12-2017 06:59 AM
Hi, I have a process where I do a Cartesian product of 2 tables  (one with data and one with parameters) using proc sql and then I use data step to apply the needed filters so that at the e...
Show results in replies (2)
  • ...simple Cartesian product with proc sql.   Here is a sample: (I have much more conditions t...
  • ...mp;id. as select * from work.base cross join parametro where (id = 000 or SYSTEM NE 'BBBB' or n...

Cartesian Product within Groups without Repetition

by Obsidian | Level 7 KonstantinVasil in SAS Programming
‎01-25-2018 07:13 AM
‎01-25-2018 07:13 AM
...11 1 111 2 222 3 222 4 222 5 ; proc sql; create table test2 as select a.*, b.Record_ID as ID2 from test a left join test b on a...
Show results in replies (1)
  • I'm not sure but I have the feeling that you need replace line: on a.Cust_ID = b.Cust_ID and a.r...

Cartesian Product for matching buyers and sellers

by Calcite | Level 5 Rickaroo in SAS Procedures
‎01-12-2015 10:28 AM
‎01-12-2015 10:28 AM
I'm merging two data files and creating a cartesian join or merge.   My end goal is to determine for each SELLER and BUYER combination, what products are matching The Data looks as f...
Show results in replies (1)
  • I would be very tempted to change the data to a long format SellerId ProductId 123456 &n...
  • « Previous
    • 1
    • 2
    • 3
  • Next »
Powered by Khoros