AC5FF
Registered User.
- Local time
- Today, 08:51
- Joined
- Apr 6, 2004
- Messages
- 552
I've got a tough one - for me - that I am hoping others here may know a simple answer to. I am terrible (read extreme novice) at SQL queries. I have always done my queries via design view.
I have found myself needing to correct a query but do not believe it is possible to do in design view; basically because it has to do with a join. When I look at the query in SQL I can read through it well enough to say where I need to make my changes. That portion of the query is here:
Because I was not involved with these databases when they were started and I am pulling data from numerous sources in this query some do not match up any longer. That is what I am trying to overcome.
What I need this join to do is to ignore the first digit of the fields and only join on the left portion. All the data in both fields are the same except for a few accounts. One field in CCC-AAA is entered as "W11-010" but in the CCUST Account# field it is entered as 011-010.
So is it possible to write this join information so that it would see a match between "W11-010" and "011-010" ?? If so, how?
If required, I can post the whole SQL query here; I just didn't think that would be necessary.
Thank You!
I have found myself needing to correct a query but do not believe it is possible to do in design view; basically because it has to do with a join. When I look at the query in SQL I can read through it well enough to say where I need to make my changes. That portion of the query is here:
Code:
INNER JOIN (CCUST INNER JOIN [BASE: APTINFO] ON CCUST.[Account #] = [BASE: APTINFO].[CCC-AAA])
What I need this join to do is to ignore the first digit of the fields and only join on the left portion. All the data in both fields are the same except for a few accounts. One field in CCC-AAA is entered as "W11-010" but in the CCUST Account# field it is entered as 011-010.
So is it possible to write this join information so that it would see a match between "W11-010" and "011-010" ?? If so, how?
If required, I can post the whole SQL query here; I just didn't think that would be necessary.
Thank You!