A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Criteria of two field values being equal



 
 
Thread Tools Display Modes
  #1  
Old February 12th, 2007, 05:53 PM posted to microsoft.public.access.queries
B. Meincke
external usenet poster
 
Posts: 14
Default Criteria of two field values being equal

I need to create a query that returns records from a table where the first
six characters from one field equals the first six characters from another,
and then write an "x" as the value for a third field.

Any help in how the syntax should look for this task would be much
appreciated.

Thanks in advance for any advice.
--
BJM
ACE Assistant
Gary Allan High School
  #2  
Old February 12th, 2007, 06:27 PM posted to microsoft.public.access.queries
Carl Rapson
external usenet poster
 
Posts: 517
Default Criteria of two field values being equal

How about something like this:

UPDATE [table] SET [Field3]='x'
WHERE Left([Field1],6)=Left([Field2],6)

Carl Rapson

"B. Meincke" wrote in message
...
I need to create a query that returns records from a table where the first
six characters from one field equals the first six characters from
another,
and then write an "x" as the value for a third field.

Any help in how the syntax should look for this task would be much
appreciated.

Thanks in advance for any advice.
--
BJM
ACE Assistant
Gary Allan High School



  #3  
Old February 12th, 2007, 06:58 PM posted to microsoft.public.access.queries
B. Meincke
external usenet poster
 
Posts: 14
Default Criteria of two field values being equal

Marvelous!! Worked like a charm. How easy you make these things look. I'm so
thankful for this resource. You guys are awesome!
--
BJM
ACE Assistant
Gary Allan High School


"Carl Rapson" wrote:

How about something like this:

UPDATE [table] SET [Field3]='x'
WHERE Left([Field1],6)=Left([Field2],6)

Carl Rapson

"B. Meincke" wrote in message
...
I need to create a query that returns records from a table where the first
six characters from one field equals the first six characters from
another,
and then write an "x" as the value for a third field.

Any help in how the syntax should look for this task would be much
appreciated.

Thanks in advance for any advice.
--
BJM
ACE Assistant
Gary Allan High School




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.