I am using the following query to grab records to generate a unique identifier.
builder_id, dist_id and enq_id are all numeric fields. I have another table, called Short. It connects the numeric fields to abbreviated company names. It looks like this:
A third table contains company names to a numeric company ID, so HouseType.builder_id = Short.CompID = company.CompID
How do I change the query so that it will return the ShortCode for builder_id, dist_id and enq_id instead of just one?
Code:
SELECT House_type, softver, builder_id, level, Floor, Revision, dist_id, enq_id
FROM `contacts`.`HouseType` where quote_id = 2203
builder_id, dist_id and enq_id are all numeric fields. I have another table, called Short. It connects the numeric fields to abbreviated company names. It looks like this:
Code:
-------------------
|Comp_ID|ShortCode|
|-------|---------|
| 1 | aaa |
| 2 | acb |
| 3 | afw |
-------------------
How do I change the query so that it will return the ShortCode for builder_id, dist_id and enq_id instead of just one?