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
SQL Query vs Query Node
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
BDell92
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5275
People Online:
Visitors:
497
Members:
0
Total:
497
Online Now:
New Topics
Lawson S3 Financials
Applying credits to open AP invoices
4/28/2025 1:26 PM
Hello, I am new to the Lawson system and after ru
Lawson S3 Financials
Lawson APIA
4/28/2025 1:22 PM
Has anybody recently installed Lawson's APIA m
Lawson S3 Procurement
Tolerance Settings
3/31/2025 2:01 PM
I've been trying to set a tolerance for some t
Dealing with Lawson / Infor
Printing Solutions other than MHC
3/27/2025 1:00 PM
What are others using for printing solutions besid
Lawson S3 Procurement
Green check marks in Lawson 9.0.1
3/20/2025 4:55 PM
Hi, How to remove green check mark on items when o
Lawson S3 HR/Payroll/Benefits
Pay Rate History to Show All Positions
2/26/2025 3:34 PM
Does anyone know how to modify payratehistory.htm
Infor CloudSuite
How to build a Pre-Prod tenant
2/7/2025 1:28 AM
After we finished our implementation and ended our
Lawson S3 Procurement
Browser issue with RQC Shopping
1/28/2025 5:49 PM
Since the recent Chrome/Edge updates, our RQC shop
Lawson S3 Procurement
S3-Procurement New Company
1/22/2025 10:38 PM
My Accounting Department has created a new Company
S3 Customization/Development
JUSTIFIED RIGHT
1/15/2025 7:41 PM
Is there a way in Lawson COBOL to make a character
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
1375
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
SQL Query vs Query Node
Please
login
to post a reply.
9 Replies
1
Subscribed to this topic
52 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
JudeBac
Veteran Member
Posts: 129
3/30/2011 5:21 PM
I am just curious to know if there is a rule of thumb on when to use the SQL Query and Query node. I am bias towards SQL Query, however, most of the time, Query node code is shorter and you do not have to figure out the table/file relations specially if you build the code using the Query builder.
On the other hand, I can write SQL with no tool assistance (very experienced). This thought came about when I am creating a query on tables EMPLOYEE, PAEMPLOYEE, POSITION, JOBCODE.
Thanks,
Jude
David Williams
Veteran Member
Posts: 1127
3/30/2011 5:31 PM
Split
The advantage to using the SQL query is that you're not limited to Lawson's predefined relationships on the tables. Lawson really meant for the SQL query to be used on tables outside of the Lawson system - as an integration tool. Of course, it works both internally and externally, as you know.
It's really a matter of preference.
JudeBac
Veteran Member
Posts: 129
3/30/2011 6:01 PM
Split
I do prefer SQL. I just need to to remember to use RTRIM and alias on strings.
Thanks,
Jude
George Graham
Veteran Member
Posts: 201
3/30/2011 7:09 PM
Split
I think it also depends on what you're going to do the with the data you are querying and the volume. Both are iterative nodes and have overhead just in the iterations themselves. I have sometimes opted for the much more difficult task of writing a very involved SQL query, and then wrapping it in a System Command to have it dump out a csv file. I've seen anywhere from a 10-50x performance difference vs iterations of thousands of records.
But generally I think for basic queries its your comfort level.
Rob Conrad
Veteran Member
Posts: 73
3/30/2011 8:13 PM
Split
Hi Jude -
Your choice really depends on whether you're doing an ETL type thing OR needing to integrate the SQL data iterations into the FLOW itself to execute business logic. Most clients I've worked with need to boost their JVM Heap to handle the overhead from the SQL Iterations - so I recommend really treating the PFLOW more like a Web Presentation Layer and do all your heavy lifting on the DB itself using SP's or Functions or like George recommends with a Command where possible for ETL stuff. I've also witnessed the SQL Node treating SQL Alias a bit weird too - they wouldn't execute in the PF SQL Node, but the same code was fine in Enterprise Manager (on SQL 2005 / SQL 2000 concurrent flow).
RC
JudeBac
Veteran Member
Posts: 129
3/31/2011 12:09 PM
Split
Thanks for the advice guys.
amylynanderson
Advanced Member
Posts: 26
9/20/2013 1:54 PM
Split
How did you get the SQL node to dump to a csv file? I always have to put a file access node in between to write the data our to a file or msg depending on what I need to do the the results.
Kyle Jorgensen
Veteran Member
Posts: 122
9/20/2013 2:25 PM
Split
Amy - that's exactly how you do it. You have to write each record returned by the query.
George Graham
Veteran Member
Posts: 201
9/25/2013 6:10 AM
Split
You can also run the sql from a command line and provide an option to have the sql output to a csv - actually faster than the iterative approach. Then you can manipulate the csv file from inside the flow.
Mr Bill
New Member
Posts: 1
12/2/2013 10:01 PM
Split
The way I look at it is, I use the SQL query for more complex joins and find it is faster. Now for a simple join and a low volume data collection like a record at a time. the DME query is fine and easier to set up.
Please
login
to post a reply.