Writing a query

  • Thread starter Thread starter Rebecca Farmer
  • Start date Start date
R

Rebecca Farmer

This is the query that I have written and is pretty crude
but works. The only problem I have is that I want to pull
all records from the select fields that have GB in them.
The only problem is that each record has a ; seperating
each field. What can I use to make sure it pulls each
record?

SELECT [deletion of cfs e-mails].[EM #], [deletion of cfs
e-mails].ID, [deletion of cfs e-mails].BATES, [deletion of
cfs e-mails].[DATE/TIME 1], [deletion of cfs e-mails].
[FROM 1], [deletion of cfs e-mails].[TO 1], [deletion of
cfs e-mails].[CC 1], [deletion of cfs e-mails].[DATE/TIME
2], [deletion of cfs e-mails].[FROM 2], [deletion of cfs e-
mails].[TO 2], [deletion of cfs e-mails].[CC 2], [deletion
of cfs e-mails].ATT, [deletion of cfs e-mails].RE,
[deletion of cfs e-mails].COMMENT, [deletion of cfs e-
mails].ROW
FROM [deletion of cfs e-mails]
WHERE ((([deletion of cfs e-mails].[FROM 1]) Like "GB*"))
Or ((([deletion of cfs e-mails].[TO 1]) Like "GB*")) Or
((([deletion of cfs e-mails].[CC 1]) Like "GB*")) Or
((([deletion of cfs e-mails].[FROM 2]) Like "GB*")) Or
((([deletion of cfs e-mails].[TO 2]) Like "GB*")) Or
((([deletion of cfs e-mails].[CC 2]) Like "GB*" Or
((([deletion of cfs e-mails].[FROM 1]) Like "gb*")) Or
((([deletion of cfs e-mails].[TO 1]) Like "gb*")) Or
((([deletion of cfs e-mails].[CC 1]) Like "gb*")))) Or
((([deletion of cfs e-mails].[FROM 2]) Like "bb*" or
((([deletion of cfs e-mails].[TO 2]) Like "gb*")) Or
((([deletion of cfs e-mails].[CC 2]) Like "gb*"))));
 
Fields are NOT separated by comma in a Record???

Not sure from your description but try:

....
Or ((([deletion of cfs e-mails].[TO 1]) Like "*GB*")) Or
((([deletion of cfs e-mails].[CC 1]) Like "*GB*")) Or
....
 
Back
Top