Skip to main content

How To Videos: Lucity Queries with Microsoft SQL Server and Excel


What follows is not a blog, but some suggestions on using Microsoft SQL Server "Views" to query your Lucity data using Excel.   This information is intended to assist Lucity software users, and not for any nefarious purposes.

I recommend watching the videos in Full Screen view and with HD resolution.  They're not as blurry as they look on this page!!  Each of these about two minutes long, but the original actions only took 50 seconds each.  (After recording them, I decided to slow them down to make them more watchable.)

1. How to create a SQL Server "View".  

The video shows how to create a new View from the core Work Order table.  (WKORDER - see the data dictionary here.)  The video first shows the simple method of creating a view with all fields, then shows the more effective method of including only needed fields, and re-labeling them with their on-screen names.

Music: "A View to a Kill" - Duran Duran


2. How to Connect to the View with Excel

With a view created, we use Excel's ability to connect to external data sources to directly query the Lucity database.  Notice that we're using a Read-Only user - an extra layer of security that allows the views to be shared without concerns about data changes.  Also, your server and database names will be different.

Music: "Mothership Connection" - Parliament




3. Using the Connection for Excel Queries

The video starts by showing the View, which includes only the Work Order, Category, Project Number, and Total Amount.  (Plus a filter to only get Complete Work Orders with status 999.)  

Once the connection is defined, we create a simple table query (here filtering on one Project Number and doing a simple Sum) and then a Pivot Table.  Read on after the video for a Pro tip!

Music: "Think" - Aretha Franklin  (because of your freeee-dom! from reporting tools)

Pro Tip - if you're creating these spreadsheets and want to share them with people, you should set the spreadsheet to automatically refresh when it opens - and to NOT save data when it's closed... to keep the Excel file tiny.

This text is from Microsoft's support site: https://support.office.com/en-us/article/refresh-an-external-data-connection-in-excel-1524175f-777a-48fc-8fc7-c8514b984440:
  • Click a cell in the external data range. 
  • On the Data tab, in the Queries & Connections group, click the arrow under Refresh All, and then click Connection Properties.
Mouse pointing to the Connection properties command on the ribbon
  • In the Connection Properties dialog box, on the Usage tab, under Refresh control, select the Refresh data when opening the file check box.
  • If you want to save the workbook with the query definition but without the external data, select the Remove data from the external data range before saving the workbook check box.

Popular posts from this blog

The Tectonic Speed of Government, Part 1: Procurement

This post is my reaction to conversations about how hard it is to create change in government, and how government projects (and IT projects in particular) take so long from genesis to completion. This is part 1, about procurement; part 2 will address project implementations . PS - there was a surprise Part 3 of this series later! Warning : what follows is an “inside baseball” discussion of government IT procurement. I’m not trying to dissuade you from reading it, but if you’re not enmeshed in this world you might want to consider reading my articles on lighter topics like organizing your electronic life , the greatness of Abbey Road , or the story behind The Room . If you ARE enmeshed in this topic, then please don’t overlook my call to action at the end! Changing the process will take a group effort, and I’m hoping to get feedback on my scheme to create a library of reusable software specifications. By the way, this post’s first title was “The Glacial Speed of Government” bu

Why the Tectonic Speed of Government?

The original name ("Glacial Speed of Government”) is both cliché and inaccurate, as it implies a faster pace than it used to. I decided that “Tectonic Speed” is more accurate because change in government shows tremendous resistance and moves slowly, but when it happens progress can occur in significant outbursts - and in those moments, there is great opportunity!     Click on "Read the Whole Thing" to access these links: Part 1 |  Part 2   |  Part 3  | Part 4 | Wait there's a Video?!  

Get Your Shit Together: Work Edition

  Photo Credit: Jeremy Keith - https://www.flickr.com/photos/adactio/5757457657 Three years ago, I wrote a piece about organizing your personal electronic life ( https://blog.tectonicspeed.com/2017/09/personal-archiving-get-your-shit.html ), which I sub-titled “Get Your Shit Together” in an homage to George Carlin’s routine about the last two minutes of your life. ( https://youtu.be/LkIqccMRTNo?t=93 ) Recently I’ve been thinking about the equivalent process at work. We are dealing with an over-abundance of electronic files on our shared network drives - and I'll wager that it’s similar for most workplaces. ( NOTE 1 , notes at the end.) ************************************************************************** Disclaimer: All of the ideas expressed in this article are my personal statements and opinions, and do not reflect the opinions/statements of the City of Urbana. ************************************************************************** Extra Disclaimer: I want to g

The Tectonic Speed of Government, Part 4: Momentum

https://www.themoscowtimes.com/2019/11/20/meet-ivan-savkin-russias-human-mountain-a68246 This “Tectonic Speed” series is about why Government IT Projects take such a long time. The name refers to tectonic plates, rubbing against each other. No visible movement for a while then… CRACK! Government change is like that; it can take a long time to build, but when it happens it can be intense.  For more on that here is my 20:50 speech on this theme from the Code for America Summit 2020 , which turned into a virtual event. (I can tell you that it’s 20:50 because of the PechaKucha-ish format: 25 slides for 50 seconds each.) ************************************************************************** Disclaimer: All of the ideas expressed in this article are my personal statements and opinions, and do not reflect the opinions/statements of the City of Urbana. ************************************************************************** One impact of the COVID-19 pandemic is a shake-up of p