- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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..
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I concur with this: "Beat up whoever created it."
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.