BookmarkSubscribeRSS Feed
altijani
Quartz | Level 8

altijani_1-1724552739939.png

 

I am receiving this message repeatedly after a simple code like this: What would be the cause?

PROC SQL;
CREATE TABLE WORK.QUERY_FOR_ah AS
SELECT DISTINCT

t1.Store_ID,
t1.Customer_ID,
t1.CLUSTER_ID
FROM adm.Jumb_ah t1
ORDER BY t1.CLUSTER_ID;
QUIT;

 

 

3 REPLIES 3
Astounding
PROC Star
An untested guess: change your ORDER BY clause. Remove "t1." so it simply reads:
ORDER BY CLUSTER_ID;
Quentin
Super User

That's a weird message.  What does the log show?

 

What happens if you run the code without the create table clause, i.e.:

PROC SQL;
SELECT DISTINCT
t1.Store_ID,
t1.Customer_ID,
t1.CLUSTER_ID
FROM adm.Jumb_ah t1
ORDER BY t1.CLUSTER_ID;
QUIT;

Is the source data (adm.Jumbh_ah) a SAS dataset, or some relational database?  

 

In the part of the screen shot that you blacked out, what data set is the message referring to?  Is it adm.Jumb_ah or work.Query_For_ah or something else?

 

Could adm.Jumb_ah be a database view with integrity constraints, rather than a table?  And when you query from adm.Jumb_ah one of the integrity constraints fails?

 

 

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 361 views
  • 0 likes
  • 3 in conversation