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  

2 fields of different lenghts



 
 
Thread Tools Display Modes
  #1  
Old July 17th, 2008, 10:30 PM posted to microsoft.public.access.queries
Revis01
external usenet poster
 
Posts: 1
Default 2 fields of different lenghts

I am creating a queary of 2 tables. Common field is Account number. Table A,
the filed is 15 characters. Table B, the field length is 25, and the 10
extract characters are zeros. How do I get the query to look at just the
first 15 characters of each feild in each table?
  #2  
Old July 17th, 2008, 11:00 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 2 fields of different lenghts

If you plan on joining then in the query then you need another query in front
with a calculated field to join on.
Expr1: Left([Your25CharField],15)

--
KARL DEWEY
Build a little - Test a little


"Revis01" wrote:

I am creating a queary of 2 tables. Common field is Account number. Table A,
the filed is 15 characters. Table B, the field length is 25, and the 10
extract characters are zeros. How do I get the query to look at just the
first 15 characters of each feild in each table?

  #3  
Old July 17th, 2008, 11:02 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 2 fields of different lenghts

Create a query that looks at the first 15 characters of a field (e.g.,
Left([YourFieldName],15) from table 1.

Create a second query that looks at the first 15 characters of a field from
the second table.

Create a third query that uses the first two, joined on that 15 character
field in each.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Revis01" wrote in message
...
I am creating a queary of 2 tables. Common field is Account number. Table
A,
the filed is 15 characters. Table B, the field length is 25, and the 10
extract characters are zeros. How do I get the query to look at just the
first 15 characters of each feild in each table?



 




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 09:25 AM.


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