Organizing / Saving / Deleting Queries

Options
I'm looking for ideas on how best to organize our queries.  Anyone want to share what your organization is doing?

Comments

  • Here's how I approached this for our organization and it's helped to keep us all organized.
    • You'll see I create some folders that serve as headers - and some of these are 'fake' and just serve to identify what is below them. Headers are highlighted in blue; other folders are in green.

    General  
    • Unfortunately we're stuck with this default folder - you can't rename or delete it
    • Our rule is to have this EMPTY - we want all queries within the logical structure we're laying out below

    ^TEMPLATES (header)
    • We created a large set of basic queries for common requests and keep them in this folder (we have 100+ templates)
    • They're all named starting with ^ symbol and CAPS to mark them as templates.
    • Staff to use templates as starting point and if they are changing, they then save them out under their own folders
    Here are some sample folders under this templates section:

    ^ANNUAL-Annual Meeting Invitation

    ^APPEAL-Annual Appeal main query

    ^APPEAL-Annual Appeal take out

    ^BOARD-Board of Directors (all excl deceased)

    ^COMMITTEE-Statewide Review Committee (current only)

    etc.....



    Below the templates, we have our departments listed (fake headers) with individual user folders underneath their respective departments. We also have a few folders for project-based things as well.

    Here's an example:

    -->FINANCE (fake header)

    Smith, Karen (KS)    --- Karen keeps her queries in her folder and names then starting KS-

    Jones, Mary (MJ)

    Pipeline Report

    Donor Statements


    --> EXECUTIVE (fake header with user folders below....)

    --> PHILANTHROPY

    --> PROGRAM

    etc .....



    At the bottom, I have another fake header called

    -- DO NOT USE BELOW --

    followed by additional folders for system-related items that I don't want anyone messing with.

    ^ADMIN/CONFIG

    ^AUDIT-Weekly

    ^AUDIT-Monthly

    ^AUDIT-No Valid address

    ^BBNC (for queries used for NetCommunity)

    ^BBNCE (for queries used for NetCommunity emails)

    etc....



     
  • If you haven't started, it is helpful to use naming conventions and to add info in the description field.  One of my instructors recommended this for the Description field - Criteria / Output / Sort.  This may save some time.
  • Here are some useful questions to ask as well:
    • How much control does your organization want to have over the creation, use and maintenance of queries?
    • Are you concerned with multiple staff creating multiple versions of basically the same query?
    • If some basic data element either enters. changes or leaves your data structure, how will you account for this in queries already created and saved
    • Do you want to monitor queries created by staff to ensure they are structuring the logic correctly to get accurate results? And then you perhaps can target further training required.
    • When staff leave, do you know what to do with the queries they created and used?
  • WOW!  This was my first time to post a question and I'm thrilled at the response! Thank you SO much.  This is FABULOUS. I was kind of headed in that direction, but I really like the way you have the folders organized.  ...and Yes, I have implemented the Criteria / Output / Sort in the description section of the queries.  - You guys ROCK
  • I have usualy broken the folders down like this:

    General

    Alumni

    Appeals

    Demographics/Statistics

    Email Lists

    Event - Golf

    Event - Auction

    Event - Cultivation

    Event (general, small, one-offs)

    Giving

    Housekeeping

    Mail Lists

    Prospects

    Reports - Monthly

    Reports - Annual

    Business Rules



    It has served pretty well.

     
  • Also, if you need to delete some old queries, there's a tool for that.  In any folder, right-click on any query and select [Delete Multiple Queries...].  It can take a while for the tool to open, depending on how many queries you have in your database.  Once open, you can use the 2 dropdowns at the top to select Type and Format; this can also take a while to repopulate the window.  Then check the boxes for those you want to delete and click [Delete Now].  At the bottom is a box to see only your own queries, plus counts for Total Queries (using the criteria in the 2 dropdowns) and Total to Delete (check boxes marked).  The rules for deleting are the same as the normal one-at-a-time deleting, so depending on security settings and query settings, you may not have permission to delete some items.



    This was a huge help to me when I was cleaning the 3k+ queries in our database when I started at my current org.



    As for organizing, I have folders for each User, where I can put queries I've designed for their use.  Then a few others to keep myself (the DBA) organized and some for queries used regularly by different users.



    For staff who use Queries, Reports, Exports, etc. but don't write them, I would suggest considering Favorites instead.  Puts all of those tools on the Home Shell as well as under the Favorites Menu, and eliminates the need to find the Query, then go find the Export.

Categories