[AccessD] Update query syntax

Drew Wutka DWUTKA at marlow.com
Fri Jun 20 14:49:15 CDT 2003


Um, after you click IIF, then click <<expr>>, so it's highlighted.  THEN
click Mid$.  It will replace the <<expr>> with the Mid$ statement.

The expression builder is not the worlds most advance tool, but it can be
sort of handy, if you are using a lot of expressions in your queries.

Drew

-----Original Message-----
From: Kathryn Bassett [mailto:kathryn at bassett.net]
Sent: Thursday, June 19, 2003 11:30 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Update query syntax


I've never been able to figure how how to use the query builder. If I click
on IIF and then click on Mid$, I get:
IIf («expr», «truepart», «falsepart») «Expr» Mid$ («stringexpr», «start»,
«length») 

Now, I know I have to replace things like «expr» and «truepart» etc, but I
don't know how to go from there.
I can't figure out how this:
"iif(mid$(attend,1, instr(Attend,"=") +1  ) = '35'"
fits in.
Which part is the expression, which is the truepart and which is the
falsepart, etc.

I'd probably understand it better with a SQL statement, but...

I don't need anything as complicated for updating the Attend35, as all I
have to do is put a 1 in the "update to" box. And when I do the 35=2, I'll
put a 2 in. They won't have both, so don't need to worry about overwriting.

--
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 dave sharpe
> Sent: 19 Jun 2003 4:57:PM
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] Update query syntax
> 
> 
> Kathryn
> 
> I nomally use the query builder. If I read your request
> correctly,I'd use something like
> 
> "iif(mid$(attend,1, instr(Attend,"=") +1  ) = '35'"
> as your condition and
> something like  "val(mid$(Attend,instr(Attend,"=") +1 , 1 )"
> as your replace statement for Attend35 
> 
> Dave
> 
> ----- Original Message ----- 
> From: Kathryn Bassett 
> To: dbAdvisors (AccessD) 
> Sent: Thursday, June 19, 2003 5:51 PM
> Subject: [AccessD] Update query syntax
> 
> 
> I have a field called Attend that is text 100 in length. I've added new
fields called 
> Attend25, Attend35 etc and made then all long integers with zero decimal
places. (The 
> numbers will only be one digit as it is usually just one or two people.)
> 
> We'll use the 35th for the example of what I want to do. I know there is a
way using 
> the queries, to take the contents of Attend, and put it in Attend35.
Before I just 
> try to muddle though it, I thought I'd find out if there is a way to do it
thusly:
> 
> Current sample of Attend is:
> 35=2 30b=2 30a=2 25=2
> 
> If Attend contains "35=1" then put a 1 in Attend35 or if Attend contains
"35=2" then 
> put a 2 in Attend35
> 
> So, what would my query look like to do that?
> 
> --
> Kathryn Rhinehart Bassett (Pasadena CA)
> "Genealogy is my bag" "GH is my soap"
> kathryn at bassett.net
> http://bassett.net  
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

_______________________________________________
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