The Anatomy of a SQL Statement – The Basics (Part 1)
The Basics
Writing your own query for SAP (or any system) can be very satisfying and cost effective, if you are a user of SBO. Once you understand the basics, you will be able to direct your computer to give you exactly what information you are looking for from the system.
Most systems have some common elements such as Customers, Vendors, Items, and Orders. SBO is no different than any other system in that regard. Each of those elements are stored in tables (or files). If you are familiar with Excel Spreadsheets, then you can grasp the concept of a table. A Table stores information in rows, and for each row, the columns represent different pieces of information that are specific to the row. For example, if we were to look a Customer Master table, the customer numbers would appear in the first column and the corresponding customer name would appear in the second (just like an Excel spreadsheet).
Every system (SAP, MS, etc.) probably has a customer master, but the name of the table is different from one system to another. In SBO, the customer master is called “OCRD”. This is the name that you will use to refer to the customer master in your queries.
Let’s write a query statement in plain English first to get an idea of what information we would like to get out of the system:
“I would like to have a list of all of the customer numbers and names.”
After converting the statement to SQL we will have:
SELECT CardCode, CardName FROM OCRD
Part 2 is HERE.
Thanks to Ed Monk of SBONotes.com
This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.
« SAP Business One Need the Current Date to Use Within Your Query? | Home | The Anatomy of a SQL Statement – SQL Statement Breakdown (Part 2) »
July 30, 2010
by: Wayne Schulz • Epicor, Publishers, Schulz Consulting
July 24, 2010
by: Wayne Schulz • 90minds
July 21, 2010
by: Wayne Schulz • FAQ, Sage MAS 200, Sage MAS 90, Schulz Consulting
July 20, 2010
by: Wayne Schulz • 90minds, Alnoor Cassim
July 19, 2010
by: Brett Zimmerman • Consultant, ERP, ERP Tools, FAQ, General Technology, MAS 200 Extended Enteprise Suite, Sage, Sage MAS 200, Sage MAS 90, Sage MAS 90 Extended Enterprise Suite, Uncategorized, add ons
July 9, 2010
by: Beth Bowers • Beth Bowers, Sage MAS 200, Sage MAS 90, Sage MAS 90 Extended Enterprise Suite, add ons, sage business insights intelligence
July 21, 2010
by: Wayne Schulz • FAQ, Sage MAS 200, Sage MAS 90, Schulz Consulting
July 19, 2010
by: Brett Zimmerman • Consultant, ERP, ERP Tools, FAQ, General Technology, MAS 200 Extended Enteprise Suite, Sage, Sage MAS 200, Sage MAS 90, Sage MAS 90 Extended Enterprise Suite, Uncategorized, add ons
July 9, 2010
by: Beth Bowers • Beth Bowers, Sage MAS 200, Sage MAS 90, Sage MAS 90 Extended Enterprise Suite, add ons, sage business insights intelligence
July 1, 2010
by: Wayne Schulz • 90minds, News, Sage, Sage MAS 90
June 24, 2010
by: Brett Zimmerman • Consultant, FAQ, Sage MAS 200, Sage MAS 90, Sage MAS 90 Extended Enterprise Suite, Schulz Consulting, Uncategorized
June 14, 2010
by: Mark Chinsky • Clients First Business Solutions, Sage MAS 200, Sage MAS 90, Uncategorized
July 21, 2010
by: Wayne Schulz • FAQ, Sage MAS 200, Sage MAS 90, Schulz Consulting
July 19, 2010
by: Brett Zimmerman • Consultant, ERP, ERP Tools, FAQ, General Technology, MAS 200 Extended Enteprise Suite, Sage, Sage MAS 200, Sage MAS 90, Sage MAS 90 Extended Enterprise Suite, Uncategorized, add ons
July 9, 2010
by: Beth Bowers • Beth Bowers, Sage MAS 200, Sage MAS 90, Sage MAS 90 Extended Enterprise Suite, add ons, sage business insights intelligence
June 24, 2010
by: Brett Zimmerman • Consultant, FAQ, Sage MAS 200, Sage MAS 90, Sage MAS 90 Extended Enterprise Suite, Schulz Consulting, Uncategorized
June 14, 2010
by: Mark Chinsky • Clients First Business Solutions, Sage MAS 200, Sage MAS 90, Uncategorized
June 4, 2010
by: Mark Chinsky • Clients First Business Solutions, Sage MAS 200, Sage MAS 90, Uncategorized, jobops
Leave a Comment
You must be logged in to post a comment.