Pedro Janssen
pedro at plex.nl
Mon Dec 14 03:33:26 CST 2009
Hello David,
the query, almost does what i want.
SELECT Concl,
Mid([Concl],InStr(1,[Concl],"(")+1,InStr(InStr(1,[Concl],"("),[Concl],")")-2)
AS Expr1
FROM YourTable
WHERE (((Concl) Like "*(*)*"));
- Only when there are more values with ( ) it only returns the first value
- The value that is returned ( ) also gives part of the rest of the concl
text after the ) but sometimes it is cut off after a certain length and
sometimes not. I Tried to variabel the "compare argument", but no result.
for example (what the expression returns)
Concl expr1
aaa (g2Ta)bbbbcccc g2Ta)bbbbc
aaaaa(g2Ta)cccccccdddddd g2Ta)ccccccccdddd
i don't see the logic of the lengt of the text part after the ) in expr1
How can i solve this?
Pedro
----- Original Message -----
From: "David McAfee" <davidmcafee at gmail.com>
To: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
Sent: Wednesday, December 09, 2009 6:58 PM
Subject: Re: [AccessD] text between ( )
If this looks good:
SELECT Concl,
Mid([Concl],InStr(1,[Concl],"(")+1,InStr(InStr(1,[Concl],"("),[Concl],")")-2)
AS Expr1
FROM YourTable
WHERE (((Concl) Like "*(*)*"));
you can do it like this:
UPDATE YourTable SET YourTable.fldSelection =
Mid([Concl],InStr(1,[Concl],"(")+1,InStr(InStr(1,[Concl],"("),[Concl],")")-2)
WHERE (((YourTable.Concl) Like "*(*)*"));
On Wed, Dec 9, 2009 at 8:13 AM, Pedro Janssen <pedro at plex.nl> wrote:
> Dear Group,
>
> is it possible to filter out text between ( ) in a field [Concl] and place
> only the text between ( ) in a new field [fldSelection], with a query.
>
> Thanks
>
> Pedro
> --
> 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