BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,
I'm trying to build a query in the expression builder and it shows an error msg in the log, when I run the process for which i've written the query. If I run the same query in the Enhanced editor, it runs perfectly. Any help would greatly be appreciated.

The query goes like this in the expression builder:

"LIBNAME MMTGT ORACLE USER=MMTGT PASSWORD=XXXXX PATH='ORCL' PRESERVE_NAMES=YES;
LIBNAME MMSRC ORACLE USER=MMSRC PASSWORD=XXXXX PATH='ORCL' PRESERVE_NAMES=YES;

PROC SQL;
DROP TABLE MMTGT.CITY;
CREATE TABLE CITY (RENAME=(SUPP_CITY=CITY)) AS
(
SELECT DISTINCT(SUPP_CITY) FROM MMSRC.SUPPLIER_TBL
UNION
SELECT DISTINCT(TRANSPORTER_CITY) FROM
MMSRC.TRANSPORTER_TBL
UNION
SELECT DISTINCT(BANK_CITY) FROM MMSRC.BANK_TBL
);
QUIT;
=========================================================

The error msg I get in the log window goes like this:

LIBNAME MMTGT ORACLE USER=MMTGT PASSWORD=XXXXX PATH='ORCL'
PRESERVE_NAMES=YES;
NOTE: Libref MMTGT was successfully assigned as follows:
Engine: ORACLE
Physical Name: ORCL
LIBNAME MMSRC ORACLE USER=MMSRC PASSWORD=XXXXX PATH='ORCL'
PRESERVE_NAMES=YES;
NOTE: Libref MMSRC was successfully assigned as follows:
Engine: ORACLE
Physical Name: ORCL
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.07 seconds
cpu time 0.04 seconds

PROC SQL;
DROP TABLE MMTGT.CITY;
NOTE: Table MMTGT.CITY has been dropped.
CREATE TABLE CITY (RENAME=(SUPP_CITY=CITY)) AS
(
SELECT DISTINCT(SUPP_CITY) FROM MMSRC.SUPPLIER_TBL
UNION
SELECT DISTINCT(TRANSPORTER_CITY) FROM MMSRC.TRANSPORTER_TBL
UNION
SELECT DISTINCT(BANK_CITY) FROM MMSRC.BANK_TBL
);
NOTE: Table WORK.CITY created, with 7 rows and 1 columns.

QUIT;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.29 seconds
cpu time 0.07 seconds
NOTE: SCL source line.
AS SUPP_CITY length=20
--
180
ERROR 180-322: Statement is not valid or it is used out of proper order.

"AS is UNDERLINED and is the ERROR"
3 REPLIES 3
ChrisHemedinger
Community Manager
Hello,

We've looked at the PROC SQL code and we cannot determine how you might have used the EG query builder or expression builder to generate this.

I'd suggest opening a tech support track with more information about how you arrived at this point. You can open a track with tech support with this form: http://support.sas.com/techsup/contact/submit_emits2.html

Chris
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
deleted_user
Not applicable
hello Chris,

Thanx for the suggestion. I'm facing this issue in SAS/Warehouse Administrator expression builder. I know i posted this msg out of context for the forum, since I couldnt find any relevant forum to the area for which i'm seeking help.

Anyways thanx for the redirection. Can u also suggest any forums for the sas/warehouse administrator product?
ChrisHemedinger
Community Manager
We're just getting started with these discussion forums, offering a few popular topics to see how it takes off.

I believe that new forums will come online later based on demand and popularity. If you want to see a forum on a particular topic, send the suggestion via http://support.sas.com/contact/software_comments.html

Chris
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

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