Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Integration / Customization
IPA/ProcessFlow
double quotes in column name - can't assign column to a variable
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Zac Shields
Past 24 Hours:
0
Prev. 24 Hours:
2
Overall:
5210
People Online:
Visitors:
427
Members:
0
Total:
427
Online Now:
New Topics
Lawson S3 HR/Payroll/Benefits
Post Tax Benefit Plan Table
11/14/2024 9:16 PM
Hi, totally new to Laswon. I have a repor
Lawson S3 Procurement
ED501 Error: Map 850 not supported by /law/c15vda/lawson/test10/edi/bin/laws_out_91
11/12/2024 3:47 PM
Tried runnning ED501 and getting the atathced erro
Lawson S3 HR/Payroll/Benefits
Error
11/6/2024 9:54 PM
When I try to enroll a retiree in 72.1 health plan
Infor ERP (Syteline)
Syteline: New Data Maintenance Wizard (Error) Need help
11/1/2024 4:24 PM
Hi, I need help with an error on syteline while us
Dealing with Lawson / Infor
Implementing Lawson v10 with Cerner Surginet, Case Cart Picking, and Quick Adds for the OR
10/29/2024 4:20 PM
Hi Everyone, I am wondering if there is any org
Lawson S3 HR/Payroll/Benefits
Canada Tax Calculation (Federal and Provincial) Issue
10/23/2024 5:00 AM
Initially, we had problem with CPP2 calculation is
Lawson S3 HR/Payroll/Benefits
CA Section 125 401k Plan
10/22/2024 10:13 PM
Does anyone have any recommendations on how to fac
S3 Systems Administration
Running AC120 deleted records from ACMASTER table
10/22/2024 3:40 PM
We recently ran the AC120 as normal and somehow it
Lawson S3 Procurement
RQ13 Approval Info
10/17/2024 2:12 PM
When a Requisition is approved on RQ13, what table
S3 Customization/Development
Read and Write CSV file COBOL
10/9/2024 2:53 PM
Does anyone have a quik example of a program that
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3291
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1372
Roger French
1315
mark.cook
1244
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Integration / Customization
IPA/ProcessFlow
double quotes in column name - can't assign column to a variable
Please
login
to post a reply.
17 Replies
0
Subscribed to this topic
52 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
Steve11
Basic Member
Posts: 11
8/24/2010 10:10 PM
I'm using a query in the SQL Query node and the query references a column called UNION. Well, UNION is a keyword in Oracle (no, I didn't create the table, it's Lawson table) so I have to put double quotes around the name for a valid query. The query works fine but the problem is trying to access the "UNION" variable in the query (jobGradeQuery_"UNION"). The Assign node does not like those double quotes. When I try to assign the UNION string to a variable I get an error basically stating that the expression is invalid.
Here's the query:
SELECT ACTIVE, "UNION", SALARYSTRUCTUREGRADE, PAYGRADE FROM LTM.POSITION WHERE HRORGANIZATION = '500'
Here's the assign statement:
foobar = jobGradeQuery_"UNION"
Is there a way to get around this?
thanks,
Steve
Jimmy Chiu
Veteran Member
Posts: 641
8/25/2010 4:13 PM
SELECT ACTIVE, '"UNION"'. SALARYSTRUCT..............
Steve11
Basic Member
Posts: 11
8/25/2010 6:02 PM
I'm already doing that. The problem is trying to assign the data in the "UNION" column to a variable in a processFlow assign node.
Because of the quotes in "UNION" you get a sysax error when trying to assign the column data to a variable.
e.g.
foobar is a varible of type string-
jobGradeQuery is tghe query node name.
the following assignment (done in an assign node) generates a systax error:
foobar = jobGradeQuery_"UNION"
David Williams
Veteran Member
Posts: 1127
8/25/2010 6:07 PM
I was wondering since the field variable name is actually jobGradeQuery_UNION and not just UNION if the quote was really needed? If so then does it make sense that the quotes should go around the whole variable name and not just the end: "jobGradeQuery_UNION" ?
David Williams
Veteran Member
Posts: 1127
8/25/2010 6:07 PM
If you're getting an error on an Assign node, leave the quotes out completely.
Steve11
Basic Member
Posts: 11
8/25/2010 7:09 PM
The field variable name is jobGradeQuery_"UNION". The double quotes are part of the variable name! It can't be changed as it was generated by processFlow. Other field names don't have quotes, as there are no quotes used for those columns in the select clause.
e.g.,
SELECT ACTIVE, "UNION", SALARYSTRUCTUREGRADE, PAYGRADE FROM LTM.POSITION WHERE HRORGANIZATION = '500'
results in variable names of:
jobGradeQuery_"UNION"
jobGradeQuery_ACTIVE
jobGradeQuery_PAYGRADE
etc.
Maybe I could edit the processFlow xml file and try to change the jobGradeQuery_"UNION" variable name?
--Steve
Mark McGee
Posts: 3
8/25/2010 7:23 PM
I had a similar issue which I resolved by using an alias in the sql query:
SELECT ACTIVE, "UNION" as myunion, SALARYSTRUCTUREGRADE, PAYGRADE FROM LTM.POSITION WHERE HRORGANIZATION = '500'
Then the variable would be:
jobGradeQuery_MYUNION
Steve11
Basic Member
Posts: 11
8/25/2010 7:38 PM
Unfortunately the variable becomes
jobGradeQuery_"UNION" as myunion
that's even more of a mess!
I also tried
SELECT ACTIVE, "UNION" "myunion", SALARYSTRUCTUREGRADE, PAYGRADE FROM LTM.POSITION WHERE HRORGANIZATION = '500'
which produces a variable of
jobGradeQuery_"UNION" "myunion"
thanks,
Steve
Mark McGee
Posts: 3
8/25/2010 7:46 PM
Can you reference "union" as r_union instead?
Steve11
Basic Member
Posts: 11
8/25/2010 7:53 PM
sorry, I don't follow you. Do you mean changing the query, or?
Mark McGee
Posts: 3
8/25/2010 8:04 PM
In S3, when the column name in dbdef is an oracle reserved word, the column name inside oracle is preceded by r_.
I am not sure if that is the case with LTM, if so, you could change the sql from select "union" to select r_union.
If that is not the case I am fairly sure that you can use the column number in the variable instead of the name:
jobquery_2 (if this is the second column returned).
Steve11
Basic Member
Posts: 11
8/25/2010 8:26 PM
ah! I'm new to Oracle...
I tried your suggestion and LTM doesn't recognize the r_. I get an "invalid identifier" error.
Nor can I use jobquery_2, it's not recognized as a variable...
thanks,
Steve
John Henley
Posts: 3353
8/25/2010 10:18 PM
Have you tried escaping the double quote character, e.g. "=
Steve11
Basic Member
Posts: 11
8/25/2010 11:43 PM
I tried escaping the processFlow variable name when I made the assignment:
foobar = jobGradeQuery_\"UNION\"
and
foobar = jobGradeQuery_'"UNION"'
and
foobar = jobGradeQuery_""UNION""
none of the above works. Is that what you had in mind?
thanks,
Steve
KK - Infor
Veteran Member
Posts: 61
8/26/2010 3:13 PM
Steve,
Try to assign in the free form JavaScript area in the Assign node.(using the 'Add JavaScript' button).
And then, after the JS Expression, in the same assign node, put - foobar = foobar (using the usual Lawson Assign way). This way you'll be able to see the value in the WU logs.
Hope this helps!
Cheers,
KK
Steve11
Basic Member
Posts: 11
8/26/2010 3:34 PM
KK,
Adding
foobar = jobGradeQuery_LTM.POSITION."UNION"
in the javscript tab of the assign node results in the error msg:
Error while validating expression: foobar = jobGradeQuery_LTM.POSITION."UNION" missing name after . operator.
If Iuse another query variable that doesn't have the double quotes it works fine.
thanks,
Steve
ailsally
New Member
Posts: 2
6/21/2012 2:48 PM
Steve,
You may already have a solution to this issue since this posting is a couple of years old. Anyway, I found that you can use \ as the escape character for the double quote. For example: "\"" + UNION + "\"" will give you the result as "UNION".
Shari
Veteran Member
Posts: 78
6/21/2012 3:34 PM
I will be out of the office Thursday, June 21 through Wednesday, July 4, 2012. If you need immediate assistance, please contact the Service Desk at (215) 542-0730 (support@support.actslife.org). Otherwise I will return your message when I am back in the office. Thank you!
-Shari
>>>
06/21/12 12:00 >>>
Lawson ProcessFlow Forum Notification
----------------------------------------------------------------
Posted by:ailsally
Date: 06/21/2012 09:48 AM
Subject: RE: double quotes in column name - can't assign column to a variable
Message:
----------------------------------------------------------------
Steve,
You may already have a solution to this issue since this posting is a couple of years old. Anyway, I found that you can use \ as the escape character for the double quote. For example: "\"" + UNION + "\"" will give you the result as "UNION".
----------------------------------------------------------------
To view the complete thread and reply via your browser, please visit:
https://www.lawsonguru.co...olumn-to-a-variable/
Thank you,
LawsonGuru.com
You were sent this email because you opted to receive email notifications when someone posted and/or responded to a message on this forum. To unsubscribe to this thread please visit your user profile page and change your subscription options.
Please
login
to post a reply.