Error 22-322 Syntax Error
Contents |
CommunityCategoryBoardLibraryUsers turn on suggestions Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type. Showing results for Search instead for Do you mean Find a Community
Error 22-322 Syntax Error Expecting One Of The Following
Communities Welcome Getting Started Community Memo Community Matters Community Suggestion Box Have sas error 22-322 syntax error Your Say SAS Programming Base SAS Programming SAS Procedures ODS and Base Reporting SAS/GRAPH and ODS Graphics General
Sas Error 22-322
SAS Programming SAS Studio Data Management SAS Data Management Analytics SAS Statistical Procedures SAS/IML Software and Matrix Computations SAS Data Mining SAS Text and Content Analytics SAS Forecasting and proc sql error 22-322 expecting a name Econometrics Mathematical Optimization, Discrete-Event Simulation, and OR Business Intelligence SAS Enterprise Guide Integration with Microsoft Office SAS Visual Analytics SAS Web Report Studio SAS Stored Processes Administration Administration and Deployment SAS Hot Fix Announcements SAS ITRM Learn SAS SAS Analytics U SAS Certification Customer Intelligence SAS Customer Intelligence SAS Intelligent Advertising Risk Management SAS Risk Management SAS Viya About SAS error 76-322: syntax error, statement will be ignored. Viya SAS Visual Data Mining and Machine Learning Coding on SAS Viya SAS Visual Investigator Health Care and Pharma SAS in Health Care Related Fields SAS Drug Development SASware Ballot Ideas Regional Groups Special Interest Groups SAS Community Denmark SANZOC CoDe SAS German SAS Visual Analytics Nederland Singapore SAS Global Forum 2017 SAS Communities Library Home / Analytics / SAS/IML / ERROR 22-322: Syntax error, expecting one of the f... ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted stringa numeric constant, a datetime constant, a missing value Solved Reply Topic Options Subscribe to RSS Feed Mark Topic as New Mark Topic as Read Float this Topic to the Top Bookmark Subscribe Printer Friendly Page « Message Listing « Previous Topic Next Topic » desireatem Super Contributor Posts: 259 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted stringa numeric constant, a datetime constant, a missing value Options Mark as New Bookmark Subscribe Subscribe to RSS Feed Highlight Print Email to a Friend Report Inappropriate Content 09-25-2014 06:57 PM I
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more
Sas Syntax Error Expecting One Of The Following A Name A Quoted String
about Stack Overflow the company Business Learn more about hiring developers or posting ads error 22-322 syntax error expecting one of the following ( select with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack
Syntax Error, Expecting One Of The Following: A Format Name, ?.
Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ERROR 22-322: Syntax error, expecting one of the following: using CAST up https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/ERROR-22-322-Syntax-error-expecting-one-of-the-following-a-name/td-p/160939 vote 0 down vote favorite I am trying to use some SQL code in SAS within a proc SQL. The original code in DB2 had this which is working fine. I get the below syntax error at as 541 as NC_2,SUM ( CASE WHEN A.R_1='N' AND A.R_2='N' AND A.R_4='Y' then 1 else 0 541 ! end ) as NC_4 FROM ( SELECT CASE WHEN (LENGTH(TRIM(TRANSLATE(cast(ABC_CT as char(4000)), ' __ http://stackoverflow.com/questions/28485042/error-22-322-syntax-error-expecting-one-of-the-following-using-cast 22 202 541 ! ', ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, (, ), *, **, +, ',', -, '.', /, <, <=, <>, =, >, >=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=. ERROR 202-322: The option or parameter is not recognized and will be ignored. Can someone help me? casting db2 sas share|improve this question edited Feb 12 '15 at 20:09 Joe 43.5k52442 asked Feb 12 '15 at 18:28 itsash 32 add a comment| 2 Answers 2 active oldest votes up vote 4 down vote accepted CAST is a conversion/type function - i.e. put in this format. In SAS translate is to replace occurrences of letters so not the same category of functions. I think you're looking for the PUT function that will convert a numeric to character, assuming ABC_CT is numeric. put(ABC_CT, 4000.) Or you can use SQL PASS THROUGH which will run the DB2 code directly on the DB2 server and uses DB2 syntax. Example of the type of syntax from the documentation: proc sql; connect to db2 as db1 (database=sample); select * from connectio
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about http://stackoverflow.com/questions/17328518/macro-variable-quoting-error-with-sas Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Macro variable quoting error with SAS up vote 1 down vote favorite 1 I syntax error am trying to insert a row into a SAS data set using PROC SQL and the values of existing macro variables but I'm getting the standard syntax error message. Here is an example of the code that fails: %let viewname=MKTVIEWS.imei_ref; %let xrc=0; %let xmsg= ; proc sql; create table results (viewname char(40), xrc numeric, xmsg char(200)); insert into results (viewname, xrc, xmsg) values ( %str(%')&viewname%str(%') , &xrc , %str(%')%superq(xmsg)%str(%') ); quit; error 22-322 syntax Here is the error message: ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant, a missing value, +, -, MISSING, NULL, USER. Running the program without the two character macro variables works fine: proc sql; create table results (viewname char(40), xrc numeric, xmsg char(200)); insert into results (viewname, xrc, xmsg) values ( 'MKTVIEWS.imei_ref' , &xrc , '' ); quit; Clearly I'm missing something about macro quoting or something similar. I even tried using temporary macro variables rather than embedding those %STR calls to create a quoted string, but that didn't work either. sas sas-macro share|improve this question edited Jun 26 '13 at 19:19 asked Jun 26 '13 at 19:10 BellevueBob 7,71741644 Sometimes I've noticed SAS gets tripped up by the valid use of macro quoting functions. When this happens, wrapping the troublesome code in a %unquote() will allow the parser to continue. –Robert Penridge Jun 27 '13 at 13:35 add a comment| 3 Answers 3 active oldest votes up vote 3 down vote accepted Maybe I'm missing something, but wouldn't "&viewname" do the job? share|improve this answer edited Jun 26 '13 at 19:51 answered Jun 26 '13 at 19:42 Michael Richardson 2,1141439 Arrgh, yes. Overlooking the