BookmarkSubscribeRSS Feed
chennupriya
Quartz | Level 8


I wrote a case statement

case when

else 'priya & insurance '

But where & sql is asking for substitute any idea ? how to solve . instead of using priya and insurance . I want priya& insurance in code

5 REPLIES 5
Steelers_In_DC
Barite | Level 11

else 'priya & insurance'n

'name'n will allow you to use any name in SAS.

chennupriya
Quartz | Level 8

so what u want me to use

instead of using and  i want to use & and run sql developer

Reeza
Super User

Your question is unclear.

If this is regarding SQL Server then asking it in a SAS forum may not be helpful.

chennupriya
Quartz | Level 8

Do not use ampersand characters '&' in comments in a SQL statement or PL/SQL block. For example, if you enter a script such as:

This & that

error in that case what to do

Tom
Super User Tom
Super User

Not sure what your question is.  It helps to copy in the actual error message.

Perhaps you used "'priya&insurance" then SAS will try to resolve the macro variable reference to the macro variable INSURANCE.

If you enclose your string in single quotes then SAS will not try to evaluate macro triggers like & and %.

'priya&insurance'

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
  • 5 replies
  • 930 views
  • 0 likes
  • 4 in conversation