Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Help with Join

Author  Topic 

rookie_sql
Constraint Violating Yak Guru

443 Posts

Posted - 2006-06-22 : 11:17:40
Hi i've a query that displays a few fields, in one field [Prod_Fam_Num] it display the first 10 char of one of the other field Named [Prod_num], what i want to do is create a join between the new field namd [Prod_Fam_Num] as this data is in another table that holds the Description. i can't use the long name [prod_num] as the other table does not have the long name in it. Is it possible to create the join ?

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2006-06-22 : 19:28:15
You can, but it will be slow.
SELECT A.field1, B.field2
FROM myTable A INNER JOIN myOtherTable B ON A.Prod_Fam_Num = LEFT(B.Prod_Num, 10)

But be aware that Access query designer will barny at this, saying it doesn't recognise the join type. So you'll always need to edit this via the SQL editor in Access.

HTH,

Tim
Go to Top of Page

rookie_sql
Constraint Violating Yak Guru

443 Posts

Posted - 2006-06-23 : 06:54:55
Thanks, that worked fine.
Go to Top of Page
   

- Advertisement -