Skip to content
Workflow · Clean and combine · Opening soon

SQL Server query to Excel on a schedule

Export the purchase order query from SQL Server, then run it through a workflow that writes the results to an Excel file every morning. The sheet can keep one row per supplier, with open order value, oldest order, and flags for overdue, missing supplier, and zero quantity lines.

Early access opens shortly. Check back soon.

Someone typed

“send the results of our sql server open purchase orders query to an excel file every morning, one row per supplier with open order value and the oldest order, and flag orders past their promised date, orders with no supplier, and lines with a quantity of zero”

The agent read it as

Send the results of our SQL Server dbo.PurchaseOrderLines query to an excel file every morning, one row per supplier with open order value and the oldest order, and flag orders past their promised date, orders with no supplier, and lines with a quantity of zero.

What the agent built

1 step, each one an ordinary Mammoth step you can open and change.

  1. File
    SQL Server dbo.PurchaseOrderLines
    CSV export · 44 rows
  2. Step
    Summarize supplier orders
    Step 1
  3. Result
    Open Purchase Order Flags
    14 rows
  4. Schedule
    Runs every morning
    Proposed

On the sample files, every step runs and the result has 14 rows.

What you get back

The result of that run, the rows to look at first.

Open Purchase Order FlagsSample data14 rows
SupplierOpen order valueOldest orderPast-due order linesLines with no supplierZero-quantity lines
Summit Tooling5,2902026-10-02400
Bluepeak Metals3,372.852026-10-09200
Crescent MRO348.752026-10-14200
Riverton Fasteners1822026-09-24200
Harbor Electrical1,518.802026-10-05101
Monarch Gaskets82.502026-10-20101
(no supplier)2,221.802026-09-29040
Pinecrest Packaging8972026-10-07001
Aster Industrial Supply1,174.102026-10-12000
Delta Bearings391.202026-10-27000
Evergreen Plastics1,7162026-10-17000
Ironclad Bearings626.252026-10-22000
14 rows in the result · 12 shown, problems first. Sample data: illustrative figures, not business results.

How it works

How to use the Open Purchase Order Flags workflow

  1. 1Get early accessWe invite people in small batches, job by job. You'll land on this workflow, already built and working on sample files.
  2. 2Swap in your exportsUpload your own files as they come out of your tools. The agent checks the workflow on your rows.
  3. 3Change it in words, then turn it onSay what to change and see the new result before anything saves. Then choose when it runs.

Open Purchase Order Flags: questions

How do you send SQL Server purchase orders to Excel on a schedule?
Export the purchase order query from SQL Server, then run it through a workflow that writes the results to an Excel file every morning. The sheet can keep one row per supplier, with open order value, oldest order, and flags for overdue, missing supplier, and zero quantity lines.
What export should you use from SQL Server?
Use the exported result of the query you want to report on, usually a CSV or Excel file from SQL Server. The workflow reads that file and uses the rows in it.
What happens to rows that do not match a rule?
Rows that do not match a rule stay in the output as they are unless you tell the workflow to filter them out. You can also flag them, group them, or leave them unchanged.
How do you change the rules later?
You edit the steps in words, then rerun the workflow. For example, you can change the supplier grouping, the date checks, or the quantity rule without rebuilding the whole flow.

Get early access to this workflow

It opens already built and working on sample files. Swap in your own exports to see your result.

Early access opens shortly. Check back soon.