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:
  • 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” but that title i…

Why the Tectonic Speed of Government?

The original name was "The Glacial Speed of Government” but that title is both cliché and inaccurate, as today it implies a faster pace than it used to. I decided that “Tectonic Speed” is more accurate because you can push very hard, but change in government shows tremendous resistance.  However, when change happens it can occur in significant outbursts - and in those moments, there is great opportunity!

Part 1Part 2  |  Part 3  | Part 4 | Wait there's a Video?!

The Tectonic Speed of Government, Part 3: It’s Never Over

Recently, I wrote two posts discussing why IT Projects take a long time: one on the Procurement Process and one about Project Implementations.  They were written during a time of three simultaneous projects, and they were therapy for me to exorcise some complaints... and make suggestions for others. From the start, I planned those as two topics – and I thought they'd finish the series.

But this third part was a surprise, and the greatest lesson I learned from those projects.
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.
“It ain’t over till it’s over” - Yogi Berra on baseball, not IT projects.Trick Question: When is a software project over?

Answer: Never. 

By “over” I mean the soft…

Tectonic Speed of Government, Part 2: Why do Government IT Projects Take So Long?

This is part two of my series on why government IT projects take so long. Part one complained that the Purchasing process is tough to navigate because methodically describing what you want to buy - and documenting your decision making - takes effort. That blog helped me vent some frustrations about parts of my job, although I admit that it was a little dry. (But please, this is Government Procurement.)

With part two I’m on my home turf: the process that starts with the purchase of an IT tool and ends with its everyday use by people. If the process was successful, users are doing their jobs better than they did before. (A less successful outcome that also occurs: it’s harder to do their jobs, but at least their managers have better data.) This process, which I’ll refer to as the “Implementation” or “Project,” can take months or years for any organization - let alone a government.My first section explains why government IT projects take a long time, while the other three suggest str…