• Tutorials
    • Forms, Navigation
    • Forms, Popup and Context Menus
    • Forms, Color of Fields
    • Forms, Changing the Font
    • Forms, Customizing
    • Forms, Printing Reports
    • Forms, Send Email
    • Forms, Help
    • Grids, Navigation
    • Grids, Scrollbars
    • Grids, Functions
    • Grids, Functions, Refresh
    • Grids, Functions, New Wizard
    • Grids, Incremental Search
    • Grids, Selecting Multiple Records
    • Grids, Find and Find Next
    • Grids, Filters
      • Filters, Creating a New
      • Filters, Getting Fancy
      • Filters, Saving and Reusing
      • Filters, Default Filters
    • Grids, Printing Reports
    • Grids, Customizing
    • Menus, Shortcut Keys
    • Forms, Form Letters
      • How to print a Form Letter, Richtext
      • How to print a Form Letter, PDF
      • How to create your own Form Letter
  • Webinars
  • Training
    • Windows XL Training
    • Mobile Delivery
  • What’s New
  • Follow us on Twitter

TeamDME! XL Help

  • System
    • Company
    • Postal Codes
    • Task
    • User Security
    • Dashboard
    • Report Designer
  • Inventory
    • Item
    • Item Category
    • Item Department
    • Item Manufacturer
    • Item Location
    • Tracked Item
    • Activity
      • Physical Count
      • Item Adjustment Edit
      • Service Transaction Edit
      • Item Transfer Edit
    • Reports
  • Orders
    • Diagnosis Code
    • HCPCS Procedure Code, Edit
    • HCPCS Procedure Modifier
    • HCPCS Coverage Criteria List
    • HCPCS Fee Schedule
    • Physician
    • Payor
    • Therapist
    • Facility
    • Quote
    • Medical Order
    • Point-of-Sale
    • Recurring
    • Claim Pending
    • Claim History
    • Reports
  • Receivable
    • Customer
    • Salesperson
    • Referral
    • Nonallowed Reason
    • Responsible Reason
    • Adjustment Reason
    • Payment Type
    • Payment
    • Reports
      • Aged Receivable Reports
      • Revenue Reports
      • Audit Reports
      • Finance Fee
      • Customer Statement
      • Collection Letter
  • Purchase Orders
    • Purchase Order
    • Purchase History
  • Payables
    • Vendor
    • Unposted Invoice
    • Unpaid Invoice
    • Reports
      • Aged Payable
      • Open Payable
      • Cash Requirements
      • IRS 1099 Forms
  • Ledger
    • Chart of Account
    • Journal Unposted
    • Journal History
    • Bank Register
    • Reports
      • Balance Sheet
      • Income Statement
      • Trial Balance
  • Windows
You are here: Home / System / SQL Editor / How to enter your own SQL Statements
«« SQL EditorCommon SQL Requests »»

How to enter your own SQL Statements

frmsqleditor.jpg

We try to provide every possible report needed to run your business, and provide the ability to answer any question you can imagine, using the filters. But more reports just for the sake of adding a number to our marketing literature is not the best solution. Sometimes, more is more confusing that helpful. But if you have a question that we can’t answer with reports or filters, there is often another solution.

The program stores data in a database based on SQL (Structured Query Language). What that means in English is that it uses a standard way to put data in and get information out. So in most cases, and with the help of a good SQL tutorial, you should be able to answer any question you can think of.

For example; “How many customers do I have?”. Actually that’s an easy one, because we have a report (Customer List) which answers that one. How about “How many customers who are on Oxygen therapy; E1390?”. Again, too easy, because you can use a filter for the HCPCS code on a Revenue report. Let’s try again, “How many active customers do I have?”. Ok, that ones more difficult, but we have to define what we mean by “active”. Let’s define it as any customer who has purchased/rented something in the current year.

First we define which table we want to use (you may have to consult a data dictionary; via IBExpert or other 3rd party program for that information). This one is easy, we want to use the Customer table (conveniently labeled CUSTOMER), and print the Customers name (the fields are LAST, FIRST, MIDDLE, GENERATION).

select distinct LAST, FIRST, MIDDLE, GENERATION from CUSTOMER

Then we want to connect it to the Claims table (conveniently labeled CLAIM) with the following:

inner join CLAIM on (CLAIM.CUSTOMER_ID = CUSTOMER.CUSTOMER_ID)

Next, we want to limit what defines a Current Customer as someone who has made a purchase in the current year with a Where clause such as:

where CLAIM.POSTED > "01/01/2007"

Finally, enter that completed SQL command into the SQL Editor and press F9 to execute it and see the results.

Note: Don’t worry if this seems a bit foreign to you. Pickup a beginner’s book on SQL and before you know it, you’ll be creating your own SQL statements.

Page Tags: Customize, SQL
«« SQL EditorCommon SQL Requests »»

Tell us what you think. Cancel reply

You must be logged in to post a comment.

RETURN TO TOP

Copyright 2014-2025 · TeamDME!, Inc. · All Rights Reserved · Log in