[AccessD] Update query syntax

Kathryn Bassett kathryn at bassett.net
Wed Jun 25 15:47:33 CDT 2003


Duh! I wonder why I made it so complicated. I've used LIKE a number of times, but it was always regular queries vs update ones. In any case this:
Like "*35=*"
did the trick!

Still would be interesting to find out why the other ended up being zero records, but I'll wait to find out why since I need to get the db fixed up before the reunion.

Thank you Steve, Charlotte, and Charles for the help. I do understand a little better about how it works, even though I didn't need to make it so complicated.

--
Kathryn Rhinehart Bassett (Pasadena CA)
"Genealogy is my bag" "GH is my soap"
kathryn at bassett.net
http://bassett.net  

> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Steve Grant
> Sent: 25 Jun 2003 10:59:AM
> To: accessd at databaseadvisors.com
> Cc: kathryn at bassett.net
> Subject: RE: [AccessD] Update query syntax
> 
> 
> IIf(InStr([Muir63]![attend],"35=2")>0,"<truepart>","<falsepart>")
> Kathryn,
> 
> To do what you want to do, the easiest is to:
> 1) Add a column (field to you query) like this
> Test: IIf(InStr([[attend],"35=2")>0,"Exist","NotExist")
> 
> 2) In the criteria of the Test field put ="Exist"
> 
> This should limit your query to records that contain "35=2" in the attend field.
> 
> 
> Another way (faster) is to use the LIKE command.
> 1) In the criteria section of your "attend" field put: LIKE *35=2*
> 
> 
> Hope this helps a little.
> 
> 
> Steve
> 
> -----Message d'origine-----
> De : accessd-bounces at databaseadvisors.com 
> [mailto:accessd-bounces at databaseadvisors.com] De la part de Kathryn Bassett
> Envoyé : 25 juin, 2003 13:11
> À : accessd at databaseadvisors.com
> Objet : RE: [AccessD] Update query syntax
> 
> I tried a copy/paste of yours, but it didn't work, saying the were too many closing 
> parameters. Since there were quotes around the true and false with the builder, I copy/pasted 
> "<truepart>","<falsepart>"
> over 
> <truepart>, <falsepart> so that I ended up with:
> IIf(InStr([Muir63]![attend],"35=2")>0,"<truepart>","<falsepart>")
> Now it doesn't give me any errors, but it also says I will now update zero rows - 
> which I know is wrong as there are a bunch with 35=2 - now what?
> 
> Kathryn
> 
> 
> 
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com



More information about the AccessD mailing list