I have tried a few things to no eval, please help fix....ugh
37 PROC SQL NOEXEC;
38
39 SELECT BD.BIDDER_ORGANIZATION_NAME, BD.VIN, BD.YEAR, BD.MAKE, BD.MODEL, BD.MILEAGE, BD.BUY_PRICE, BD.BID_AMOUNT,
39 ! S.Sale_Price AS Purchase Price Cognos,
_____
79
ERROR 79-322: Expecting a FROM.
40 BD.BID_DATE, BD.BID_SITE, BD.BIDDER_DEALER_CODE, BD.BIDDER_STATE, BD.BIDDER_ZIP, BD.INTERATION_SOLD,
40 ! BD.SOLD_WEBSITE, BD.SALE_DATE,
41 YEAR(BD.BID_DATE) AS BID YEAR, MONTH(BD.BID_DATE) AS BID MONTH, S.Company, S.Dlr_GMF_ID AS Sold Dealer Code
____
2 The SAS System 08:29 Friday, November 18, 2016
22
76
41 ! Cognos,
ERROR 22-322: Syntax error, expecting one of the following: ',', GROUP, ORDER.
ERROR 76-322: Syntax error, statement will be ignored.
Can you post the original code as is, there appear to be various parts missing in that snippet - create table or view, from etc.
No, I meant post the original code, not the log. However I do note that at a couple of places you have:
S.Sale_Price AS 'Purchase Price Cognos',
In SAS you don't do this, you may be able to put n after the text string and get it to work (not tested):
S.Sale_Price AS 'Purchase Price Cognos'n,
However I would really advise not to. If you doing this in SAS, use the terminology which is correct across ANSI SQL:
S.Sale_Price AS PURCHASE_PRICE_COGNOS,
Ie. a variable name.
I would definately start by changing those with the quoted text for variables:
S.Dlr_GMF_ID AS 'Sold Dealer Code Cognos',
To
S.Dlr_GMF_ID AS Sold_Dealer_Code_Cognos,
I would also advise some code formatting there (consitent casing, indentation, finisihing steps e.g with run;) as its quite difficult to read that for example - using the {i} above the post:
proc import table="sales" out=sasuser.sales dbms=access replace; database="\\americredit.com\db_files\aoc\sa\ar\analytics\rdw.accdb"; run;
To add, what you have there is Named Literals - but you are missing the "n" to indicate that they are so. You will find information on them here:
I would still suggest avoiding the use of them however, there doesn't seem to be any need in the code you give.
Just use valid variable names, and your problems will be gone.
'WIN LOSS' is not a valid SAS name, for instance.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.