ok i know its odd, but i have a field name:
D.DISPUTE_ID||'0'||R.REASON_NUMB
how do I deal with that in a PROC SQL column name?
thanks!
@StaticFX wrote:
ok i know its odd, but i have a field name:
D.DISPUTE_ID||'0'||R.REASON_NUMB
how do I deal with that in a PROC SQL column name?
thanks!
Beat up whoever created it.
It looks like someone attempted to concatenate some values to create a variable but did it incorrectly, possibly in a macro
If that is the actual name you should be able to reference it using the name literal syntax: "D.DISPUTE_ID||'0'||R.REASON_NUMB"n
I would be very tempted to rename the variable (and fix any process assigning such a name) as typing such a name is asking for syntax errors.
I don't know what you mean by this. That looks like the code is concatenating dispute_id from one table (alias d) and reason_numb from another (alias r) with a "0" in the middle. If this is just part of a select statement, I don't know what needs to change (other than possible issues with leading blanks). If it's part of a create table, you'd just want to do "D.DISPUTE_ID||'0'||R.REASON_NUMB AS your_desired_name," for the syntax.
thats what it is doing in the original query...
but thats the actual column name now lol..I am afraid to rename the field in the original SQL code that creates the table because the table is used by who knows how many other scripts...
I would rename it myself but I cant get it to accept it lol
SELECT ID, [D.DISPUTE_ID||'0'||R.REASON_NUMB], INVOICE_DATE FROM COMBINED;
SELECT ID, "D.DISPUTE_ID||'0'||R.REASON_NUMB", INVOICE_DATE FROM COMBINED;
SELECT ID, `D.DISPUTE_ID||'0'||R.REASON_NUMB`, INVOICE_DATE FROM COMBINED;
nothing works..
@StaticFX wrote:
ok i know its odd, but i have a field name:
D.DISPUTE_ID||'0'||R.REASON_NUMB
how do I deal with that in a PROC SQL column name?
thanks!
Beat up whoever created it.
It looks like someone attempted to concatenate some values to create a variable but did it incorrectly, possibly in a macro
If that is the actual name you should be able to reference it using the name literal syntax: "D.DISPUTE_ID||'0'||R.REASON_NUMB"n
I would be very tempted to rename the variable (and fix any process assigning such a name) as typing such a name is asking for syntax errors.
I concur with this: "Beat up whoever created it."
ahhh i dint see the n after thank you! that was driving me nuts!! 🙂 I am renaming it from the query too lol
PS: im looking for the person who started it! lol
@StaticFX wrote:
ahhh i dint see the n after thank you! that was driving me nuts!! 🙂 I am renaming it from the query too lol
PS: im looking for the person who started it! lol
Start with the person in your shop refers to "macros" the most.
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.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.