BookmarkSubscribeRSS Feed
Prateek1
Obsidian | Level 7

hi,

 

proc sql;
create table NZ AS
Select Olympicscs1.Probability,Olympicscs1.Account_Name as Client,Olympicscs1.Champ,Olympicscs1.Last_Modified_Date as Modified,
format MMDDYY8.,Olympicscs1.Deal_Comments,Olympicscs1.Tot_Budget format dollar20., Olympicscs2.Digi_Budget format dollar20.
FROM Olympicscs1,Olympicscs2
Where Olympicscs1.Probability=Olympicscs2.Prob_Digi and
Olympicscs1.Account_Name=Olympicscs2.Account_Name and Olympicscs1.Probability NE 0
ORDER BY Olympicscs1.Probability;
quit;

 error:

Syntax error, expecting one of the following: a quoted string, !, !!, &, (, *, **, +, ',', -, '.', /, <,
<=, <>, =, >, >=, ?, AND, AS, BETWEEN, CONTAINS, EQ, EQT, FORMAT, FROM, GE, GET, GT, GTT, IN, INFORMAT,
INTO, IS, LABEL, LE, LEN, LENGTH, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.

ERROR 200-322: The symbol is not recognized and will be ignored.

 

what should be the code ?

 

1 REPLY 1
againreddy
Obsidian | Level 7

In Below highligted column, there is a comma after the column "modified" . Probably you may need to remove it and add it at the end of  "format mmddyy10.".

 

proc sql;
create table NZ AS
Select Olympicscs1.Probability,
Olympicscs1.Account_Name as Client,
Olympicscs1.Champ,
Olympicscs1.Last_Modified_Date as Modified,format MMDDYY
Olympicscs1.Deal_Comments,
Olympicscs1.Tot_Budget format dollar20.,
Olympicscs2.Digi_Budget format dollar20.
FROM Olympicscs1,Olympicscs2
Where Olympicscs1.Probability=Olympicscs2.Prob_Digi and
Olympicscs1.Account_Name=Olympicscs2.Account_Name and Olympicscs1.Probability NE 0
ORDER BY Olympicscs1.Probability;
quit;

sas-innovate-2024.png

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.

 

Register now!

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
  • 1 reply
  • 582 views
  • 0 likes
  • 2 in conversation