By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,391 Members | 2,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,391 IT Pros & Developers. It's quick & easy.

Convert Text Field to Integer and do JOIN in he same Query

P: 77
Please help....

I am trying to JOIN two tables, Table1 and Table2,
the fields used for the JOIN are Table1.CaseNum (Number field) and Table2.Casetxt (Text field).
I know it will not let me do the JOIN between Number field and Text field and for that I should have a query to do the Text to Integer conversion before I try the JOIN Query.

I would like to know if the following is possible
I want to do 2 things in the same Query,
1) convert the Text field to Integer and then
2) JOIN Table1.CaseNum and Table2.CaseTxt(converted to Integer)

Thanks in advance.
Dec 13 '07 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,396
It might work if you do the conversion using a subquery in the FROM clause rather than in the main query.
Dec 13 '07 #2

P: 77
Thanks for your reply.

In the query I gave the criteria for Table1.CaseNum as, =Int([Table2.CaseTxt]), and it worked. It did the conversion and the JOIN without actually drawing a line to join the 2 tables.

Thanks again for your reply.
Dec 14 '07 #3

Expert Mod 10K+
P: 12,396
Good luck.
Dec 14 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.