Hot Topic (More than 10 Replies) Counting fields with Sesame (Read 4272 times)
Blightman
Member
*
Offline


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Counting fields with Sesame
May 12th, 2004 at 7:51pm
Print Post Print Post  
I want to count the number of entries retrieved from a specific field only if it meets certain criteria. For example, if the field is "Maryland," then another field counts the number of "Maryland" entries the field has, even if there are different entries in that field, i.e. if it has "Virginia," then "Virginia" gets counted in a different field. Any thoughts on how to do this?
  
Back to top
 
IP Logged
 
TJCajun
Junior Member
**
Offline


"Laissez les bons temps
rouler"

Posts: 72
Location: Louisiana
Joined: Nov 25th, 2002
Re: Counting fields with Sesame
Reply #1 - May 12th, 2004 at 8:26pm
Print Post Print Post  
If I'm understanding your question, you have a single field (more properly known as a Layout Element in Sesame), such as a "State" field that might contain numerous repetitive values for any of the "States".  ie, maybe 14 Marylands, 5 Virginias, 13 Utahs, etc.

Do you then have separate layout elements on the form (on screen) to show the counts for each of the possible entries?  Lets say you only have 5 different states to choose from for valid entries.  Do you then have 5 different layout elements names, one for each valid entry showing on the form? 

Or do you just need to design a Report in Sesame, that will give you the counts of the various values in the single layout element?  Something that might look like:

STATE   COUNT
Maryland  14
       Virginia       5
           Utah     13

(ignore the possibly mis-aligned columns above)

  
Back to top
IP Logged
 
Blightman
Member
*
Offline


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Counting fields with Sesame
Reply #2 - May 12th, 2004 at 8:36pm
Print Post Print Post  

I have a layout element (say, Maryland, Virginia, Utah for each state).  I also have the one layout element where I  where the states are imported. 

There is another layout element that separates the "state" layout element into the appropriate locations so that each state gets counted according to the results, just how you (TJCajun) have listed.  Any suggestions?

Sans souci, monsieur.
  
Back to top
 
IP Logged
 
TJCajun
Junior Member
**
Offline


"Laissez les bons temps
rouler"

Posts: 72
Location: Louisiana
Joined: Nov 25th, 2002
Re: Counting fields with Sesame
Reply #3 - May 12th, 2004 at 11:29pm
Print Post Print Post  
I'm going to sort of apologize in advance, because I can't offer specific programming statements to solve your needs.  I hope by asking questions, and offering some "conceptual help" or ideas, that I'll be of help to you.  Maybe others with more experience will jump in and offer some more definite ideas.

I'm still trying to get a feel for your application, so you may need to correct me, and/or offer more explanation.  It sounds like you have the single layout element that you import the "State" data into, and then separate LE's (one for each state) - so this would be 50 LE's?  Somehow you then have programming to "mark" the proper individual LE for the correct state.  All this sounds a bit complicated to me, and be quite a bit of programming to set up.

Are there other LE's that receive imported data, such as for Address, City, Phone# and so forth?  Maybe if you can describe the application a little more, it will make more sense.

Unless you need to see on the screen, as you are looking at records, a cumulative "total" of the counts for each state, then I think what you should be using is a Report.  Please do clarify if you want to see these counts while looking at records on-screen.  (and maybe WHY you need this?) Or would it be satisfactory to generate a report to show the listing of states and the count for each state?  Such a report should be fairly easy to set up. 

Wink  I live in the central part of Louisiana., but don't speak French other than a very few words, or phrases.  "Let the good times roll" is one of those!
  
Back to top
IP Logged
 
Blightman
Member
*
Offline


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Counting fields with Sesame
Reply #4 - May 13th, 2004 at 12:46pm
Print Post Print Post  
I'm still trying to get a feel for your application, so you may need to correct me, and/or offer more explanation.  It sounds like you have the single layout element that you import the "State" data into, and then separate LE's (one for each state)

This statement is exactly correct. 

There are other LE that have other pieces of information that I import into the database.  You asked what the purpose of the database is.  My company has assigned me to build a database to compile a huge amount of information in relation to our client contracts.  The database includes their name, client number, address, our costs with them, the amount of materials we received from them, and lots of other miscellaneous pieces of information that we need to track.

The LE in question is actually not a state--I just used that as an easier way to state my problem.  The LE is really imported from a Microsoft Excel spreadsheet.  I used to keep track of everything in Excel, but it was ridiculously time consuming, so I starting building this database to take the raw data and sort it into the appropriate fields and perform certain calculations along the way.  Everything is completed with the database except for this and one other issue.

I have programmed one LE to give me a total calculation--that's the easy part.  I import the data into the various parts of the database, and one of them tracks the errors that were made.  There are certain key words in that LE that I want to count in a different LE based off a key word.  For example, if the word "dry ice" is found in the LE, then there is another LE that counts that key word with the previous records that also contained the word "dry ice" in the retrieved records.  There are about twelve different key words that I have in the LE that need to be sorted.  I need to sort them because of the legal or regulatory issues involved.  I hope this helps.

"Sans souci, monsieur" means "without a care, sir."
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Counting fields with Sesame
Reply #5 - May 13th, 2004 at 12:53pm
Print Post Print Post  
Are the keywords in the form of a semicolon separated list?
i.e.: Maryland;Virginia;Virigina;Vermont;New Hampshire

  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Blightman
Member
*
Offline


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Counting fields with Sesame
Reply #6 - May 13th, 2004 at 3:43pm
Print Post Print Post  
Are the keywords in the form of a semicolon separated list?
i.e.: Maryland;Virginia;Virigina;Vermont;New Hampshire

The keywords are separated in an Excel spreadsheet and saved as a comma spliced version.  When they are imported into the database in the specific layout element, they are not separated with semicolons.  Instead, each new state is added to a new record.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Counting fields with Sesame
Reply #7 - May 13th, 2004 at 4:24pm
Print Post Print Post  
Blightman,

I'm having trouble getting a clear picture of what data you have and what needs to be done with it. I can't tell if we have an LE with a list of states or a batch of records with one state each that needs to be counted or something else entirely. I'm also not sure where the counts are meant to end up.

Could you clarify what you need to do? Perhaps you could upload your db/dat to somewhere where we could actually see it, as a point of reference?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Blightman
Member
*
Offline


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Counting fields with Sesame
Reply #8 - May 13th, 2004 at 8:41pm
Print Post Print Post  
If you give me an e-mail address, I can send you the .dsr/.dat files as an attachment.  Thanks.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Counting fields with Sesame
Reply #9 - May 13th, 2004 at 9:26pm
Print Post Print Post  
Send them to support@lantica.com marked to my attention.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Counting fields with Sesame
Reply #10 - May 16th, 2004 at 2:34pm
Print Post Print Post  
Quote:
1. In the .dsr file: New Database->Forms->Redesign a form->New
database->Main report card.  On the "violations" sub form, "violation code" layout element, I will import data into this field, and the codes will be according to the "summary" sub form and  the "CIN," "CKL," etc. layout elements.  With each succeeding record, I want the "CIN" layout element to count each "CIN" from "violation code" from the retrieved records.   I think a loop is what I need.


Okay, I think I see what you are trying to do here. Each record has a single violation code on the Violations tab. The Summary Tab is meant to contain a running total from all "previous" records. Is this right?

If so, the problem is with the concept of "previous". Databases store records in a randomized order. Just because a record is "before" another does not mean it always will be. You can resort your records at will, thus blowing your running totals. This is the kind of information that should be generated on the fly, as needed, using a Report or a Mass Update. Would you like an example of this? 

If so, do you want it to print to a printer or display on screen?
These report cards appear to summarize violations by state. Is this correct?

Quote:
2.  In the .dsr file: New Database->Forms->Redesign a form->New
database->Main form.  This is just a bunch of command buttons.  Using the "by cost" command button, I want that button to retrieve the records from the "main report card" database according to the "enter beginning date" and
"enter ending date" and put the information into New
Database->Reports->Redesign a report->New database->By cost.  I cannot figure out how to do this.  How do I do that?

The Inside Sesame article I mentioned has examples of doing exactly this. See the example of using GlobalValue. Also see the example of using date ranges for how to set the date element in the Retrieve Spec.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Blightman
Member
*
Offline


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Counting fields with Sesame
Reply #11 - May 17th, 2004 at 3:41pm
Print Post Print Post  
Okay, I think I see what you are trying to do here. Each record has a single violation code on the Violations tab. The Summary Tab is meant to contain a running total from all "previous" records. Is this right?

This is correct.


If so, the problem is with the concept of "previous". Databases store records in a randomized order. Just because a record is "before" another does not mean it always will be. You can resort your records at will, thus blowing your running totals. This is the kind of information that should be generated on the fly, as needed, using a Report or a Mass Update. Would you like an example of this?   

I don't need a running total--just the total for the "search results retrieve."  That number will change according to the date range that I want.  An example of this would be wonderful.


If so, do you want it to print to a printer or display on screen?
These report cards appear to summarize violations by state. Is this correct?

This, too, is correct.  Thanks for your help.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Counting fields with Sesame
Reply #12 - May 17th, 2004 at 6:50pm
Print Post Print Post  
Blightman,

I was trying to make you an example, but I can't find any field on your Form that shows the State. I can't summarize by State without a State value. In addition, most of your sample records are empty of everything but a code. Those that are filled in reference Santiago, Chile and Nowheresville, USA. I'm going to need some guidance regarding what I'm meant to be summarizing by.

Actually, at closer look, you talk about the Violations subform, which does exist, but your Main Report Card form does not display this subform. Instead, it has it's own separate set of Violations elements. You appear to have many of your fields and elements repeated three times in various databases.

This is just a suggestion, but I think you may need to finalize and clarify your design before we worry about these programming routines.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Blightman
Member
*
Offline


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Counting fields with Sesame
Reply #13 - May 18th, 2004 at 1:43pm
Print Post Print Post  
Let me clarify a few things.  "I can't find any field on your Form that shows the State. I can't summarize by State without a State value." 

There really isn't a state value on the .dsr form that I sent you.  That was just an example that I used when I first wrote my question here in the forum because I felt that by discussing this as a state and state value would make it easier for others to understand.  The "Santiago Chile" and "Nowheresville USA" were just test files to make sure that the database would work properly.  They will be deleted once all the problems are worked out.  I haven't imported all the files into the database.  I can delete those, import the files that I will really use, and then send them over to you so that you can manipulate them, if you would like.


"Actually, at closer look, you talk about the Violations subform, which does exist, but your Main Report Card form does not display this subform. Instead, it has it's own separate set of Violations elements."

I think I wrote the wrong terms here.  "Violations subform" should be "violations tab."  "Summary subform" should be "summary tab."  Both of these are on the "main report card" database.  I want the "violation code" layout element to be the determining factor on the "summary" tab.  The "CIN," "CKL," etc. layout elements will count the matching "violation code."  That might clear up some confusion. 


"You appear to have many of your fields and elements repeated three times in various databases."

I have these fields in other databases because when I was first learning the program, I built some databases that I thought I would use.  As time went on, I decided that it would be easier to put everything in one database ("main report card").  Once I figure out everything, I will delete all the databases in "NewDatabase0" and "Samples."

Thanks again.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Counting fields with Sesame
Reply #14 - May 18th, 2004 at 2:27pm
Print Post Print Post  
Quote:
There really isn't a state value on the .dsr form that I sent you.  That was just an example that I used when I first wrote my question here in the forum because I felt that by discussing this as a state and state value would make it easier for others to understand.  The "Santiago Chile" and "Nowheresville USA" were just test files to make sure that the database would work properly.  They will be deleted once all the problems are worked out.  I haven't imported all the files into the database.  I can delete those, import the files that I will really use, and then send them over to you so that you can manipulate them, if you would like.


Having real data to work with will be very helpful, both in terms of producing the examples, and also in terms of you understanding what was done.  Smiley
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Counting fields with Sesame
Reply #15 - May 18th, 2004 at 5:39pm
Print Post Print Post  
Blightman,

I got your appplication. Of the 925 records, only 48 have a violation code, so I assume that those are the only ones we're interested in.

Which way do you want this?
Option 1: State is Primary
MA
  CIN    5
  CKL    2
  DIL    3
Total for MA: 10

VA
  CIN    4
  CKL    1
  DIL     1
Total for VA: 6

TOTAL: 16
------------------------

Or Option 2: Violation Code is primary

CIN
  MA    5
  VA    4
Total CIN: 9

CKL
  MA    2
  VA    1
Total CKL: 3

DIL
  MA    3
  VA    1
Total DIL: 4

TOTAL: 16
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Blightman
Member
*
Offline


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Counting fields with Sesame
Reply #16 - May 18th, 2004 at 8:24pm
Print Post Print Post  
Hammer,

It is safe to assume that what I sent you are the only records in question.  Thousands more will be imported later.

Option #2 is what I want to do.  What other questions do you have?

By the way: how do you quote from a previous post?  That would make my quotes more presentable.
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Counting fields with Sesame
Reply #17 - May 18th, 2004 at 9:54pm
Print Post Print Post  
In reply to your question about making Quotes on the forum:

I have provided a reply in a thread with its own Subject named "Forum Quoting" at
http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=gen_disc;action=post2
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Counting fields with Sesame
Reply #18 - May 19th, 2004 at 2:43pm
Print Post Print Post  
Blightman,

Attached is a Mass Update showing an example of doing this. Retrieve your records, sorted by violation code. Run this Mass Update.

Note that about 80 percent of this code is only necessary because the State is buried in the City value and must be parsed out. Because of this, we have to do a bunch of bookkeeping to track the occurences, rather than just being able to sort by State.

This can also be adjusted so that you click a command button, or so that the output goes to a printer.

The Mass Update will produce something like this in the WriteLn window:
Code
Select All
Violation: CIN
		3
HI		2
Total Violations for CIN: 5
----------
Violation: GEN
WI		1
		1
Chile		1
Total Violations for GEN: 3
----------
Violation: INS
Chile		1
TX		1
Total Violations for INS: 2
----------
Violation: NCK
NY		1
MI		1
IN		1
Total Violations for NCK: 3
----------
Violation: NCL
VA		1
NC		1
NY		2
CO		2
IL		2
NV		1
TX		1
TX		1
FL		1
HI		1
PA		1
MO		1
OK		1
AR		1
OH		1
Total Violations for NCL: 18
----------
Violation: SHC
MA		1
GA		1
Total Violations for SHC: 2
----------
Violation: SHP
LA		1
Total Violations for SHP: 1
----------
Violation: SPC
MS		1
NJ		1
Total Violations for SPC: 2
----------
Violation: TMP
SD		2
AZ		3
VT		1
PA		1
LA		2
VA		1
CO		1
CA		1
Total Violations for TMP: 12
----------
---------------------------------
---------------------------------
Total Violations: 48 




Here's the code:
Code
Select All
** PROGRAMMING SECTION: [ GLOBAL CODE ] [] **
// Declare variable to hold the compare values
stat gvState as String
stat gvViolation as String

// Declare variable to hold summary
stat gvGrandTotal as Int

// Declare array to hold state totals
stat gvaStateCounts as Array[100, 2] of String

// Function to parse the State out of the City value.
// The State is whatever follows the comma and space.
Function GetState(vVal as String) As String
var vPos as Int
var vLen as Int
var vRet as String

	vRet = ""
	vLen = @Len(vVal)

	// Find the comma
	vPos = @InStr(vVal, ",")

	// Advance past the comma and space
	vPos = vPos + 2

	// Make sure there is something there
	If(vLen >= vPos)
	{
		// Parse out the State.
		vRet = @Mid(vVal, vPos, vLen)
	}

	Return(vRet)

End Function

// Subroutine to clear state totals array
Subroutine ClearCounts()
var vOuterLoop as Int
var vInnerLoop as Int

	For vOuterLoop = 1 To 100
		For vInnerLoop = 1 To 2
			gvaStateCounts[vOuterLoop, vInnerLoop] = ""
		Next
	Next

End Subroutine

// Function to find a state in the state totals array
Function FindState(vVal as String) As Int
var vLoop as Int
var vRet as Int

	vRet = 0
	vLoop = 1
	While((vLoop <= 5) And (vRet = 0))
	{
		If vVal = gvaStateCounts[vLoop, 1]
		{
			vRet = vLoop
		}
		vLoop += 1
	}

	Return(vRet)

End Function


// Function to find an empty slot in the state totals array
Function FindStateSlot() As Int
var vLoop as Int
var vCount as Int
var vRet as Int

	vRet = 0
	vLoop = 1
	While((vLoop <= 100) And (vRet = 0))
	{
		vCount = @ToNumber(gvaStateCounts[vLoop, 2])
		If (gvaStateCounts[vLoop, 1] = "") And (vCount = 0)
		{
			vRet = vLoop
		}
		vLoop += 1
	}

	Return(vRet)

End Function


// Subroutine to write summary to WriteLn Window
Subroutine WriteSummary()
var vLoop as Int
var vCount as Int
var vTotal as Int

	WriteLn("Violation: " + gvViolation)
	For vLoop = 1 To 100
		vCount = @ToNumber(gvaStateCounts[vLoop, 2])
		If (gvaStateCounts[vLoop, 1] <> "") Or (vCount > 0)
		{
			WriteLn(gvaStateCounts[vLoop, 1] + Tab(2) + @Str(vCount))
			vTotal += vCount
		}
	Next
	WriteLn("Total Violations for " + gvViolation + ": " + @Str(vTotal))
	WriteLn("----------")
	gvGrandTotal += vTotal

End Subroutine


	// Initialize variables to values in first record
	gvState = GetState(City0)
	gvViolation = Violation Code

	// Initialize Summary
	gvGrandTotal = 0

	// Initialize State Counts
	ClearCounts()
	gvaStateCounts[1, 1] = gvState
	gvaStateCounts[1, 2] = "0"






** PROGRAMMING SECTION: [Courier] [Mass Update] **
var vCurState as String
var vCurViolation as String
var vPos as Int

	// Initialize variables to values in current record
	vCurState = GetState(City0)
	vCurViolation = Violation Code

	If vCurViolation <> gvViolation
	{
		WriteSummary()
		ClearCounts()
		gvaStateCounts[1, 1] = vCurState
		gvaStateCounts[1, 2] = "0"
		gvViolation = vCurViolation
	}

	vPos = FindState(vCurState)
	If vPos > 0
	{
		gvaStateCounts[vPos, 2] = @Str(@ToNumber(gvaStateCounts[vPos, 2]) + 1)
	}
	Else
	{
		vPos = FindStateSlot()
		If vPos > 0
		{
			gvaStateCounts[vPos, 1] = vCurState
			gvaStateCounts[vPos, 2] = @Str(@ToNumber(gvaStateCounts[vPos, 2]) + 1)
		}
	}

	If @ResultSetCurrentPosition() = @ResultSetTotal()
	{
		WriteSummary()
		WriteLn("---------------------------------")
		WriteLn("---------------------------------")
		WriteLn("Total Violations: " + @Str(gvGrandTotal))
	} 

  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Blightman
Member
*
Offline


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Counting fields with Sesame
Reply #19 - May 19th, 2004 at 6:41pm
Print Post Print Post  
Hammer,

Brilliant!  You're amazing.  I never would have figured out this on my own.  Thanks  Grin

When I copied the code into my database as a global code, I tested the database for errors.  On every single layout element in which I have coding (about 15), I have the following error on line 1, position 1:

Statement or End-of-Line expected OR
Unknown identifier

Is the Global Code overwriting the individual programming that all ready exists, so the database isn't certain which programming code to run?  Is it something else?
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Counting fields with Sesame
Reply #20 - May 19th, 2004 at 6:47pm
Print Post Print Post  
Blightman,

The code I provided is a Mass Update, not regular Form programming. Part of it goes in Global Code for the Mass Update, the other part can go in any other element.

The part headed with
** PROGRAMMING SECTION: [ GLOBAL CODE ] [] **
goes in Global Code. Do not include the header line itself.

The part headed with
** PROGRAMMING SECTION: [Courier] [Mass Update] **
goes in any other element. Do not include the header line itself.

Remember to sort your retrieved records by violation code, or it won't work properly.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Blightman
Member
*
Offline


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Counting fields with Sesame
Reply #21 - May 19th, 2004 at 6:58pm
Print Post Print Post  
Hello?!  I should have caught that.  I think I have the after-lunch nods....
  
Back to top
 
IP Logged
 
Blightman
Member
*
Offline


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Counting fields with Sesame
Reply #22 - May 19th, 2004 at 7:55pm
Print Post Print Post  
Just out of curiosity, and for my own reference in the future, if I wanted option #1 (State is primary), if I were to take the code you sent and change the references to "state" and make them "violation," would I get the the results that I would want?
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Counting fields with Sesame
Reply #23 - May 19th, 2004 at 8:04pm
Print Post Print Post  
Quote:
Just out of curiosity, and for my own reference in the future, if I wanted option #1 (State is primary), if I were to take the code you sent and change the references to "state" and make them "violation," would I get the the results that I would want?


Nope!  Smiley

The need to parse out the State and manually keep track of it means that the code would need some adjustments to manage State being primary. That's why I asked before creating the code.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged