The Wisconsin Geocaching Association

  Login or Register

Website Navigation

62.png Home
15.png WGA Store

49.png Information Center
26.png WGA Newsletters
24.png Reviewer's Words
53.png Presentation Resources
39.png Geocaching Files
27.png Bookmarks
56.png Location Rules and Regs
49.png BOD Info Center

17.png Forums
16.png New Posts
20.png Unanswered Posts

calendar_day.png Upcoming Events
mapicon.png Map
29.png Calendar
11.png Submit Event

mapicon.png WGA State Park CachesNew content !

shield_star.png Cache of the Month
mapicon.png Past Winners Map

LonelyCache.png Lonely Cache Game
mapicon.png Current Map
26.png Scoreboard
11.png Submit Report

rescueiconsm.png Cache Rescue
11.png Submit a Mission

icon_community.gif Members
27.png Your Account
47.png Private Messages
contact_blue.png WGA Member Map
Geocaching_LIVE_poweredby_16.png GC.COM Authorization

icon_members.gif News
tree-T.gif Topics
tree-T.gif Archives
tree-L.gif Submit News

image_cultured.png Photo Gallery
tree-T.gif Updates
tree-L.gif Popular

shield.png Fun Stuff
28.png Recent Logs
TB.gif Picnic to Picnic TB Race Standings
TB.gif WGA Hauler

49.png Board of Directors
 
Contact Us

 
Facebook

Wisconsin Geocaching Association

 
Follow Us

Twitter Button

 
Subscribe to Newsletter

Subscribe to our mailing list

* indicates required
 
Geocaching.com Search
View Search Syntax
 
COTM
Winner -
March 2014 Northern Zone:
Apostle Islands-Mawikwe Sea Caves

Winner -
March 2014 Northeast Zone:
Moscow, We Have A Problem

Winner -
March 2014 West Central Zone:
World Wide Quarters

Winner -
March 2014 South Central Zone:
WSQ Dunn

Winner -
March 2014 Southeast Zone:
Risen King

Winner -
March 2014 Series of the Month:
Woodpecker Series of Johnson Creek


More Info >>>

 
 
Wisconsin Geocaching Association: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
comkelp
WGA Member



Joined: May 31, 2011
Posts: 47
Location: Eau Claire

PostPosted: Tue Apr 16, 2013 7:51 pm Reply with quote Back to top

I'm looking for a macro to total how many caches starting with each letter of the alphabet. In my field notes, I have 26 caches ready to log, when I get this figured out. Thanks ahead!
 
View user's profile Send private message
CodeJunkie
WGA Member



Joined: 2009-07-21
Posts: 8150
Location: Berlin, WI

PostPosted: Tue Apr 16, 2013 8:54 pm Reply with quote Back to top

Not sure about this because I've seen different variations of cache challenges involving the letters of the alphabet. Almost every one that I've seen has specifics regarding the cache name.

Examples:
1) Starts with the letter (simple requirement)
2) Starts with letter, but ignore numbers in front of it.
3) Starts with letter, but ignore WSQ (and similar)
...

I think you get the idea, but if you could be more specific in what you're trying to accomplish perhaps there's a solution.
 
View user's profile Send private message
comkelp
WGA Member



Joined: May 31, 2011
Posts: 47
Location: Eau Claire

PostPosted: Tue Apr 16, 2013 8:59 pm Reply with quote Back to top

Thanks for the reply!

example #1
 
View user's profile Send private message
CodeJunkie
WGA Member



Joined: 2009-07-21
Posts: 8150
Location: Berlin, WI

PostPosted: Tue Apr 16, 2013 9:02 pm Reply with quote Back to top

Not sure of a macro, but thinking this should be doable via the built in filtering. You may need to do 26 filters (one for each starting letter), but ...

Don't have my PC with GSAK handy right now, so I can't test my theory. Writing a macro to do this should be pretty easy though and maybe I'll give it a whirl tomorrow.
 
View user's profile Send private message
comkelp
WGA Member



Joined: May 31, 2011
Posts: 47
Location: Eau Claire

PostPosted: Tue Apr 16, 2013 9:09 pm Reply with quote Back to top

Thanks! I seem to be a very slow learner in gsak. I am making slow progress though.
 
View user's profile Send private message
Lacknothing
WGA Member



Joined: 2009-07-04
Posts: 1923

PostPosted: Tue Apr 16, 2013 9:49 pm Reply with quote Back to top

CodeJunkie wrote:
Not sure of a macro, but thinking this should be doable via the built in filtering. You may need to do 26 filters (one for each starting letter), but ...

Don't have my PC with GSAK handy right now, so I can't test my theory. Writing a macro to do this should be pretty easy though and maybe I'll give it a whirl tomorrow.


If you use http://www.mygeocachingprofile.com/ Isn't that automatically one of the things you can track? I am thinking I have it on my profile.
 
View user's profile Send private message
Team Black-Cat
WGA Webmaster
WGA Webmaster



Joined: 2007-09-13
Posts: 6020
Location: Somewhere in Central WI

PostPosted: Wed Apr 17, 2013 7:37 am Reply with quote Back to top

CodeJunkie wrote:
Not sure of a macro, but thinking this should be doable via the built in filtering. You may need to do 26 filters (one for each starting letter), but ...

Don't have my PC with GSAK handy right now, so I can't test my theory. Writing a macro to do this should be pretty easy though and maybe I'll give it a whirl tomorrow.

Not something for a novice, but this could be done rather easily in GSAC using SQL in a macro. I don't have GSAK on this computer, so I'm not sure of the exact syntax and filed names, but something like this might work.

Code:
SELECT DISTINCT LEFT(CacheName, 1) As 'Name Starts With', COUNT(*) As 'Total'
FROM CacheTable
GROUP BY Left(CacheName, 1)
ORDER BY Left(CacheName, 1)


"LEFT" might actually need to be SubStr(CacheName,1,1) or something like that.

_________________
TBC 
View user's profile Send private message Visit poster's website
WStemple
WGA Member



Joined: 2008-06-23
Posts: 508
Location: Out on the trails.

PostPosted: Wed Apr 17, 2013 8:09 am Reply with quote Back to top

Here is a quick little SQL statement that I whipped up and ran:
Code:
Select upper(substr(ltrim(Name),1,1)) as 'First Character'
     , count(*) as 'Total'
  From Caches 
  Group by upper(substr(ltrim(Name),1,1))
  Order by 1

The LTRIM is used to remove leading spaces from some of the names and the UPPER should be obvious. Just fire up Sqlite Manage from the TOOLS menu and then open the proper database that you want to query.
 
View user's profile Send private message
labrat_wr
WGA Vice-President
WGA Vice-President



Joined: 2007-05-19
Posts: 6003
Location: The Wildside

PostPosted: Wed Apr 17, 2013 9:30 am Reply with quote Back to top

huh???? ran this text through Babelfish and it made no sense at all. What language is this??? Rolling Eyes

_________________
Operor vel Operor Non , Illic Est Haud Tendo

All forum posts are the thoughts and opinions of the poster and do not necessarily reflect the thoughts and opinions of the WGA Board of Directors 
View user's profile Send private message
Team Black-Cat
WGA Webmaster
WGA Webmaster



Joined: 2007-09-13
Posts: 6020
Location: Somewhere in Central WI

PostPosted: Wed Apr 17, 2013 10:08 am Reply with quote Back to top

Like I said, not for a novice, but someone with intermediate GSAK macro experience and a little background in SQL could create a nice, easy to use macro that would spit out exactly what comkelp is asking for. If CJ or Wayne haven't posted a solution by the time I get home, I'll see if I can throw something together.

_________________
TBC 
View user's profile Send private message Visit poster's website
WStemple
WGA Member



Joined: 2008-06-23
Posts: 508
Location: Out on the trails.

PostPosted: Wed Apr 17, 2013 11:55 am Reply with quote Back to top

labrat_wr wrote:
huh???? ran this text through Babelfish and it made no sense at all. What language is this??? Rolling Eyes

What I posted is SQL (Standard Query Language). It is used in thousands of applications and on all type of machines. If you look at some of the macros, you will see SQL statements. The $_sql command is used to execute them in a macro.

This SQL statement is meant to run in the Sqlite Manager window, but can be included in a macro also. Additional things can be done with it, like filtering out archived and disabled caches, etc. Based on the original post, I think this is what he was looking for. Just a simple list of the first character in the name and how many caches start with it.
 
View user's profile Send private message
WStemple
WGA Member



Joined: 2008-06-23
Posts: 508
Location: Out on the trails.

PostPosted: Wed Apr 17, 2013 12:14 pm Reply with quote Back to top

If you add:
Code:
Where upper(substr(ltrim(Name),1,1)) between "A" and "Z"
to the SQL statement, then you have what he is looking for based on his response to CJ's list of different type of challenges. It just gets add after the FROM Caches clause.
 
View user's profile Send private message
CodeJunkie
WGA Member



Joined: 2009-07-21
Posts: 8150
Location: Berlin, WI

PostPosted: Wed Apr 17, 2013 7:40 pm Reply with quote Back to top

AHHH! It feels good to dabble in programming for a change.

Got it working via a macro:
http://webpages.charter.net/edmarks/GSAK/FoundCachesByInitialCharacter.gsk

You should be able to "right click" on the link and save this to your PC and then install the macro.

It runs a query for the "FOUND" caches and displays the data in a webpage.
 
View user's profile Send private message
comkelp
WGA Member



Joined: May 31, 2011
Posts: 47
Location: Eau Claire

PostPosted: Wed Apr 17, 2013 8:06 pm Reply with quote Back to top

Thanks Everyone! I appreciate your help and glad to say I got it.........finally!
 
View user's profile Send private message
Team Black-Cat
WGA Webmaster
WGA Webmaster



Joined: 2007-09-13
Posts: 6020
Location: Somewhere in Central WI

PostPosted: Thu Apr 18, 2013 7:16 am Reply with quote Back to top

Good job CJ!
Don't forget to set a filter for found caches if you don't have a seperate database for them.

EDIT: Scratch that. I didn't see the "Where Found" the first time through...

_________________
TBC 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2008 phpBB Group
:: Theme & Graphics by Daz :: Ported for PHP-Nuke by nukemods.com ::
All times are GMT - 6 Hours
 
Forums ©
 
Legal Notice | Privacy Policy | Terms of Use | Parental Consent Form | contact | Comments ]

All content © 2013 Wisconsin Geocaching Association, except comments and forum entries which are property of their posters.

The Groundspeak Geocaching Logo is a registered trademark of Groundspeak, Inc. Used with permission.
 


Use of this Web site constitutes acceptance of the WGA Terms of Use


Distributed by Raven PHP Scripts
New code written and maintained by the RavenNuke™ TEAM


(Original PHP-Nuke Code Copyright © 2004 by Francisco Burzi)
Page Generation: 0.13 Seconds

:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional & XHTML 1.0 Transitional Compliance by RavenNuke™ TEAM ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation :: W3C XHTML 1.0 Transitional Compliance Validation ::