Youssef,
I would consider creating the code that would automatically create the SQL statements for your queries but I don't see anything in your posts that provides a solid business requirement to justify my/your time in doing this.
Could you possibly share your business need or context for this question?
Duane Hookom MVP
MS Access
> To: MS_Access_Professionals@yahoogroups.com
> From: JohnV@msn.com
> Date: Thu, 29 Nov 2012 11:02:26 +0100
> Subject: Re: [MS_AccessPros] count
>
> Youssef-
>
> Build a query using either Graham's or Duane's expression on every one of
> your text fields in the table. Build a Totals query on that to Sum the
> counts.
>
> For example, if the field is named "Comments", put this on the Fields line:
>
> CommentSCount: (Len([Comments])-Len(Replace([Comments], "S", ""))
>
> John Viescas, Author
> Microsoft Access 2010 Inside Out
> Microsoft Access 2007 Inside Out
> Microsoft Access 2003 Inside Out
> Building Microsoft Access Applications
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
>
> -----Original Message-----
> From: Youssef <youssef2309@gmail.com>
> Reply-To: <MS_Access_Professionals@yahoogroups.com>
> Date: Thursday, November 29, 2012 10:48 AM
> To: <MS_Access_Professionals@yahoogroups.com>
> Subject: Re: [MS_AccessPros] count
>
> i need to count the number of a certain character (for example "S") in all
> table fields and records.
>
>
>
> --- In MS_Access_Professionals@yahoogroups.com, John Viescas <JohnV@...>
> wrote:
> >
> > OK, I give up! 😃
> >
> > John
> >
> > -----Original Message-----
> > From: Graham Mandeno <graham@...>
> > Reply-To: <MS_Access_Professionals@yahoogroups.com>
> > Date: Thursday, November 29, 2012 10:03 AM
> > To: <MS_Access_Professionals@yahoogroups.com>
> > Subject: RE: [MS_AccessPros] count
> >
> > Hi John
> >
> >
> >
> > How about this?
> >
> > (Len([YourExpression])-Len(Replace([YourExpression], [SearchString],""))
> >/
> > Len([SearchString])
> >
> >
> >
> > -- Graham
> >
> >
> >
> > From: MS_Access_Professionals@yahoogroups.com
> > [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of John
> >Viescas
> > Sent: Thursday, 29 November 2012 21:50
> > To: MS_Access_Professionals@yahoogroups.com
> > Subject: Re: [MS_AccessPros] count
> >
> >
> >
> >
> >
> > Note, however, that this technique works for "counting" a single
> >character
> > only. My code lets you search for strings of letters.
> >
> > John
> >
> > -----Original Message-----
> > From: John Viescas <JohnV@... <mailto:JohnV%40msn.com> >
> > Reply-To: <MS_Access_Professionals@yahoogroups.com
> > <mailto:MS_Access_Professionals%40yahoogroups.com> >
> > Date: Thursday, November 29, 2012 9:20 AM
> > To: <MS_Access_Professionals@yahoogroups.com
> > <mailto:MS_Access_Professionals%40yahoogroups.com> >
> > Subject: Re: [MS_AccessPros] count
> >
> > Duane-
> >
> > Brilliant!
> >
> > John Viescas, Author
> > Microsoft Access 2010 Inside Out
> > Microsoft Access 2007 Inside Out
> > Microsoft Access 2003 Inside Out
> > Building Microsoft Access Applications
> > SQL Queries for Mere Mortals
> > http://www.viescas.com/
> > (Paris, France)
> >
> > -----Original Message-----
> > From: Duane Hookom <duanehookom@...
> > <mailto:duanehookom%40hotmail.com> >
> > Reply-To: <MS_Access_Professionals@yahoogroups.com
> > <mailto:MS_Access_Professionals%40yahoogroups.com> >
> > Date: Thursday, November 29, 2012 3:40 AM
> > To: Access Professionals Yahoo Group
> > <ms_access_professionals@yahoogroups.com
> > <mailto:ms_access_professionals%40yahoogroups.com> >
> > Subject: RE: [MS_AccessPros] count
> >
> > Count the number of E's in a single field or all fields, a single record
> > or multiple records?
> > Len([YourExpression])-Len(Replace([YourExpression],"E",""))
> >
> > Duane Hookom MVP
> > MS Access
> >
> > > To: MS_Access_Professionals@yahoogroups.com
> > <mailto:MS_Access_Professionals%40yahoogroups.com>
> > > From: youssef2309@... <mailto:youssef2309%40gmail.com>
> > > Date: Wed, 28 Nov 2012 12:40:59 +0000
> > > Subject: [MS_AccessPros] count
> > >
> > > how to count the number of a certain letter "for example letter E"
> > >within a text in the table.
> >
> >
> > [Non-text portions of this message have been removed]
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)
<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Tidak ada komentar:
Posting Komentar